summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.editorconfig3
-rw-r--r--AUTHORS.md5
-rw-r--r--README.md2
-rw-r--r--core/bind/core_bind.cpp2
-rw-r--r--core/bind/core_bind.h3
-rw-r--r--core/global_config.cpp69
-rw-r--r--core/global_constants.cpp11
-rw-r--r--core/image.cpp559
-rw-r--r--core/image.h77
-rw-r--r--core/input_map.cpp138
-rw-r--r--core/input_map.h18
-rw-r--r--core/io/image_loader.cpp3
-rw-r--r--core/io/image_loader.h4
-rw-r--r--core/io/marshalls.cpp193
-rw-r--r--core/io/resource_format_binary.cpp154
-rw-r--r--core/math/a_star.cpp16
-rw-r--r--core/math/a_star.h2
-rw-r--r--core/message_queue.cpp15
-rw-r--r--core/method_bind.h3
-rw-r--r--core/method_ptrcall.h2
-rw-r--r--core/os/input.h4
-rw-r--r--core/os/input_event.cpp981
-rw-r--r--core/os/input_event.h315
-rw-r--r--core/os/main_loop.cpp4
-rw-r--r--core/os/main_loop.h2
-rw-r--r--core/os/os.cpp2
-rw-r--r--core/os/os.h3
-rw-r--r--core/packed_data_container.cpp2
-rw-r--r--core/register_core_types.cpp14
-rw-r--r--core/resource.cpp2
-rw-r--r--core/resource.h2
-rw-r--r--core/ring_buffer.h26
-rw-r--r--core/script_debugger_remote.cpp4
-rw-r--r--core/variant.cpp79
-rw-r--r--core/variant.h23
-rw-r--r--core/variant_call.cpp121
-rw-r--r--core/variant_op.cpp773
-rw-r--r--core/variant_parser.cpp422
-rw-r--r--doc/base/classes.xml7
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp4
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp8
-rw-r--r--drivers/gles3/rasterizer_gles3.h2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp63
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h26
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp131
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h21
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp2
-rw-r--r--drivers/gles3/shaders/copy.glsl43
-rw-r--r--drivers/gles3/shaders/cubemap_filter.glsl35
-rw-r--r--drivers/png/image_loader_png.cpp42
-rw-r--r--drivers/png/image_loader_png.h4
-rw-r--r--drivers/png/resource_saver_png.cpp26
-rw-r--r--drivers/png/resource_saver_png.h3
-rw-r--r--editor/animation_editor.cpp1609
-rw-r--r--editor/animation_editor.h2
-rw-r--r--editor/asset_library_editor_plugin.cpp9
-rw-r--r--editor/code_editor.cpp31
-rw-r--r--editor/code_editor.h4
-rw-r--r--editor/connections_dialog.cpp6
-rw-r--r--editor/create_dialog.cpp14
-rw-r--r--editor/create_dialog.h2
-rw-r--r--editor/doc/doc_data.cpp140
-rw-r--r--editor/doc/doc_dump.cpp15
-rw-r--r--editor/editor_audio_buses.cpp35
-rw-r--r--editor/editor_audio_buses.h2
-rw-r--r--editor/editor_file_dialog.cpp18
-rw-r--r--editor/editor_file_dialog.h2
-rw-r--r--editor/editor_help.cpp44
-rw-r--r--editor/editor_help.h8
-rw-r--r--editor/editor_log.cpp3
-rw-r--r--editor/editor_name_dialog.cpp10
-rw-r--r--editor/editor_name_dialog.h2
-rw-r--r--editor/editor_node.cpp423
-rw-r--r--editor/editor_node.h23
-rw-r--r--editor/editor_path.cpp5
-rw-r--r--editor/editor_path.h2
-rw-r--r--editor/editor_plugin.cpp15
-rw-r--r--editor/editor_plugin.h7
-rw-r--r--editor/editor_profiler.cpp20
-rw-r--r--editor/editor_profiler.h2
-rw-r--r--editor/editor_run_native.cpp9
-rw-r--r--editor/editor_settings.cpp38
-rw-r--r--editor/editor_settings.h2
-rw-r--r--editor/editor_themes.cpp410
-rw-r--r--editor/filesystem_dock.cpp15
-rw-r--r--editor/icons/2x/icon_checked.pngbin0 -> 534 bytes
-rw-r--r--editor/icons/2x/icon_dropdown.pngbin0 -> 327 bytes
-rw-r--r--editor/icons/2x/icon_godot.pngbin1842 -> 0 bytes
-rw-r--r--editor/icons/2x/icon_godot_docs.pngbin0 -> 1840 bytes
-rw-r--r--editor/icons/2x/icon_hslider_bg.pngbin0 -> 233 bytes
-rw-r--r--editor/icons/2x/icon_option_arrow.pngbin0 -> 360 bytes
-rw-r--r--editor/icons/2x/icon_play_button_group.pngbin0 -> 942 bytes
-rw-r--r--editor/icons/2x/icon_slider_grabber.pngbin0 -> 686 bytes
-rw-r--r--editor/icons/2x/icon_slider_grabber_hl.pngbin0 -> 672 bytes
-rw-r--r--editor/icons/2x/icon_spinbox_updown.pngbin0 -> 562 bytes
-rw-r--r--editor/icons/2x/icon_tab_menu.pngbin0 -> 277 bytes
-rw-r--r--editor/icons/2x/icon_texture.pngbin0 -> 262 bytes
-rw-r--r--editor/icons/2x/icon_tree_arrow_down.pngbin0 -> 312 bytes
-rw-r--r--editor/icons/2x/icon_tree_arrow_right.pngbin0 -> 319 bytes
-rw-r--r--editor/icons/2x/icon_unchecked.pngbin0 -> 404 bytes
-rw-r--r--editor/icons/2x/icon_vslider_bg.pngbin0 -> 236 bytes
-rw-r--r--editor/icons/SCsub6
-rw-r--r--editor/icons/icon_checked.pngbin0 -> 377 bytes
-rw-r--r--editor/icons/icon_default_project_icon.pngbin2713 -> 3480 bytes
-rw-r--r--editor/icons/icon_dropdown.pngbin0 -> 179 bytes
-rw-r--r--editor/icons/icon_godot.pngbin769 -> 0 bytes
-rw-r--r--editor/icons/icon_godot_docs.pngbin0 -> 722 bytes
-rw-r--r--editor/icons/icon_hslider_bg.pngbin0 -> 233 bytes
-rw-r--r--editor/icons/icon_hsplit_bg.pngbin0 -> 96 bytes
-rw-r--r--editor/icons/icon_hsplitter.pngbin0 -> 132 bytes
-rw-r--r--editor/icons/icon_logo.pngbin6211 -> 11594 bytes
-rw-r--r--editor/icons/icon_logo_small.pngbin1825 -> 1465 bytes
-rw-r--r--editor/icons/icon_option_arrow.pngbin0 -> 205 bytes
-rw-r--r--editor/icons/icon_play_button_group.png (renamed from scene/resources/default_theme/button_group.png)bin427 -> 427 bytes
-rw-r--r--editor/icons/icon_scroll_bg.pngbin0 -> 90 bytes
-rw-r--r--editor/icons/icon_scroll_grabber.pngbin0 -> 147 bytes
-rw-r--r--editor/icons/icon_scroll_grabber_hl.pngbin0 -> 268 bytes
-rw-r--r--editor/icons/icon_slider_grabber.pngbin0 -> 384 bytes
-rw-r--r--editor/icons/icon_slider_grabber_hl.pngbin0 -> 354 bytes
-rw-r--r--editor/icons/icon_spinbox_updown.pngbin0 -> 345 bytes
-rw-r--r--editor/icons/icon_tab_menu.pngbin251 -> 146 bytes
-rw-r--r--editor/icons/icon_texture.pngbin0 -> 200 bytes
-rw-r--r--editor/icons/icon_tree_arrow_down.pngbin0 -> 170 bytes
-rw-r--r--editor/icons/icon_tree_arrow_right.pngbin0 -> 189 bytes
-rw-r--r--editor/icons/icon_unchecked.pngbin0 -> 267 bytes
-rw-r--r--editor/icons/icon_vslider_bg.pngbin0 -> 236 bytes
-rw-r--r--editor/icons/icon_vsplit_bg.pngbin0 -> 96 bytes
-rw-r--r--editor/icons/icon_vsplitter.pngbin0 -> 122 bytes
-rw-r--r--editor/icons/source/icon_3_d.svg105
-rw-r--r--editor/icons/source/icon_checked.svg (renamed from scene/resources/default_theme/source/checked.svg)0
-rw-r--r--editor/icons/source/icon_dropdown.svg (renamed from scene/resources/default_theme/source/dropdown.svg)0
-rw-r--r--editor/icons/source/icon_godot.svg168
-rw-r--r--editor/icons/source/icon_godot_docs.svg173
-rw-r--r--editor/icons/source/icon_hslider_bg.svg (renamed from scene/resources/default_theme/source/hslider_bg.svg)22
-rw-r--r--editor/icons/source/icon_hsplitter.svg (renamed from scene/resources/default_theme/source/hsplitter.svg)0
-rw-r--r--editor/icons/source/icon_mini_matrix32.svg145
-rw-r--r--editor/icons/source/icon_option_arrow.svg (renamed from scene/resources/default_theme/source/tab.svg)25
-rw-r--r--editor/icons/source/icon_particles_shader.svg159
-rw-r--r--editor/icons/source/icon_play_button_group.svg (renamed from scene/resources/default_theme/source/button_group.svg)0
-rw-r--r--editor/icons/source/icon_scroll_bg.svg (renamed from scene/resources/default_theme/source/scroll_bg.svg)0
-rw-r--r--editor/icons/source/icon_scroll_grabber.svg (renamed from scene/resources/default_theme/source/scroll_grabber.svg)0
-rw-r--r--editor/icons/source/icon_scroll_grabber_hl.svg (renamed from scene/resources/default_theme/source/scroll_grabber_hl.svg)29
-rw-r--r--editor/icons/source/icon_slider_grabber.svg (renamed from scene/resources/default_theme/source/hslider_grabber.svg)18
-rw-r--r--editor/icons/source/icon_slider_grabber_hl.svg (renamed from scene/resources/default_theme/source/hslider_grabber_hl.svg)26
-rw-r--r--editor/icons/source/icon_spatial_shader.svg165
-rw-r--r--editor/icons/source/icon_spinbox_updown.svg (renamed from scene/resources/default_theme/source/scroll_button_down.svg)48
-rw-r--r--editor/icons/source/icon_tab_menu.svg (renamed from editor/icons/source/icon_2_d.svg)47
-rw-r--r--editor/icons/source/icon_texture.svg137
-rw-r--r--editor/icons/source/icon_tree_arrow_down.svg (renamed from scene/resources/default_theme/source/vseparator.svg)23
-rw-r--r--editor/icons/source/icon_tree_arrow_right.svg80
-rw-r--r--editor/icons/source/icon_unchecked.svg (renamed from scene/resources/default_theme/source/unchecked.svg)0
-rw-r--r--editor/icons/source/icon_vslider_bg.svg (renamed from scene/resources/default_theme/source/vslider_bg.svg)0
-rw-r--r--editor/icons/source/icon_vsplit_bg.svg (renamed from scene/resources/default_theme/source/vsplit_bg.svg)0
-rw-r--r--editor/icons/source/icon_vsplitter.svg (renamed from scene/resources/default_theme/source/vsplitter.svg)0
-rw-r--r--editor/import/editor_import_plugin.cpp152
-rw-r--r--editor/import/editor_import_plugin.h (renamed from platform/osx/context_gl_osx.h)50
-rw-r--r--editor/import/resource_importer_csv_translation.cpp2
-rw-r--r--editor/import/resource_importer_texture.cpp67
-rw-r--r--editor/import/resource_importer_texture.h4
-rw-r--r--editor/io_plugins/editor_texture_import_plugin.cpp2
-rw-r--r--editor/pane_drag.cpp7
-rw-r--r--editor/pane_drag.h2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp33
-rw-r--r--editor/plugins/animation_player_editor_plugin.h6
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp212
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h2
-rw-r--r--editor/plugins/baked_light_baker.h2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp134
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h6
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp287
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.h4
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.cpp16
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp82
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h4
-rw-r--r--editor/plugins/curve_editor_plugin.cpp19
-rw-r--r--editor/plugins/curve_editor_plugin.h2
-rw-r--r--editor/plugins/gradient_texture_editor_plugin.cpp36
-rw-r--r--editor/plugins/gradient_texture_editor_plugin.h2
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp302
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.h4
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp123
-rw-r--r--editor/plugins/line_2d_editor_plugin.h4
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp6
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp361
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h4
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp15
-rw-r--r--editor/plugins/particles_editor_plugin.cpp4
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp517
-rw-r--r--editor/plugins/path_2d_editor_plugin.h4
-rw-r--r--editor/plugins/path_editor_plugin.cpp50
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp329
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h6
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp2
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h2
-rw-r--r--editor/plugins/script_editor_plugin.cpp30
-rw-r--r--editor/plugins/script_editor_plugin.h4
-rw-r--r--editor/plugins/script_text_editor.cpp16
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/shader_graph_editor_plugin.cpp18
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp1289
-rw-r--r--editor/plugins/spatial_editor_plugin.h14
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h2
-rw-r--r--editor/plugins/texture_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_editor_plugin.h2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp62
-rw-r--r--editor/plugins/texture_region_editor_plugin.h2
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp603
-rw-r--r--editor/plugins/tile_map_editor_plugin.h6
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp26
-rw-r--r--editor/plugins/tile_set_editor_plugin.h1
-rw-r--r--editor/project_export.cpp1
-rw-r--r--editor/project_manager.cpp39
-rw-r--r--editor/project_manager.h4
-rw-r--r--editor/project_settings.cpp234
-rw-r--r--editor/project_settings.h15
-rw-r--r--editor/property_editor.cpp104
-rw-r--r--editor/property_editor.h2
-rw-r--r--editor/property_selector.cpp42
-rw-r--r--editor/property_selector.h5
-rw-r--r--editor/pvrtc_compress.cpp4
-rw-r--r--editor/quick_open.cpp9
-rw-r--r--editor/quick_open.h2
-rw-r--r--editor/scene_tree_dock.cpp13
-rw-r--r--editor/scene_tree_dock.h4
-rw-r--r--editor/script_create_dialog.cpp2
-rw-r--r--editor/script_editor_debugger.cpp50
-rw-r--r--editor/settings_config_dialog.cpp42
-rw-r--r--editor/settings_config_dialog.h4
-rw-r--r--icon.pngbin12675 -> 11155 bytes
-rw-r--r--icon.svg161
-rw-r--r--logo.pngbin34477 -> 19339 bytes
-rw-r--r--logo.svg183
-rw-r--r--main/app_icon.pngbin18284 -> 5569 bytes
-rw-r--r--main/input_default.cpp178
-rw-r--r--main/input_default.h4
-rw-r--r--main/main.cpp15
-rw-r--r--main/splash.pngbin88469 -> 29867 bytes
-rw-r--r--main/tests/test_containers.cpp12
-rw-r--r--main/tests/test_image.cpp7
-rw-r--r--main/tests/test_physics.cpp28
-rw-r--r--main/tests/test_physics_2d.cpp35
-rw-r--r--main/tests/test_render.cpp4
-rw-r--r--methods.py91
-rw-r--r--misc/dist/project_icon.svg138
-rw-r--r--misc/scripts/svgs_2_pngs.py12
-rw-r--r--modules/dds/texture_loader_dds.cpp2
-rw-r--r--modules/etc1/image_etc.cpp19
-rw-r--r--modules/etc1/texture_loader_pkm.cpp2
-rw-r--r--modules/gdnative/gdnative.h6
-rw-r--r--modules/gdnative/godot.cpp4
-rw-r--r--modules/gdnative/godot.h33
-rw-r--r--modules/gdnative/godot/godot_array.cpp49
-rw-r--r--modules/gdnative/godot/godot_array.h10
-rw-r--r--modules/gdnative/godot/godot_basis.cpp287
-rw-r--r--modules/gdnative/godot/godot_basis.h100
-rw-r--r--modules/gdnative/godot/godot_color.cpp92
-rw-r--r--modules/gdnative/godot/godot_color.h28
-rw-r--r--modules/gdnative/godot/godot_dictionary.cpp116
-rw-r--r--modules/gdnative/godot/godot_dictionary.h31
-rw-r--r--modules/gdnative/godot/godot_image.cpp114
-rw-r--r--modules/gdnative/godot/godot_image.h124
-rw-r--r--modules/gdnative/godot/godot_input_event.cpp309
-rw-r--r--modules/gdnative/godot/godot_input_event.h235
-rw-r--r--modules/gdnative/godot/godot_node_path.cpp106
-rw-r--r--modules/gdnative/godot/godot_node_path.h28
-rw-r--r--modules/gdnative/godot/godot_plane.cpp141
-rw-r--r--modules/gdnative/godot/godot_plane.h47
-rw-r--r--modules/gdnative/godot/godot_pool_arrays.cpp56
-rw-r--r--modules/gdnative/godot/godot_pool_arrays.h35
-rw-r--r--modules/gdnative/godot/godot_quat.cpp191
-rw-r--r--modules/gdnative/godot/godot_quat.h44
-rw-r--r--modules/gdnative/godot/godot_rect2.cpp126
-rw-r--r--modules/gdnative/godot/godot_rect2.h40
-rw-r--r--modules/gdnative/godot/godot_rect3.cpp162
-rw-r--r--modules/gdnative/godot/godot_rect3.h52
-rw-r--r--modules/gdnative/godot/godot_rid.cpp40
-rw-r--r--modules/gdnative/godot/godot_rid.h11
-rw-r--r--modules/gdnative/godot/godot_string.cpp6
-rw-r--r--modules/gdnative/godot/godot_string.h1
-rw-r--r--modules/gdnative/godot/godot_transform.cpp166
-rw-r--r--modules/gdnative/godot/godot_transform.h44
-rw-r--r--modules/gdnative/godot/godot_transform2d.cpp186
-rw-r--r--modules/gdnative/godot/godot_transform2d.h56
-rw-r--r--modules/gdnative/godot/godot_variant.cpp646
-rw-r--r--modules/gdnative/godot/godot_variant.h175
-rw-r--r--modules/gdnative/godot/godot_vector2.cpp341
-rw-r--r--modules/gdnative/godot/godot_vector2.h118
-rw-r--r--modules/gdnative/godot/godot_vector3.cpp363
-rw-r--r--modules/gdnative/godot/godot_vector3.h140
-rw-r--r--modules/gdscript/gd_editor.cpp69
-rw-r--r--modules/gdscript/gd_function.cpp18
-rw-r--r--modules/gdscript/gd_function.h2
-rw-r--r--modules/gdscript/gd_tokenizer.cpp2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp206
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h4
-rw-r--r--modules/jpg/image_loader_jpegd.cpp11
-rw-r--r--modules/jpg/image_loader_jpegd.h2
-rw-r--r--modules/pvr/texture_loader_pvr.cpp43
-rw-r--r--modules/squish/image_compress_squish.cpp42
-rw-r--r--modules/squish/image_compress_squish.h1
-rw-r--r--modules/squish/register_types.cpp1
-rw-r--r--modules/theora/video_stream_theora.cpp2
-rw-r--r--modules/visual_script/register_types.cpp2
-rw-r--r--modules/visual_script/visual_script.h2
-rw-r--r--modules/visual_script/visual_script_editor.cpp20
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp285
-rw-r--r--modules/visual_script/visual_script_flow_control.h5
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp105
-rw-r--r--modules/visual_script/visual_script_func_nodes.h8
-rw-r--r--modules/visual_script/visual_script_nodes.cpp38
-rw-r--r--modules/visual_script/visual_script_nodes.h4
-rw-r--r--modules/webp/image_loader_webp.cpp35
-rw-r--r--modules/webp/image_loader_webp.h2
-rw-r--r--platform/android/build.gradle.template2
-rw-r--r--platform/android/export/export.cpp2
-rw-r--r--platform/android/java/res/drawable/icon.pngbin12675 -> 11155 bytes
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java47
-rw-r--r--platform/android/java_glue.cpp33
-rw-r--r--platform/android/os_android.cpp140
-rw-r--r--platform/android/os_android.h2
-rw-r--r--platform/haiku/haiku_direct_window.cpp72
-rw-r--r--platform/iphone/SCsub1
-rw-r--r--platform/iphone/app_delegate.mm522
-rw-r--r--platform/iphone/detect.py17
-rw-r--r--platform/iphone/os_iphone.cpp106
-rw-r--r--platform/iphone/os_iphone.h9
-rw-r--r--platform/iphone/rasterizer_iphone.cpp2585
-rw-r--r--platform/iphone/rasterizer_iphone.h881
-rw-r--r--platform/javascript/export/export.cpp2
-rw-r--r--platform/javascript/os_javascript.cpp120
-rw-r--r--platform/javascript/os_javascript.h2
-rw-r--r--platform/osx/SCsub1
-rw-r--r--platform/osx/context_gl_osx.cpp103
-rw-r--r--platform/osx/godot_osx.h38
-rw-r--r--platform/osx/godot_osx.mm208
-rw-r--r--platform/osx/os_osx.h4
-rw-r--r--platform/osx/os_osx.mm395
-rw-r--r--platform/uwp/app.cpp111
-rw-r--r--platform/uwp/detect.py15
-rw-r--r--platform/uwp/gl_context_egl.cpp2
-rw-r--r--platform/uwp/os_uwp.cpp31
-rw-r--r--platform/uwp/os_uwp.h6
-rw-r--r--platform/windows/export/export.cpp2
-rw-r--r--platform/windows/os_windows.cpp278
-rw-r--r--platform/windows/os_windows.h4
-rw-r--r--platform/x11/export/export.cpp2
-rw-r--r--platform/x11/os_x11.cpp131
-rw-r--r--platform/x11/os_x11.h4
-rw-r--r--scene/2d/canvas_item.cpp4
-rw-r--r--scene/2d/canvas_item.h2
-rw-r--r--scene/2d/collision_object_2d.cpp6
-rw-r--r--scene/2d/collision_object_2d.h2
-rw-r--r--scene/2d/screen_button.cpp70
-rw-r--r--scene/2d/screen_button.h3
-rw-r--r--scene/3d/baked_light_instance.cpp1754
-rw-r--r--scene/3d/baked_light_instance.h199
-rw-r--r--scene/3d/collision_object.cpp6
-rw-r--r--scene/3d/collision_object.h2
-rw-r--r--scene/3d/gi_probe.cpp20
-rw-r--r--scene/3d/gi_probe.h4
-rw-r--r--scene/3d/light.cpp20
-rw-r--r--scene/3d/light.h1
-rw-r--r--scene/3d/particles.cpp2
-rw-r--r--scene/3d/vehicle_body.cpp18
-rw-r--r--scene/3d/vehicle_body.h5
-rw-r--r--scene/audio/audio_player.cpp1
-rw-r--r--scene/gui/base_button.cpp249
-rw-r--r--scene/gui/base_button.h4
-rw-r--r--scene/gui/box_container.cpp1
-rw-r--r--scene/gui/button.cpp41
-rw-r--r--scene/gui/button_array.cpp26
-rw-r--r--scene/gui/button_array.h2
-rw-r--r--scene/gui/color_picker.cpp109
-rw-r--r--scene/gui/color_picker.h10
-rw-r--r--scene/gui/color_ramp_edit.cpp37
-rw-r--r--scene/gui/color_ramp_edit.h2
-rw-r--r--scene/gui/control.cpp4
-rw-r--r--scene/gui/dialogs.cpp65
-rw-r--r--scene/gui/dialogs.h2
-rw-r--r--scene/gui/file_dialog.cpp13
-rw-r--r--scene/gui/file_dialog.h2
-rw-r--r--scene/gui/graph_edit.cpp85
-rw-r--r--scene/gui/graph_edit.h4
-rw-r--r--scene/gui/graph_node.cpp16
-rw-r--r--scene/gui/graph_node.h2
-rw-r--r--scene/gui/input_action.cpp77
-rw-r--r--scene/gui/input_action.h9
-rw-r--r--scene/gui/item_list.cpp91
-rw-r--r--scene/gui/item_list.h6
-rw-r--r--scene/gui/line_edit.cpp603
-rw-r--r--scene/gui/line_edit.h2
-rw-r--r--scene/gui/menu_button.cpp10
-rw-r--r--scene/gui/menu_button.h4
-rw-r--r--scene/gui/option_button.cpp19
-rw-r--r--scene/gui/popup.cpp2
-rw-r--r--scene/gui/popup.h2
-rw-r--r--scene/gui/popup_menu.cpp257
-rw-r--r--scene/gui/popup_menu.h4
-rw-r--r--scene/gui/rich_text_label.cpp229
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/scroll_bar.cpp398
-rw-r--r--scene/gui/scroll_bar.h16
-rw-r--r--scene/gui/scroll_container.cpp156
-rw-r--r--scene/gui/scroll_container.h2
-rw-r--r--scene/gui/slider.cpp49
-rw-r--r--scene/gui/slider.h2
-rw-r--r--scene/gui/spin_box.cpp38
-rw-r--r--scene/gui/spin_box.h4
-rw-r--r--scene/gui/split_container.cpp24
-rw-r--r--scene/gui/split_container.h2
-rw-r--r--scene/gui/tab_container.cpp19
-rw-r--r--scene/gui/tab_container.h2
-rw-r--r--scene/gui/tabs.cpp46
-rw-r--r--scene/gui/tabs.h4
-rw-r--r--scene/gui/text_edit.cpp1817
-rw-r--r--scene/gui/text_edit.h2
-rw-r--r--scene/gui/tool_button.cpp4
-rw-r--r--scene/gui/tool_button.h3
-rw-r--r--scene/gui/tree.cpp804
-rw-r--r--scene/gui/tree.h4
-rw-r--r--scene/gui/video_player.h2
-rwxr-xr-xscene/main/node.cpp6
-rw-r--r--scene/main/scene_main_loop.cpp34
-rw-r--r--scene/main/scene_main_loop.h4
-rw-r--r--scene/main/viewport.cpp763
-rw-r--r--scene/main/viewport.h18
-rw-r--r--scene/register_scene_types.cpp8
-rw-r--r--scene/resources/baked_light.cpp31
-rw-r--r--scene/resources/baked_light.h36
-rw-r--r--scene/resources/bit_mask.cpp14
-rw-r--r--scene/resources/bit_mask.h3
-rw-r--r--scene/resources/default_theme/arrow_down.pngbin170 -> 184 bytes
-rw-r--r--scene/resources/default_theme/arrow_right.pngbin189 -> 183 bytes
-rw-r--r--scene/resources/default_theme/button_disabled.pngbin333 -> 486 bytes
-rw-r--r--scene/resources/default_theme/button_hover.pngbin309 -> 606 bytes
-rw-r--r--scene/resources/default_theme/button_normal.pngbin333 -> 598 bytes
-rw-r--r--scene/resources/default_theme/button_pressed.pngbin307 -> 499 bytes
-rw-r--r--scene/resources/default_theme/checked.pngbin341 -> 627 bytes
-rw-r--r--scene/resources/default_theme/close.pngbin265 -> 230 bytes
-rw-r--r--scene/resources/default_theme/close_hl.pngbin265 -> 230 bytes
-rw-r--r--scene/resources/default_theme/default_theme.cpp288
-rw-r--r--scene/resources/default_theme/dropdown.pngbin179 -> 369 bytes
-rw-r--r--scene/resources/default_theme/focus.pngbin90 -> 411 bytes
-rw-r--r--scene/resources/default_theme/frame_focus.pngbin90 -> 448 bytes
-rw-r--r--scene/resources/default_theme/full_panel_bg.pngbin332 -> 430 bytes
-rw-r--r--scene/resources/default_theme/graph_node.pngbin277 -> 762 bytes
-rw-r--r--scene/resources/default_theme/graph_node_comment.pngbin214 -> 506 bytes
-rw-r--r--scene/resources/default_theme/graph_node_comment_focus.pngbin226 -> 482 bytes
-rw-r--r--scene/resources/default_theme/graph_node_position.pngbin252 -> 278 bytes
-rw-r--r--scene/resources/default_theme/graph_node_selected.pngbin271 -> 933 bytes
-rw-r--r--scene/resources/default_theme/hseparator.pngbin90 -> 323 bytes
-rw-r--r--scene/resources/default_theme/hslider_bg.pngbin177 -> 526 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber.pngbin328 -> 591 bytes
-rw-r--r--scene/resources/default_theme/hslider_grabber_hl.pngbin316 -> 734 bytes
-rw-r--r--scene/resources/default_theme/hsplit_bg.pngbin96 -> 334 bytes
-rw-r--r--scene/resources/default_theme/hsplitter.pngbin132 -> 359 bytes
-rw-r--r--scene/resources/default_theme/icon_close.pngbin265 -> 230 bytes
-rw-r--r--scene/resources/default_theme/line_edit.pngbin408 -> 424 bytes
-rw-r--r--scene/resources/default_theme/line_edit_active.pngbin411 -> 0 bytes
-rw-r--r--scene/resources/default_theme/line_edit_disabled.pngbin389 -> 406 bytes
-rw-r--r--scene/resources/default_theme/line_edit_focus.pngbin0 -> 660 bytes
-rw-r--r--scene/resources/default_theme/line_edit_selected.pngbin411 -> 0 bytes
-rw-r--r--scene/resources/default_theme/option_arrow.pngbin205 -> 227 bytes
-rw-r--r--scene/resources/default_theme/option_button_disabled.pngbin346 -> 901 bytes
-rw-r--r--scene/resources/default_theme/option_button_focus.pngbin0 -> 679 bytes
-rw-r--r--scene/resources/default_theme/option_button_hover.pngbin320 -> 924 bytes
-rw-r--r--scene/resources/default_theme/option_button_normal.pngbin100 -> 922 bytes
-rw-r--r--scene/resources/default_theme/option_button_pressed.pngbin318 -> 931 bytes
-rw-r--r--scene/resources/default_theme/panel_bg.pngbin95 -> 334 bytes
-rw-r--r--scene/resources/default_theme/popup_bg.pngbin425 -> 672 bytes
-rw-r--r--scene/resources/default_theme/popup_hover.pngbin0 -> 404 bytes
-rw-r--r--scene/resources/default_theme/popup_unchecked.pngbin0 -> 310 bytes
-rw-r--r--scene/resources/default_theme/popup_window.pngbin514 -> 1234 bytes
-rw-r--r--scene/resources/default_theme/progress_bar.pngbin93 -> 460 bytes
-rw-r--r--scene/resources/default_theme/progress_fill.pngbin309 -> 402 bytes
-rw-r--r--scene/resources/default_theme/radio_checked.pngbin441 -> 477 bytes
-rw-r--r--scene/resources/default_theme/radio_unchecked.pngbin406 -> 422 bytes
-rw-r--r--scene/resources/default_theme/scroll_bg.pngbin90 -> 510 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_down.pngbin187 -> 418 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_down_hl.pngbin222 -> 418 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left.pngbin207 -> 444 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_left_hl.pngbin244 -> 461 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_right.pngbin205 -> 446 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_right_hl.pngbin243 -> 464 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_up.pngbin190 -> 421 bytes
-rw-r--r--scene/resources/default_theme/scroll_button_up_hl.pngbin232 -> 421 bytes
-rw-r--r--scene/resources/default_theme/scroll_grabber.pngbin147 -> 523 bytes
-rw-r--r--scene/resources/default_theme/scroll_grabber_hl.pngbin188 -> 536 bytes
-rw-r--r--scene/resources/default_theme/selection.pngbin261 -> 406 bytes
-rw-r--r--scene/resources/default_theme/selection_oof.pngbin257 -> 411 bytes
-rw-r--r--scene/resources/default_theme/source/arrow_down.svg20
-rw-r--r--scene/resources/default_theme/source/arrow_right.svg18
-rw-r--r--scene/resources/default_theme/source/button_disabled.svg80
-rw-r--r--scene/resources/default_theme/source/button_hover.svg80
-rw-r--r--scene/resources/default_theme/source/button_normal.svg80
-rw-r--r--scene/resources/default_theme/source/button_pressed.svg80
-rw-r--r--scene/resources/default_theme/source/focus.svg71
-rw-r--r--scene/resources/default_theme/source/frame_focus.svg71
-rw-r--r--scene/resources/default_theme/source/full_panel_bg.svg80
-rw-r--r--scene/resources/default_theme/source/graph_node.svg83
-rw-r--r--scene/resources/default_theme/source/graph_node_comment.svg83
-rw-r--r--scene/resources/default_theme/source/graph_node_comment_focus.svg83
-rw-r--r--scene/resources/default_theme/source/graph_node_position.svg77
-rw-r--r--scene/resources/default_theme/source/graph_node_selected.svg83
-rw-r--r--scene/resources/default_theme/source/hseparator.svg73
-rw-r--r--scene/resources/default_theme/source/icon_close.svg43
-rw-r--r--scene/resources/default_theme/source/line_edit.svg89
-rw-r--r--scene/resources/default_theme/source/line_edit_active.svg89
-rw-r--r--scene/resources/default_theme/source/line_edit_disabled.svg86
-rw-r--r--scene/resources/default_theme/source/option_arrow.svg28
-rw-r--r--scene/resources/default_theme/source/panel_bg.svg79
-rw-r--r--scene/resources/default_theme/source/popup_bg.svg87
-rw-r--r--scene/resources/default_theme/source/popup_window.svg96
-rw-r--r--scene/resources/default_theme/source/progress_bar.svg72
-rw-r--r--scene/resources/default_theme/source/progress_fill.svg82
-rw-r--r--scene/resources/default_theme/source/radio_checked.svg85
-rw-r--r--scene/resources/default_theme/source/radio_unchecked.svg79
-rw-r--r--scene/resources/default_theme/source/scroll_button_down_hl.svg77
-rw-r--r--scene/resources/default_theme/source/scroll_button_left.svg77
-rw-r--r--scene/resources/default_theme/source/scroll_button_left_hl.svg77
-rw-r--r--scene/resources/default_theme/source/scroll_button_right.svg77
-rw-r--r--scene/resources/default_theme/source/scroll_button_right_hl.svg77
-rw-r--r--scene/resources/default_theme/source/scroll_button_up.svg77
-rw-r--r--scene/resources/default_theme/source/scroll_button_up_hl.svg77
-rw-r--r--scene/resources/default_theme/source/selection.svg88
-rw-r--r--scene/resources/default_theme/source/selection_oof.svg88
-rw-r--r--scene/resources/default_theme/source/spinbox_updown.svg33
-rw-r--r--scene/resources/default_theme/source/submenu.svg19
-rw-r--r--scene/resources/default_theme/source/tab_behind.svg71
-rw-r--r--scene/resources/default_theme/source/tab_close.svg46
-rw-r--r--scene/resources/default_theme/source/tab_container_bg.svg80
-rw-r--r--scene/resources/default_theme/source/tab_current.svg79
-rw-r--r--scene/resources/default_theme/source/tab_menu.svg36
-rw-r--r--scene/resources/default_theme/source/toggle_off.svg86
-rw-r--r--scene/resources/default_theme/source/toggle_on.svg85
-rw-r--r--scene/resources/default_theme/source/tooltip_bg.svg85
-rw-r--r--scene/resources/default_theme/source/tree_bg.svg80
-rw-r--r--scene/resources/default_theme/source/tree_title.svg80
-rw-r--r--scene/resources/default_theme/source/tree_title_pressed.svg80
-rw-r--r--scene/resources/default_theme/source/updown.svg14
-rw-r--r--scene/resources/default_theme/source/vslider_grabber.svg80
-rw-r--r--scene/resources/default_theme/source/vslider_grabber_hl.svg80
-rw-r--r--scene/resources/default_theme/source/window_resizer.svg81
-rw-r--r--scene/resources/default_theme/spinbox_updown.pngbin345 -> 280 bytes
-rw-r--r--scene/resources/default_theme/submenu.pngbin217 -> 175 bytes
-rw-r--r--scene/resources/default_theme/tab.pngbin158 -> 300 bytes
-rw-r--r--scene/resources/default_theme/tab_behind.pngbin93 -> 553 bytes
-rw-r--r--scene/resources/default_theme/tab_close.pngbin265 -> 325 bytes
-rw-r--r--scene/resources/default_theme/tab_container_backup.pngbin211 -> 0 bytes
-rw-r--r--scene/resources/default_theme/tab_container_bg.pngbin331 -> 598 bytes
-rw-r--r--scene/resources/default_theme/tab_current.pngbin256 -> 627 bytes
-rw-r--r--scene/resources/default_theme/tab_menu.pngbin146 -> 186 bytes
-rw-r--r--scene/resources/default_theme/tab_menu_hl.pngbin146 -> 186 bytes
-rw-r--r--scene/resources/default_theme/theme_data.h188
-rw-r--r--scene/resources/default_theme/toggle_off.pngbin702 -> 1355 bytes
-rw-r--r--scene/resources/default_theme/toggle_on.pngbin738 -> 1318 bytes
-rw-r--r--scene/resources/default_theme/tool_button_pressed.pngbin0 -> 1230 bytes
-rw-r--r--scene/resources/default_theme/tooltip_bg.pngbin194 -> 424 bytes
-rw-r--r--scene/resources/default_theme/tree_bg.pngbin304 -> 424 bytes
-rw-r--r--scene/resources/default_theme/tree_bg_focus.pngbin0 -> 1039 bytes
-rw-r--r--scene/resources/default_theme/tree_title.pngbin104 -> 335 bytes
-rw-r--r--scene/resources/default_theme/tree_title_pressed.pngbin104 -> 335 bytes
-rw-r--r--scene/resources/default_theme/unchecked.pngbin231 -> 477 bytes
-rw-r--r--scene/resources/default_theme/updown.pngbin214 -> 241 bytes
-rw-r--r--scene/resources/default_theme/vseparator.pngbin90 -> 323 bytes
-rw-r--r--scene/resources/default_theme/vslider_bg.pngbin180 -> 532 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber.pngbin328 -> 394 bytes
-rw-r--r--scene/resources/default_theme/vslider_grabber_hl.pngbin316 -> 439 bytes
-rw-r--r--scene/resources/default_theme/vsplit_bg.pngbin96 -> 334 bytes
-rw-r--r--scene/resources/default_theme/vsplitter.pngbin122 -> 351 bytes
-rw-r--r--scene/resources/default_theme/window_resizer.pngbin138 -> 181 bytes
-rw-r--r--scene/resources/dynamic_font.cpp2
-rw-r--r--scene/resources/environment.cpp70
-rw-r--r--scene/resources/environment.h20
-rw-r--r--scene/resources/mesh.cpp5
-rw-r--r--scene/resources/sky_box.cpp118
-rw-r--r--scene/resources/sky_box.h35
-rw-r--r--scene/resources/style_box.cpp19
-rw-r--r--scene/resources/style_box.h4
-rw-r--r--scene/resources/texture.cpp152
-rw-r--r--scene/resources/texture.h21
-rw-r--r--servers/visual/rasterizer.h19
-rw-r--r--servers/visual/visual_server_raster.cpp2
-rw-r--r--servers/visual/visual_server_raster.h17
-rw-r--r--servers/visual_server.cpp11
-rw-r--r--servers/visual_server.h24
588 files changed, 15503 insertions, 24564 deletions
diff --git a/.editorconfig b/.editorconfig
index e19057f0e8..b7ef43c340 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -5,6 +5,9 @@ charset = utf-8
end_of_line = lf
indent_style = tab
+[*.{cpp,hpp,c,h,mm}]
+trim_trailing_whitespace = true
+
[.travis.yml]
indent_style = space
indent_size = 2
diff --git a/AUTHORS.md b/AUTHORS.md
index 189985309f..728ba5f6ee 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -31,6 +31,7 @@ name is available.
Carl Olsson (not-surt)
Dana Olson (adolson)
Daniel J. Ramirez (djrm)
+ Emmanuel Leblond (touilleMan)
Fabio Alessandrelli (Faless)
Ferenc Arn (tagcup)
Franklin Sobrinho (TheHX)
@@ -48,6 +49,7 @@ name is available.
Julian Murgia (StraToN)
Kostadin Damyanov (Max-Might)
L. Krause (eska014)
+ Marc Gilleron (Zylann)
Marcelo Fernandez (marcelofg55)
Mariano Javier Suligoy (MarianoGnu)
Mario Schlack (hurikhan)
@@ -59,7 +61,8 @@ name is available.
Pawel Kowal (pkowal1982)
Pedro J. Estébanez (RandomShaper)
Ralf Hölzemer (rollenrolm)
- RayKoopa
+ Ramesh Ravone (RameshRavone)
+ Ray Koopa (RayKoopa)
Rémi Verschelde (akien-mga)
SaracenOne
Thomas Herzog (karroffel)
diff --git a/README.md b/README.md
index 701982da11..0c4ab6498a 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![GODOT](/logo.png)](https://godotengine.org)
+[![Godot Engine logo](/logo.png)](https://godotengine.org)
## Godot Engine
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 7a03ceb64c..2752391901 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -505,7 +505,7 @@ int _OS::get_dynamic_memory_usage() const {
return OS::get_singleton()->get_dynamic_memory_usage();
}
-void _OS::set_icon(const Image &p_icon) {
+void _OS::set_icon(const Ref<Image> &p_icon) {
OS::get_singleton()->set_icon(p_icon);
}
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 222339bce1..e48b5c85ad 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -30,6 +30,7 @@
#ifndef CORE_BIND_H
#define CORE_BIND_H
+#include "image.h"
#include "io/resource_loader.h"
#include "io/resource_saver.h"
#include "os/dir_access.h"
@@ -226,7 +227,7 @@ public:
void set_use_file_access_save_and_swap(bool p_enable);
- void set_icon(const Image &p_icon);
+ void set_icon(const Ref<Image> &p_icon);
int get_exit_code() const;
void set_exit_code(int p_code);
diff --git a/core/global_config.cpp b/core/global_config.cpp
index 81b923f01e..896384d9c8 100644
--- a/core/global_config.cpp
+++ b/core/global_config.cpp
@@ -846,10 +846,8 @@ GlobalConfig::GlobalConfig() {
registering_order = true;
Array va;
- InputEvent key;
- key.type = InputEvent::KEY;
- InputEvent joyb;
- joyb.type = InputEvent::JOYPAD_BUTTON;
+ Ref<InputEventKey> key;
+ Ref<InputEventJoypadButton> joyb;
GLOBAL_DEF("application/name", "");
GLOBAL_DEF("application/main_scene", "");
@@ -858,87 +856,106 @@ GlobalConfig::GlobalConfig() {
GLOBAL_DEF("application/disable_stderr", false);
GLOBAL_DEF("application/use_shared_user_dir", true);
- key.key.scancode = KEY_RETURN;
+ key.instance();
+ key->set_scancode(KEY_RETURN);
va.push_back(key);
- key.key.scancode = KEY_ENTER;
+ key.instance();
+ key->set_scancode(KEY_ENTER);
va.push_back(key);
- key.key.scancode = KEY_SPACE;
+ key.instance();
+ key->set_scancode(KEY_SPACE);
va.push_back(key);
- joyb.joy_button.button_index = JOY_BUTTON_0;
+ joyb.instance();
+ joyb->set_button_index(JOY_BUTTON_0);
va.push_back(joyb);
GLOBAL_DEF("input/ui_accept", va);
input_presets.push_back("input/ui_accept");
va = Array();
- key.key.scancode = KEY_SPACE;
+ key.instance();
+ key->set_scancode(KEY_SPACE);
va.push_back(key);
- joyb.joy_button.button_index = JOY_BUTTON_3;
+ joyb.instance();
+ joyb->set_button_index(JOY_BUTTON_3);
va.push_back(joyb);
GLOBAL_DEF("input/ui_select", va);
input_presets.push_back("input/ui_select");
va = Array();
- key.key.scancode = KEY_ESCAPE;
+ key.instance();
+ key->set_scancode(KEY_ESCAPE);
va.push_back(key);
- joyb.joy_button.button_index = JOY_BUTTON_1;
+ joyb.instance();
+ joyb->set_button_index(JOY_BUTTON_1);
va.push_back(joyb);
GLOBAL_DEF("input/ui_cancel", va);
input_presets.push_back("input/ui_cancel");
va = Array();
- key.key.scancode = KEY_TAB;
+ key.instance();
+ key->set_scancode(KEY_TAB);
va.push_back(key);
GLOBAL_DEF("input/ui_focus_next", va);
input_presets.push_back("input/ui_focus_next");
va = Array();
- key.key.scancode = KEY_TAB;
- key.key.mod.shift = true;
+ key.instance();
+ key->set_scancode(KEY_TAB);
+ key->set_shift(true);
va.push_back(key);
GLOBAL_DEF("input/ui_focus_prev", va);
input_presets.push_back("input/ui_focus_prev");
- key.key.mod.shift = false;
va = Array();
- key.key.scancode = KEY_LEFT;
+ key.instance();
+ key->set_scancode(KEY_LEFT);
va.push_back(key);
- joyb.joy_button.button_index = JOY_DPAD_LEFT;
+ joyb.instance();
+ joyb->set_button_index(JOY_DPAD_LEFT);
va.push_back(joyb);
GLOBAL_DEF("input/ui_left", va);
input_presets.push_back("input/ui_left");
va = Array();
- key.key.scancode = KEY_RIGHT;
+ key.instance();
+ key->set_scancode(KEY_RIGHT);
va.push_back(key);
- joyb.joy_button.button_index = JOY_DPAD_RIGHT;
+ joyb.instance();
+ joyb->set_button_index(JOY_DPAD_RIGHT);
va.push_back(joyb);
GLOBAL_DEF("input/ui_right", va);
input_presets.push_back("input/ui_right");
va = Array();
- key.key.scancode = KEY_UP;
+ key.instance();
+ key->set_scancode(KEY_UP);
va.push_back(key);
- joyb.joy_button.button_index = JOY_DPAD_UP;
+ joyb.instance();
+ joyb->set_button_index(JOY_DPAD_UP);
va.push_back(joyb);
GLOBAL_DEF("input/ui_up", va);
input_presets.push_back("input/ui_up");
va = Array();
- key.key.scancode = KEY_DOWN;
+ key.instance();
+ key->set_scancode(KEY_DOWN);
va.push_back(key);
- joyb.joy_button.button_index = JOY_DPAD_DOWN;
+ joyb.instance();
+ joyb->set_button_index(JOY_DPAD_DOWN);
va.push_back(joyb);
GLOBAL_DEF("input/ui_down", va);
input_presets.push_back("input/ui_down");
va = Array();
- key.key.scancode = KEY_PAGEUP;
+ key.instance();
+ key->set_scancode(KEY_PAGEUP);
va.push_back(key);
GLOBAL_DEF("input/ui_page_up", va);
input_presets.push_back("input/ui_page_up");
va = Array();
- key.key.scancode = KEY_PAGEDOWN;
+ key.instance();
+ key->set_scancode(KEY_PAGEDOWN);
va.push_back(key);
GLOBAL_DEF("input/ui_page_down", va);
input_presets.push_back("input/ui_page_down");
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 9bc98c5ad7..4f535fb05e 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -30,6 +30,7 @@
#include "global_constants.h"
#include "object.h"
+#include "os/input_event.h"
#include "os/keyboard.h"
#include "variant.h"
@@ -506,22 +507,20 @@ static _GlobalConstant _global_constants[] = {
{ "TYPE_TRANSFORM2D", Variant::TRANSFORM2D },
{ "TYPE_PLANE", Variant::PLANE },
{ "TYPE_QUAT", Variant::QUAT }, // 10
- { "TYPE_RECT3", Variant::RECT3 }, //sorry naming convention fail :( not like it's used often
+ { "TYPE_RECT3", Variant::RECT3 },
{ "TYPE_BASIS", Variant::BASIS },
{ "TYPE_TRANSFORM", Variant::TRANSFORM },
{ "TYPE_COLOR", Variant::COLOR },
- { "TYPE_IMAGE", Variant::IMAGE }, // 15
- { "TYPE_NODE_PATH", Variant::NODE_PATH },
+ { "TYPE_NODE_PATH", Variant::NODE_PATH }, // 15
{ "TYPE_RID", Variant::_RID },
{ "TYPE_OBJECT", Variant::OBJECT },
- { "TYPE_INPUT_EVENT", Variant::INPUT_EVENT },
{ "TYPE_DICTIONARY", Variant::DICTIONARY }, // 20
{ "TYPE_ARRAY", Variant::ARRAY },
{ "TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY },
{ "TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY },
{ "TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY },
- { "TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY }, // 25
- { "TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY },
+ { "TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY },
+ { "TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY }, // 25
{ "TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY },
{ "TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY },
{ "TYPE_MAX", Variant::VARIANT_MAX },
diff --git a/core/image.cpp b/core/image.cpp
index b81d92fa33..316faf954e 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -415,7 +415,7 @@ void Image::convert(Format p_new_format) {
//mipmaps=false;
- *this = new_img;
+ _copy_internals_from(new_img);
if (gen_mipmaps)
generate_mipmaps();
@@ -611,14 +611,6 @@ void Image::resize_to_po2(bool p_square) {
resize(w, h);
}
-Image Image::resized(int p_width, int p_height, int p_interpolation) {
-
- Image ret = *this;
- ret.resize(p_width, p_height, (Interpolation)p_interpolation);
-
- return ret;
-};
-
void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
if (!_can_modify(format)) {
@@ -681,7 +673,7 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
if (mipmaps > 0)
dst.generate_mipmaps();
- *this = dst;
+ _copy_internals_from(dst);
}
void Image::crop(int p_width, int p_height) {
@@ -728,7 +720,7 @@ void Image::crop(int p_width, int p_height) {
if (mipmaps > 0)
dst.generate_mipmaps();
- *this = dst;
+ _copy_internals_from(dst);
}
void Image::flip_y() {
@@ -1378,22 +1370,12 @@ Error Image::load(const String &p_path) {
return ImageLoader::load_image(p_path, this);
}
-Error Image::save_png(const String &p_path) {
+Error Image::save_png(const String &p_path) const {
if (save_png_func == NULL)
return ERR_UNAVAILABLE;
- return save_png_func(p_path, *this);
-}
-
-bool Image::operator==(const Image &p_image) const {
-
- if (data.size() == 0 && p_image.data.size() == 0)
- return true;
- PoolVector<uint8_t>::Read r = data.read();
- PoolVector<uint8_t>::Read pr = p_image.data.read();
-
- return r.ptr() == pr.ptr();
+ return save_png_func(p_path, Ref<Image>(this));
}
int Image::get_image_data_size(int p_width, int p_height, Format p_format, int p_mipmaps) {
@@ -1409,344 +1391,14 @@ int Image::get_image_required_mipmaps(int p_width, int p_height, Format p_format
return mm;
}
-Error Image::_decompress_bc() {
-
- int wd = width, ht = height;
- if (wd % 4 != 0) {
- wd += 4 - (wd % 4);
- }
- if (ht % 4 != 0) {
- ht += 4 - (ht % 4);
- }
-
- int mm;
- int size = _get_dst_image_size(wd, ht, FORMAT_RGBA8, mm);
-
- PoolVector<uint8_t> newdata;
- newdata.resize(size);
-
- PoolVector<uint8_t>::Write w = newdata.write();
- PoolVector<uint8_t>::Read r = data.read();
-
- int rofs = 0;
- int wofs = 0;
-
- //print_line("width: "+itos(wd)+" height: "+itos(ht));
-
- for (int i = 0; i <= mm; i++) {
-
- switch (format) {
-
- case FORMAT_DXT1: {
-
- int len = (wd * ht) / 16;
- uint8_t *dst = &w[wofs];
-
- uint32_t ofs_table[16];
- for (int x = 0; x < 4; x++) {
-
- for (int y = 0; y < 4; y++) {
-
- ofs_table[15 - (y * 4 + (3 - x))] = (x + y * wd) * 4;
- }
- }
-
- for (int j = 0; j < len; j++) {
-
- const uint8_t *src = &r[rofs + j * 8];
- uint16_t col_a = src[1];
- col_a <<= 8;
- col_a |= src[0];
- uint16_t col_b = src[3];
- col_b <<= 8;
- col_b |= src[2];
-
- uint8_t table[4][4] = {
- { uint8_t((col_a >> 11) << 3), uint8_t(((col_a >> 5) & 0x3f) << 2), uint8_t(((col_a)&0x1f) << 3), 255 },
- { uint8_t((col_b >> 11) << 3), uint8_t(((col_b >> 5) & 0x3f) << 2), uint8_t(((col_b)&0x1f) << 3), 255 },
- { 0, 0, 0, 255 },
- { 0, 0, 0, 255 }
- };
-
- if (col_a < col_b) {
- //punchrough
- table[2][0] = (int(table[0][0]) + int(table[1][0])) >> 1;
- table[2][1] = (int(table[0][1]) + int(table[1][1])) >> 1;
- table[2][2] = (int(table[0][2]) + int(table[1][2])) >> 1;
- table[3][3] = 0; //premul alpha black
- } else {
- //gradient
- table[2][0] = (int(table[0][0]) * 2 + int(table[1][0])) / 3;
- table[2][1] = (int(table[0][1]) * 2 + int(table[1][1])) / 3;
- table[2][2] = (int(table[0][2]) * 2 + int(table[1][2])) / 3;
- table[3][0] = (int(table[0][0]) + int(table[1][0]) * 2) / 3;
- table[3][1] = (int(table[0][1]) + int(table[1][1]) * 2) / 3;
- table[3][2] = (int(table[0][2]) + int(table[1][2]) * 2) / 3;
- }
-
- uint32_t block = src[4];
- block <<= 8;
- block |= src[5];
- block <<= 8;
- block |= src[6];
- block <<= 8;
- block |= src[7];
-
- int y = (j / (wd / 4)) * 4;
- int x = (j % (wd / 4)) * 4;
- int pixofs = (y * wd + x) * 4;
-
- for (int k = 0; k < 16; k++) {
- int idx = pixofs + ofs_table[k];
- dst[idx + 0] = table[block & 0x3][0];
- dst[idx + 1] = table[block & 0x3][1];
- dst[idx + 2] = table[block & 0x3][2];
- dst[idx + 3] = table[block & 0x3][3];
- block >>= 2;
- }
- }
-
- rofs += len * 8;
- wofs += wd * ht * 4;
-
- wd /= 2;
- ht /= 2;
-
- } break;
- case FORMAT_DXT3: {
-
- int len = (wd * ht) / 16;
- uint8_t *dst = &w[wofs];
-
- uint32_t ofs_table[16];
- for (int x = 0; x < 4; x++) {
-
- for (int y = 0; y < 4; y++) {
-
- ofs_table[15 - (y * 4 + (3 - x))] = (x + y * wd) * 4;
- }
- }
-
- for (int j = 0; j < len; j++) {
-
- const uint8_t *src = &r[rofs + j * 16];
-
- uint64_t ablock = src[1];
- ablock <<= 8;
- ablock |= src[0];
- ablock <<= 8;
- ablock |= src[3];
- ablock <<= 8;
- ablock |= src[2];
- ablock <<= 8;
- ablock |= src[5];
- ablock <<= 8;
- ablock |= src[4];
- ablock <<= 8;
- ablock |= src[7];
- ablock <<= 8;
- ablock |= src[6];
-
- uint16_t col_a = src[8 + 1];
- col_a <<= 8;
- col_a |= src[8 + 0];
- uint16_t col_b = src[8 + 3];
- col_b <<= 8;
- col_b |= src[8 + 2];
-
- uint8_t table[4][4] = {
- { uint8_t((col_a >> 11) << 3), uint8_t(((col_a >> 5) & 0x3f) << 2), uint8_t(((col_a)&0x1f) << 3), 255 },
- { uint8_t((col_b >> 11) << 3), uint8_t(((col_b >> 5) & 0x3f) << 2), uint8_t(((col_b)&0x1f) << 3), 255 },
-
- { 0, 0, 0, 255 },
- { 0, 0, 0, 255 }
- };
-
- //always gradient
- table[2][0] = (int(table[0][0]) * 2 + int(table[1][0])) / 3;
- table[2][1] = (int(table[0][1]) * 2 + int(table[1][1])) / 3;
- table[2][2] = (int(table[0][2]) * 2 + int(table[1][2])) / 3;
- table[3][0] = (int(table[0][0]) + int(table[1][0]) * 2) / 3;
- table[3][1] = (int(table[0][1]) + int(table[1][1]) * 2) / 3;
- table[3][2] = (int(table[0][2]) + int(table[1][2]) * 2) / 3;
-
- uint32_t block = src[4 + 8];
- block <<= 8;
- block |= src[5 + 8];
- block <<= 8;
- block |= src[6 + 8];
- block <<= 8;
- block |= src[7 + 8];
-
- int y = (j / (wd / 4)) * 4;
- int x = (j % (wd / 4)) * 4;
- int pixofs = (y * wd + x) * 4;
-
- for (int k = 0; k < 16; k++) {
- uint8_t alpha = ablock & 0xf;
- alpha = int(alpha) * 255 / 15; //right way for alpha
- int idx = pixofs + ofs_table[k];
- dst[idx + 0] = table[block & 0x3][0];
- dst[idx + 1] = table[block & 0x3][1];
- dst[idx + 2] = table[block & 0x3][2];
- dst[idx + 3] = alpha;
- block >>= 2;
- ablock >>= 4;
- }
- }
-
- rofs += len * 16;
- wofs += wd * ht * 4;
-
- wd /= 2;
- ht /= 2;
-
- } break;
- case FORMAT_DXT5: {
-
- int len = (wd * ht) / 16;
- uint8_t *dst = &w[wofs];
-
- uint32_t ofs_table[16];
- for (int x = 0; x < 4; x++) {
-
- for (int y = 0; y < 4; y++) {
-
- ofs_table[15 - (y * 4 + (3 - x))] = (x + y * wd) * 4;
- }
- }
-
- for (int j = 0; j < len; j++) {
-
- const uint8_t *src = &r[rofs + j * 16];
-
- uint8_t a_start = src[1];
- uint8_t a_end = src[0];
-
- uint64_t ablock = src[3];
- ablock <<= 8;
- ablock |= src[2];
- ablock <<= 8;
- ablock |= src[5];
- ablock <<= 8;
- ablock |= src[4];
- ablock <<= 8;
- ablock |= src[7];
- ablock <<= 8;
- ablock |= src[6];
-
- uint8_t atable[8];
-
- if (a_start > a_end) {
-
- atable[0] = (int(a_start) * 7 + int(a_end) * 0) / 7;
- atable[1] = (int(a_start) * 6 + int(a_end) * 1) / 7;
- atable[2] = (int(a_start) * 5 + int(a_end) * 2) / 7;
- atable[3] = (int(a_start) * 4 + int(a_end) * 3) / 7;
- atable[4] = (int(a_start) * 3 + int(a_end) * 4) / 7;
- atable[5] = (int(a_start) * 2 + int(a_end) * 5) / 7;
- atable[6] = (int(a_start) * 1 + int(a_end) * 6) / 7;
- atable[7] = (int(a_start) * 0 + int(a_end) * 7) / 7;
- } else {
-
- atable[0] = (int(a_start) * 5 + int(a_end) * 0) / 5;
- atable[1] = (int(a_start) * 4 + int(a_end) * 1) / 5;
- atable[2] = (int(a_start) * 3 + int(a_end) * 2) / 5;
- atable[3] = (int(a_start) * 2 + int(a_end) * 3) / 5;
- atable[4] = (int(a_start) * 1 + int(a_end) * 4) / 5;
- atable[5] = (int(a_start) * 0 + int(a_end) * 5) / 5;
- atable[6] = 0;
- atable[7] = 255;
- }
-
- uint16_t col_a = src[8 + 1];
- col_a <<= 8;
- col_a |= src[8 + 0];
- uint16_t col_b = src[8 + 3];
- col_b <<= 8;
- col_b |= src[8 + 2];
-
- uint8_t table[4][4] = {
- { uint8_t((col_a >> 11) << 3), uint8_t(((col_a >> 5) & 0x3f) << 2), uint8_t(((col_a)&0x1f) << 3), 255 },
- { uint8_t((col_b >> 11) << 3), uint8_t(((col_b >> 5) & 0x3f) << 2), uint8_t(((col_b)&0x1f) << 3), 255 },
-
- { 0, 0, 0, 255 },
- { 0, 0, 0, 255 }
- };
-
- //always gradient
- table[2][0] = (int(table[0][0]) * 2 + int(table[1][0])) / 3;
- table[2][1] = (int(table[0][1]) * 2 + int(table[1][1])) / 3;
- table[2][2] = (int(table[0][2]) * 2 + int(table[1][2])) / 3;
- table[3][0] = (int(table[0][0]) + int(table[1][0]) * 2) / 3;
- table[3][1] = (int(table[0][1]) + int(table[1][1]) * 2) / 3;
- table[3][2] = (int(table[0][2]) + int(table[1][2]) * 2) / 3;
-
- uint32_t block = src[4 + 8];
- block <<= 8;
- block |= src[5 + 8];
- block <<= 8;
- block |= src[6 + 8];
- block <<= 8;
- block |= src[7 + 8];
-
- int y = (j / (wd / 4)) * 4;
- int x = (j % (wd / 4)) * 4;
- int pixofs = (y * wd + x) * 4;
-
- for (int k = 0; k < 16; k++) {
- uint8_t alpha = ablock & 0x7;
- int idx = pixofs + ofs_table[k];
- dst[idx + 0] = table[block & 0x3][0];
- dst[idx + 1] = table[block & 0x3][1];
- dst[idx + 2] = table[block & 0x3][2];
- dst[idx + 3] = atable[alpha];
- block >>= 2;
- ablock >>= 3;
- }
- }
-
- rofs += len * 16;
- wofs += wd * ht * 4;
-
- wd /= 2;
- ht /= 2;
-
- } break;
- default: {}
- }
- }
-
- w = PoolVector<uint8_t>::Write();
- r = PoolVector<uint8_t>::Read();
-
- data = newdata;
- format = FORMAT_RGBA8;
- if (wd != width || ht != height) {
-
- SWAP(width, wd);
- SWAP(height, ht);
- crop(wd, ht);
- }
-
- return OK;
-}
-
bool Image::is_compressed() const {
return format >= FORMAT_RGB565;
}
-Image Image::decompressed() const {
-
- Image img = *this;
- img.decompress();
- return img;
-}
-
Error Image::decompress() {
- if (format >= FORMAT_DXT1 && format <= FORMAT_ATI2)
- _decompress_bc(); //_image_decompress_bc(this);
+ if (format >= FORMAT_DXT1 && format <= FORMAT_ATI2 && _image_decompress_bc)
+ _image_decompress_bc(this);
else if (format >= FORMAT_PVRTC2 && format <= FORMAT_PVRTC4A && _image_decompress_pvrtc)
_image_decompress_pvrtc(this);
else if (format == FORMAT_ETC && _image_decompress_etc)
@@ -1797,14 +1449,6 @@ Error Image::compress(CompressMode p_mode) {
return OK;
}
-Image Image::compressed(int p_mode) {
-
- Image ret = *this;
- ret.compress((Image::CompressMode)p_mode);
-
- return ret;
-}
-
Image::Image(const char **p_xpm) {
width = 0;
@@ -1875,21 +1519,21 @@ Rect2 Image::get_used_rect() const {
return Rect2(minx, miny, maxx - minx + 1, maxy - miny + 1);
}
-Image Image::get_rect(const Rect2 &p_area) const {
-
- Image img(p_area.size.x, p_area.size.y, mipmaps, format);
- img.blit_rect(*this, p_area, Point2(0, 0));
+Ref<Image> Image::get_rect(const Rect2 &p_area) const {
+ Ref<Image> img = memnew(Image(p_area.size.x, p_area.size.y, mipmaps, format));
+ img->blit_rect(Ref<Image>(this), p_area, Point2(0, 0));
return img;
}
-void Image::blit_rect(const Image &p_src, const Rect2 &p_src_rect, const Point2 &p_dest) {
+void Image::blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Point2 &p_dest) {
+ ERR_FAIL_COND(p_src.is_null());
int dsize = data.size();
- int srcdsize = p_src.data.size();
+ int srcdsize = p_src->data.size();
ERR_FAIL_COND(dsize == 0);
ERR_FAIL_COND(srcdsize == 0);
- ERR_FAIL_COND(format != p_src.format);
+ ERR_FAIL_COND(format != p_src->format);
Rect2i local_src_rect = Rect2i(0, 0, width, height).clip(Rect2i(p_dest + p_src_rect.pos, p_src_rect.size));
@@ -1900,7 +1544,7 @@ void Image::blit_rect(const Image &p_src, const Rect2 &p_src_rect, const Point2
PoolVector<uint8_t>::Write wp = data.write();
uint8_t *dst_data_ptr = wp.ptr();
- PoolVector<uint8_t>::Read rp = p_src.data.read();
+ PoolVector<uint8_t>::Read rp = p_src->data.read();
const uint8_t *src_data_ptr = rp.ptr();
int pixel_size = get_format_pixel_size(format);
@@ -1915,7 +1559,7 @@ void Image::blit_rect(const Image &p_src, const Rect2 &p_src_rect, const Point2
int dst_x = local_src_rect.pos.x + j;
int dst_y = local_src_rect.pos.y + i;
- const uint8_t *src = &src_data_ptr[(src_y * p_src.width + src_x) * pixel_size];
+ const uint8_t *src = &src_data_ptr[(src_y * p_src->width + src_x) * pixel_size];
uint8_t *dst = &dst_data_ptr[(dst_y * width + dst_x) * pixel_size];
for (int k = 0; k < pixel_size; k++) {
@@ -1925,8 +1569,8 @@ void Image::blit_rect(const Image &p_src, const Rect2 &p_src_rect, const Point2
}
}
-Image (*Image::_png_mem_loader_func)(const uint8_t *, int) = NULL;
-Image (*Image::_jpg_mem_loader_func)(const uint8_t *, int) = NULL;
+Ref<Image> (*Image::_png_mem_loader_func)(const uint8_t *, int) = NULL;
+Ref<Image> (*Image::_jpg_mem_loader_func)(const uint8_t *, int) = NULL;
void (*Image::_image_compress_bc_func)(Image *) = NULL;
void (*Image::_image_compress_pvrtc2_func)(Image *) = NULL;
@@ -1938,10 +1582,157 @@ void (*Image::_image_decompress_bc)(Image *) = NULL;
void (*Image::_image_decompress_etc)(Image *) = NULL;
void (*Image::_image_decompress_etc2)(Image *) = NULL;
-PoolVector<uint8_t> (*Image::lossy_packer)(const Image &, float) = NULL;
-Image (*Image::lossy_unpacker)(const PoolVector<uint8_t> &) = NULL;
-PoolVector<uint8_t> (*Image::lossless_packer)(const Image &) = NULL;
-Image (*Image::lossless_unpacker)(const PoolVector<uint8_t> &) = NULL;
+PoolVector<uint8_t> (*Image::lossy_packer)(const Ref<Image> &, float) = NULL;
+Ref<Image> (*Image::lossy_unpacker)(const PoolVector<uint8_t> &) = NULL;
+PoolVector<uint8_t> (*Image::lossless_packer)(const Ref<Image> &) = NULL;
+Ref<Image> (*Image::lossless_unpacker)(const PoolVector<uint8_t> &) = NULL;
+
+void Image::_set_data(const Dictionary &p_data) {
+
+ ERR_FAIL_COND(!p_data.has("width"));
+ ERR_FAIL_COND(!p_data.has("height"));
+ ERR_FAIL_COND(!p_data.has("format"));
+ ERR_FAIL_COND(!p_data.has("mipmaps"));
+ ERR_FAIL_COND(!p_data.has("data"));
+
+ int dwidth = p_data["width"];
+ int dheight = p_data["height"];
+ String dformat = p_data["format"];
+ bool dmipmaps = p_data["mipmaps"];
+ PoolVector<uint8_t> ddata = p_data["data"];
+ Format ddformat = FORMAT_MAX;
+ for (int i = 0; i < FORMAT_MAX; i++) {
+ if (dformat == get_format_name(Format(i))) {
+ ddformat = Format(i);
+ break;
+ }
+ }
+
+ ERR_FAIL_COND(ddformat == FORMAT_MAX);
+
+ create(dwidth, dheight, dmipmaps, ddformat, ddata);
+}
+
+Dictionary Image::_get_data() const {
+
+ Dictionary d;
+ d["width"] = width;
+ d["height"] = height;
+ d["format"] = get_format_name(format);
+ d["mipmaps"] = mipmaps;
+ d["data"] = data;
+ return d;
+}
+
+void Image::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("get_width"), &Image::get_width);
+ ClassDB::bind_method(D_METHOD("get_height"), &Image::get_height);
+ ClassDB::bind_method(D_METHOD("has_mipmaps"), &Image::has_mipmaps);
+ ClassDB::bind_method(D_METHOD("get_format"), &Image::get_format);
+ ClassDB::bind_method(D_METHOD("get_data"), &Image::get_data);
+
+ ClassDB::bind_method(D_METHOD("convert", "format"), &Image::convert);
+
+ ClassDB::bind_method(D_METHOD("get_mipmap_offset", "mipmap"), &Image::get_mipmap_offset);
+
+ ClassDB::bind_method(D_METHOD("resize_to_po2", "square"), &Image::resize_to_po2, DEFVAL("false"));
+ ClassDB::bind_method(D_METHOD("resize", "width", "height", "interpolation"), &Image::resize, DEFVAL(INTERPOLATE_BILINEAR));
+ ClassDB::bind_method(D_METHOD("shrink_x2"), &Image::shrink_x2);
+ ClassDB::bind_method(D_METHOD("expand_x2_hq2x"), &Image::expand_x2_hq2x);
+
+ ClassDB::bind_method(D_METHOD("crop", "width", "height"), &Image::crop);
+ ClassDB::bind_method(D_METHOD("flip_x"), &Image::flip_x);
+ ClassDB::bind_method(D_METHOD("flip_y"), &Image::flip_y);
+ ClassDB::bind_method(D_METHOD("generate_mipmaps"), &Image::generate_mipmaps);
+ ClassDB::bind_method(D_METHOD("clear_mipmaps"), &Image::clear_mipmaps);
+
+ ClassDB::bind_method(D_METHOD("create", "width", "height", "use_mipmaps", "format"), &Image::_create_empty);
+ ClassDB::bind_method(D_METHOD("create_from_data", "width", "height", "use_mipmaps", "format", "data"), &Image::_create_from_data);
+
+ ClassDB::bind_method(D_METHOD("is_empty"), &Image::empty);
+
+ ClassDB::bind_method(D_METHOD("load", "path"), &Image::load);
+ ClassDB::bind_method(D_METHOD("save_png", "path"), &Image::save_png);
+
+ ClassDB::bind_method(D_METHOD("detect_alpha"), &Image::detect_alpha);
+ ClassDB::bind_method(D_METHOD("is_invisible"), &Image::is_invisible);
+
+ ClassDB::bind_method(D_METHOD("compress", "mode"), &Image::compress);
+ ClassDB::bind_method(D_METHOD("decompress"), &Image::decompress);
+ ClassDB::bind_method(D_METHOD("is_compressed"), &Image::is_compressed);
+
+ ClassDB::bind_method(D_METHOD("fix_alpha_edges"), &Image::fix_alpha_edges);
+ ClassDB::bind_method(D_METHOD("premultiply_alpha"), &Image::premultiply_alpha);
+ ClassDB::bind_method(D_METHOD("srgb_to_linear"), &Image::srgb_to_linear);
+ ClassDB::bind_method(D_METHOD("normalmap_to_xy"), &Image::normalmap_to_xy);
+
+ ClassDB::bind_method(D_METHOD("blit_rect", "src:Image", "src_rect", "dst"), &Image::blit_rect);
+
+ ClassDB::bind_method(D_METHOD("get_used_rect"), &Image::get_used_rect);
+ ClassDB::bind_method(D_METHOD("get_rect:Image", "rect"), &Image::get_rect);
+
+ ClassDB::bind_method(D_METHOD("copy_from", "src:Image"), &Image::copy_internals_from);
+
+ ClassDB::bind_method(D_METHOD("_set_data", "data"), &Image::_set_data);
+ ClassDB::bind_method(D_METHOD("_get_data"), &Image::_get_data);
+
+ ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "_set_data", "_get_data");
+
+ BIND_CONSTANT(FORMAT_L8); //luminance
+ BIND_CONSTANT(FORMAT_LA8); //luminance-alpha
+ BIND_CONSTANT(FORMAT_R8);
+ BIND_CONSTANT(FORMAT_RG8);
+ BIND_CONSTANT(FORMAT_RGB8);
+ BIND_CONSTANT(FORMAT_RGBA8);
+ BIND_CONSTANT(FORMAT_RGB565); //16 bit
+ BIND_CONSTANT(FORMAT_RGBA4444);
+ BIND_CONSTANT(FORMAT_RGBA5551);
+ BIND_CONSTANT(FORMAT_RF); //float
+ BIND_CONSTANT(FORMAT_RGF);
+ BIND_CONSTANT(FORMAT_RGBF);
+ BIND_CONSTANT(FORMAT_RGBAF);
+ BIND_CONSTANT(FORMAT_RH); //half float
+ BIND_CONSTANT(FORMAT_RGH);
+ BIND_CONSTANT(FORMAT_RGBH);
+ BIND_CONSTANT(FORMAT_RGBAH);
+ BIND_CONSTANT(FORMAT_DXT1); //s3tc bc1
+ BIND_CONSTANT(FORMAT_DXT3); //bc2
+ BIND_CONSTANT(FORMAT_DXT5); //bc3
+ BIND_CONSTANT(FORMAT_ATI1); //bc4
+ BIND_CONSTANT(FORMAT_ATI2); //bc5
+ BIND_CONSTANT(FORMAT_BPTC_RGBA); //btpc bc6h
+ BIND_CONSTANT(FORMAT_BPTC_RGBF); //float /
+ BIND_CONSTANT(FORMAT_BPTC_RGBFU); //unsigned float
+ BIND_CONSTANT(FORMAT_PVRTC2); //pvrtc
+ BIND_CONSTANT(FORMAT_PVRTC2A);
+ BIND_CONSTANT(FORMAT_PVRTC4);
+ BIND_CONSTANT(FORMAT_PVRTC4A);
+ BIND_CONSTANT(FORMAT_ETC); //etc1
+ BIND_CONSTANT(FORMAT_ETC2_R11); //etc2
+ BIND_CONSTANT(FORMAT_ETC2_R11S); //signed ); NOT srgb.
+ BIND_CONSTANT(FORMAT_ETC2_RG11);
+ BIND_CONSTANT(FORMAT_ETC2_RG11S);
+ BIND_CONSTANT(FORMAT_ETC2_RGB8);
+ BIND_CONSTANT(FORMAT_ETC2_RGBA8);
+ BIND_CONSTANT(FORMAT_ETC2_RGB8A1);
+ BIND_CONSTANT(FORMAT_MAX);
+
+ BIND_CONSTANT(INTERPOLATE_NEAREST);
+ BIND_CONSTANT(INTERPOLATE_BILINEAR);
+ BIND_CONSTANT(INTERPOLATE_CUBIC);
+
+ BIND_CONSTANT(ALPHA_NONE);
+ BIND_CONSTANT(ALPHA_BIT);
+ BIND_CONSTANT(ALPHA_BLEND);
+
+ BIND_CONSTANT(COMPRESS_16BIT);
+ BIND_CONSTANT(COMPRESS_S3TC);
+ BIND_CONSTANT(COMPRESS_PVRTC2);
+ BIND_CONSTANT(COMPRESS_PVRTC4);
+ BIND_CONSTANT(COMPRESS_ETC);
+ BIND_CONSTANT(COMPRESS_ETC2);
+}
void Image::set_compress_bc_func(void (*p_compress_func)(Image *)) {
@@ -2108,14 +1899,22 @@ Image::Image(const uint8_t *p_mem_png_jpg, int p_len) {
format = FORMAT_L8;
if (_png_mem_loader_func) {
- *this = _png_mem_loader_func(p_mem_png_jpg, p_len);
+ copy_internals_from(_png_mem_loader_func(p_mem_png_jpg, p_len));
}
if (empty() && _jpg_mem_loader_func) {
- *this = _jpg_mem_loader_func(p_mem_png_jpg, p_len);
+ copy_internals_from(_jpg_mem_loader_func(p_mem_png_jpg, p_len));
}
}
+Ref<Resource> Image::duplicate(bool p_subresources) const {
+
+ Ref<Image> copy;
+ copy.instance();
+ copy->_copy_internals_from(*this);
+ return copy;
+}
+
Image::Image() {
width = 0;
diff --git a/core/image.h b/core/image.h
index fc87ee8847..273e2d0ab7 100644
--- a/core/image.h
+++ b/core/image.h
@@ -33,6 +33,8 @@
#include "color.h"
#include "dvector.h"
#include "math_2d.h"
+#include "resource.h"
+
/**
* @author Juan Linietsky <reduzio@gmail.com>
*
@@ -43,9 +45,10 @@
class Image;
-typedef Error (*SavePNGFunc)(const String &p_path, Image &p_img);
+typedef Error (*SavePNGFunc)(const String &p_path, const Ref<Image> &p_img);
-class Image {
+class Image : public Resource {
+ GDCLASS(Image, Resource);
enum {
MAX_WIDTH = 16384, // force a limit somehow
@@ -108,8 +111,8 @@ public:
//some functions provided by something else
- static Image (*_png_mem_loader_func)(const uint8_t *p_png, int p_size);
- static Image (*_jpg_mem_loader_func)(const uint8_t *p_png, int p_size);
+ static Ref<Image> (*_png_mem_loader_func)(const uint8_t *p_png, int p_size);
+ static Ref<Image> (*_jpg_mem_loader_func)(const uint8_t *p_png, int p_size);
static void (*_image_compress_bc_func)(Image *);
static void (*_image_compress_pvrtc2_func)(Image *);
@@ -124,17 +127,36 @@ public:
Error _decompress_bc();
- static PoolVector<uint8_t> (*lossy_packer)(const Image &p_image, float p_quality);
- static Image (*lossy_unpacker)(const PoolVector<uint8_t> &p_buffer);
- static PoolVector<uint8_t> (*lossless_packer)(const Image &p_image);
- static Image (*lossless_unpacker)(const PoolVector<uint8_t> &p_buffer);
+ static PoolVector<uint8_t> (*lossy_packer)(const Ref<Image> &p_image, float p_quality);
+ static Ref<Image> (*lossy_unpacker)(const PoolVector<uint8_t> &p_buffer);
+ static PoolVector<uint8_t> (*lossless_packer)(const Ref<Image> &p_image);
+ static Ref<Image> (*lossless_unpacker)(const PoolVector<uint8_t> &p_buffer);
+
+protected:
+ static void _bind_methods();
private:
+ void _create_empty(int p_width, int p_height, bool p_use_mipmaps, Format p_format) {
+ create(p_width, p_height, p_use_mipmaps, p_format);
+ }
+
+ void _create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const PoolVector<uint8_t> &p_data) {
+ create(p_width, p_height, p_use_mipmaps, p_format, p_data);
+ }
+
Format format;
PoolVector<uint8_t> data;
int width, height;
bool mipmaps;
+ void _copy_internals_from(const Image &p_image) {
+ format = p_image.format;
+ width = p_image.width;
+ height = p_image.height;
+ mipmaps = p_image.mipmaps;
+ data = p_image.data;
+ }
+
_FORCE_INLINE_ void _get_mipmap_offset_and_size(int p_mipmap, int &r_offset, int &r_width, int &r_height) const; //get where the mipmap begins in data
static int _get_dst_image_size(int p_width, int p_height, Format p_format, int &r_mipmaps, int p_mipmaps = -1);
@@ -143,6 +165,9 @@ private:
_FORCE_INLINE_ void _put_pixelb(int p_x, int p_y, uint32_t p_pixelsize, uint8_t *p_dst, const uint8_t *p_src);
_FORCE_INLINE_ void _get_pixelb(int p_x, int p_y, uint32_t p_pixelsize, const uint8_t *p_src, uint8_t *p_dst);
+ void _set_data(const Dictionary &p_data);
+ Dictionary _get_data() const;
+
public:
int get_width() const; ///< Get image width
int get_height() const; ///< Get image height
@@ -154,14 +179,6 @@ public:
*/
void convert(Format p_new_format);
- Image converted(int p_new_format) {
- ERR_FAIL_INDEX_V(p_new_format, FORMAT_MAX, Image());
-
- Image ret = *this;
- ret.convert((Format)p_new_format);
- return ret;
- };
-
/**
* Get the current image format.
*/
@@ -178,7 +195,6 @@ public:
void resize_to_po2(bool p_square = false);
void resize(int p_width, int p_height, Interpolation p_interpolation = INTERPOLATE_BILINEAR);
- Image resized(int p_width, int p_height, int p_interpolation = INTERPOLATE_BILINEAR);
void shrink_x2();
void expand_x2_hq2x();
/**
@@ -211,7 +227,7 @@ public:
PoolVector<uint8_t> get_data() const;
Error load(const String &p_path);
- Error save_png(const String &p_path);
+ Error save_png(const String &p_path) const;
/**
* create an empty image
@@ -242,8 +258,6 @@ public:
static int get_image_data_size(int p_width, int p_height, Format p_format, int p_mipmaps = 0);
static int get_image_required_mipmaps(int p_width, int p_height, Format p_format);
- bool operator==(const Image &p_image) const;
-
enum CompressMode {
COMPRESS_16BIT,
COMPRESS_S3TC,
@@ -254,9 +268,7 @@ public:
};
Error compress(CompressMode p_mode = COMPRESS_S3TC);
- Image compressed(int p_mode); /* from the Image::CompressMode enum */
Error decompress();
- Image decompressed() const;
bool is_compressed() const;
void fix_alpha_edges();
@@ -264,17 +276,34 @@ public:
void srgb_to_linear();
void normalmap_to_xy();
- void blit_rect(const Image &p_src, const Rect2 &p_src_rect, const Point2 &p_dest);
+ void blit_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Point2 &p_dest);
Rect2 get_used_rect() const;
- Image get_rect(const Rect2 &p_area) const;
+ Ref<Image> get_rect(const Rect2 &p_area) const;
static void set_compress_bc_func(void (*p_compress_func)(Image *));
static String get_format_name(Format p_format);
Image(const uint8_t *p_mem_png_jpg, int p_len = -1);
Image(const char **p_xpm);
+
+ virtual Ref<Resource> duplicate(bool p_subresources = false) const;
+
+ void copy_internals_from(const Ref<Image> &p_image) {
+ ERR_FAIL_COND(p_image.is_null());
+ format = p_image->format;
+ width = p_image->width;
+ height = p_image->height;
+ mipmaps = p_image->mipmaps;
+ data = p_image->data;
+ }
+
~Image();
};
+VARIANT_ENUM_CAST(Image::Format)
+VARIANT_ENUM_CAST(Image::Interpolation)
+VARIANT_ENUM_CAST(Image::CompressMode)
+VARIANT_ENUM_CAST(Image::AlphaMode)
+
#endif
diff --git a/core/input_map.cpp b/core/input_map.cpp
index 9f9eba01c7..1307c467e6 100644
--- a/core/input_map.cpp
+++ b/core/input_map.cpp
@@ -37,8 +37,6 @@ InputMap *InputMap::singleton = NULL;
void InputMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_action", "action"), &InputMap::has_action);
- ClassDB::bind_method(D_METHOD("get_action_id", "action"), &InputMap::get_action_id);
- ClassDB::bind_method(D_METHOD("get_action_from_id", "id"), &InputMap::get_action_from_id);
ClassDB::bind_method(D_METHOD("get_actions"), &InputMap::_get_actions);
ClassDB::bind_method(D_METHOD("add_action", "action"), &InputMap::add_action);
ClassDB::bind_method(D_METHOD("erase_action", "action"), &InputMap::erase_action);
@@ -57,23 +55,15 @@ void InputMap::add_action(const StringName &p_action) {
input_map[p_action] = Action();
static int last_id = 1;
input_map[p_action].id = last_id;
- input_id_map[last_id] = p_action;
last_id++;
}
void InputMap::erase_action(const StringName &p_action) {
ERR_FAIL_COND(!input_map.has(p_action));
- input_id_map.erase(input_map[p_action].id);
input_map.erase(p_action);
}
-StringName InputMap::get_action_from_id(int p_id) const {
-
- ERR_FAIL_COND_V(!input_id_map.has(p_id), StringName());
- return input_id_map[p_id];
-}
-
Array InputMap::_get_actions() {
Array ret;
@@ -103,49 +93,18 @@ List<StringName> InputMap::get_actions() const {
return actions;
}
-List<InputEvent>::Element *InputMap::_find_event(List<InputEvent> &p_list, const InputEvent &p_event, bool p_action_test) const {
-
- for (List<InputEvent>::Element *E = p_list.front(); E; E = E->next()) {
-
- const InputEvent &e = E->get();
- if (e.type != p_event.type)
- continue;
- if (e.type != InputEvent::KEY && e.device != p_event.device)
- continue;
-
- bool same = false;
-
- switch (p_event.type) {
-
- case InputEvent::KEY: {
-
- if (p_action_test) {
- uint32_t code = e.key.get_scancode_with_modifiers();
- uint32_t event_code = p_event.key.get_scancode_with_modifiers();
- same = (e.key.scancode == p_event.key.scancode && (!p_event.key.pressed || ((code & event_code) == code)));
- } else {
- same = (e.key.scancode == p_event.key.scancode && e.key.mod == p_event.key.mod);
- }
-
- } break;
- case InputEvent::JOYPAD_BUTTON: {
+List<Ref<InputEvent> >::Element *InputMap::_find_event(List<Ref<InputEvent> > &p_list, const Ref<InputEvent> &p_event, bool p_action_test) const {
- same = (e.joy_button.button_index == p_event.joy_button.button_index);
+ for (List<Ref<InputEvent> >::Element *E = p_list.front(); E; E = E->next()) {
- } break;
- case InputEvent::MOUSE_BUTTON: {
+ const Ref<InputEvent> e = E->get();
- same = (e.mouse_button.button_index == p_event.mouse_button.button_index);
+ //if (e.type != Ref<InputEvent>::KEY && e.device != p_event.device) -- unsure about the KEY comparison, why is this here?
+ // continue;
- } break;
- case InputEvent::JOYPAD_MOTION: {
-
- same = (e.joy_motion.axis == p_event.joy_motion.axis && (e.joy_motion.axis_value < 0) == (p_event.joy_motion.axis_value < 0));
-
- } break;
- }
-
- if (same)
+ if (e->get_device() != p_event->get_device())
+ continue;
+ if (e->action_match(p_event))
return E;
}
@@ -157,9 +116,9 @@ bool InputMap::has_action(const StringName &p_action) const {
return input_map.has(p_action);
}
-void InputMap::action_add_event(const StringName &p_action, const InputEvent &p_event) {
+void InputMap::action_add_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
- ERR_FAIL_COND(p_event.type == InputEvent::ACTION);
+ ERR_FAIL_COND(p_event.is_null());
ERR_FAIL_COND(!input_map.has(p_action));
if (_find_event(input_map[p_action].inputs, p_event))
return; //already gots
@@ -167,23 +126,17 @@ void InputMap::action_add_event(const StringName &p_action, const InputEvent &p_
input_map[p_action].inputs.push_back(p_event);
}
-int InputMap::get_action_id(const StringName &p_action) const {
-
- ERR_FAIL_COND_V(!input_map.has(p_action), -1);
- return input_map[p_action].id;
-}
-
-bool InputMap::action_has_event(const StringName &p_action, const InputEvent &p_event) {
+bool InputMap::action_has_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
ERR_FAIL_COND_V(!input_map.has(p_action), false);
return (_find_event(input_map[p_action].inputs, p_event) != NULL);
}
-void InputMap::action_erase_event(const StringName &p_action, const InputEvent &p_event) {
+void InputMap::action_erase_event(const StringName &p_action, const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(!input_map.has(p_action));
- List<InputEvent>::Element *E = _find_event(input_map[p_action].inputs, p_event);
+ List<Ref<InputEvent> >::Element *E = _find_event(input_map[p_action].inputs, p_event);
if (E)
input_map[p_action].inputs.erase(E);
}
@@ -191,9 +144,9 @@ void InputMap::action_erase_event(const StringName &p_action, const InputEvent &
Array InputMap::_get_action_list(const StringName &p_action) {
Array ret;
- const List<InputEvent> *al = get_action_list(p_action);
+ const List<Ref<InputEvent> > *al = get_action_list(p_action);
if (al) {
- for (const List<InputEvent>::Element *E = al->front(); E; E = E->next()) {
+ for (const List<Ref<InputEvent> >::Element *E = al->front(); E; E = E->next()) {
ret.push_back(E->get());
}
@@ -202,7 +155,7 @@ Array InputMap::_get_action_list(const StringName &p_action) {
return ret;
}
-const List<InputEvent> *InputMap::get_action_list(const StringName &p_action) {
+const List<Ref<InputEvent> > *InputMap::get_action_list(const StringName &p_action) {
const Map<StringName, Action>::Element *E = input_map.find(p_action);
if (!E)
@@ -211,7 +164,7 @@ const List<InputEvent> *InputMap::get_action_list(const StringName &p_action) {
return &E->get().inputs;
}
-bool InputMap::event_is_action(const InputEvent &p_event, const StringName &p_action) const {
+bool InputMap::event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action) const {
Map<StringName, Action>::Element *E = input_map.find(p_action);
if (!E) {
@@ -219,9 +172,9 @@ bool InputMap::event_is_action(const InputEvent &p_event, const StringName &p_ac
ERR_FAIL_COND_V(!E, false);
}
- if (p_event.type == InputEvent::ACTION) {
-
- return p_event.action.action == E->get().id;
+ Ref<InputEventAction> iea = p_event;
+ if (iea.is_valid()) {
+ return iea->get_action() == p_action;
}
return _find_event(E->get().inputs, p_event, true) != NULL;
@@ -252,8 +205,8 @@ void InputMap::load_from_globals() {
for (int i = 0; i < va.size(); i++) {
- InputEvent ie = va[i];
- if (ie.type == InputEvent::NONE)
+ Ref<InputEvent> ie = va[i];
+ if (ie.is_null())
continue;
action_add_event(name, ie);
}
@@ -262,57 +215,70 @@ void InputMap::load_from_globals() {
void InputMap::load_default() {
- InputEvent key;
- key.type = InputEvent::KEY;
+ Ref<InputEventKey> key;
add_action("ui_accept");
- key.key.scancode = KEY_RETURN;
+ key.instance();
+ key->set_scancode(KEY_RETURN);
action_add_event("ui_accept", key);
- key.key.scancode = KEY_ENTER;
+
+ key.instance();
+ key->set_scancode(KEY_ENTER);
action_add_event("ui_accept", key);
- key.key.scancode = KEY_SPACE;
+
+ key.instance();
+ key->set_scancode(KEY_SPACE);
action_add_event("ui_accept", key);
add_action("ui_select");
- key.key.scancode = KEY_SPACE;
+ key.instance();
+ key->set_scancode(KEY_SPACE);
action_add_event("ui_select", key);
add_action("ui_cancel");
- key.key.scancode = KEY_ESCAPE;
+ key.instance();
+ key->set_scancode(KEY_ESCAPE);
action_add_event("ui_cancel", key);
add_action("ui_focus_next");
- key.key.scancode = KEY_TAB;
+ key.instance();
+ key->set_scancode(KEY_TAB);
action_add_event("ui_focus_next", key);
add_action("ui_focus_prev");
- key.key.scancode = KEY_TAB;
- key.key.mod.shift = true;
+ key.instance();
+ key->set_scancode(KEY_TAB);
+ key->set_shift(true);
action_add_event("ui_focus_prev", key);
- key.key.mod.shift = false;
add_action("ui_left");
- key.key.scancode = KEY_LEFT;
+ key.instance();
+ key->set_scancode(KEY_LEFT);
action_add_event("ui_left", key);
add_action("ui_right");
- key.key.scancode = KEY_RIGHT;
+ key.instance();
+ key->set_scancode(KEY_RIGHT);
action_add_event("ui_right", key);
add_action("ui_up");
- key.key.scancode = KEY_UP;
+ key.instance();
+ key->set_scancode(KEY_UP);
action_add_event("ui_up", key);
add_action("ui_down");
- key.key.scancode = KEY_DOWN;
+ key.instance();
+ key->set_scancode(KEY_DOWN);
action_add_event("ui_down", key);
add_action("ui_page_up");
- key.key.scancode = KEY_PAGEUP;
+ key.instance();
+ key->set_scancode(KEY_PAGEUP);
action_add_event("ui_page_up", key);
add_action("ui_page_down");
- key.key.scancode = KEY_PAGEDOWN;
+ key.instance();
+ key->set_scancode(KEY_PAGEDOWN);
action_add_event("ui_page_down", key);
//set("display/handheld/orientation", "landscape");
diff --git a/core/input_map.h b/core/input_map.h
index a25255da2d..ba93e61f5f 100644
--- a/core/input_map.h
+++ b/core/input_map.h
@@ -31,6 +31,7 @@
#define INPUT_MAP_H
#include "object.h"
+#include "os/input_event.h"
class InputMap : public Object {
@@ -39,16 +40,15 @@ class InputMap : public Object {
public:
struct Action {
int id;
- List<InputEvent> inputs;
+ List<Ref<InputEvent> > inputs;
};
private:
static InputMap *singleton;
mutable Map<StringName, Action> input_map;
- mutable Map<int, StringName> input_id_map;
- List<InputEvent>::Element *_find_event(List<InputEvent> &p_list, const InputEvent &p_event, bool p_action_test = false) const;
+ List<Ref<InputEvent> >::Element *_find_event(List<Ref<InputEvent> > &p_list, const Ref<InputEvent> &p_event, bool p_action_test = false) const;
Array _get_action_list(const StringName &p_action);
Array _get_actions();
@@ -60,18 +60,16 @@ public:
static _FORCE_INLINE_ InputMap *get_singleton() { return singleton; }
bool has_action(const StringName &p_action) const;
- int get_action_id(const StringName &p_action) const;
- StringName get_action_from_id(int p_id) const;
List<StringName> get_actions() const;
void add_action(const StringName &p_action);
void erase_action(const StringName &p_action);
- void action_add_event(const StringName &p_action, const InputEvent &p_event);
- bool action_has_event(const StringName &p_action, const InputEvent &p_event);
- void action_erase_event(const StringName &p_action, const InputEvent &p_event);
+ void action_add_event(const StringName &p_action, const Ref<InputEvent> &p_event);
+ bool action_has_event(const StringName &p_action, const Ref<InputEvent> &p_event);
+ void action_erase_event(const StringName &p_action, const Ref<InputEvent> &p_event);
- const List<InputEvent> *get_action_list(const StringName &p_action);
- bool event_is_action(const InputEvent &p_event, const StringName &p_action) const;
+ const List<Ref<InputEvent> > *get_action_list(const StringName &p_action);
+ bool event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action) const;
const Map<StringName, Action> &get_action_map() const;
void load_from_globals();
diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp
index 4864c18831..6ed20ac015 100644
--- a/core/io/image_loader.cpp
+++ b/core/io/image_loader.cpp
@@ -43,7 +43,8 @@ bool ImageFormatLoader::recognize(const String &p_extension) const {
return false;
}
-Error ImageLoader::load_image(String p_file, Image *p_image, FileAccess *p_custom) {
+Error ImageLoader::load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom) {
+ ERR_FAIL_COND_V(p_image.is_null(), ERR_INVALID_PARAMETER);
FileAccess *f = p_custom;
if (!f) {
diff --git a/core/io/image_loader.h b/core/io/image_loader.h
index 37149dbe9d..7114cbf8ad 100644
--- a/core/io/image_loader.h
+++ b/core/io/image_loader.h
@@ -56,7 +56,7 @@ class ImageFormatLoader {
friend class ImageLoader;
protected:
- virtual Error load_image(Image *p_image, FileAccess *p_fileaccess) = 0;
+ virtual Error load_image(Ref<Image> p_image, FileAccess *p_fileaccess) = 0;
virtual void get_recognized_extensions(List<String> *p_extensions) const = 0;
bool recognize(const String &p_extension) const;
@@ -75,7 +75,7 @@ class ImageLoader {
protected:
public:
- static Error load_image(String p_file, Image *p_image, FileAccess *p_custom = NULL);
+ static Error load_image(String p_file, Ref<Image> p_image, FileAccess *p_custom = NULL);
static void get_recognized_extensions(List<String> *p_extensions);
static bool recognize(const String &p_extension);
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 5e66b7f7f5..dccf70ad7a 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -276,38 +276,6 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
(*r_len) += 4 * 4;
} break;
- case Variant::IMAGE: {
-
- ERR_FAIL_COND_V(len < (int)5 * 4, ERR_INVALID_DATA);
- Image::Format fmt = (Image::Format)decode_uint32(&buf[0]);
- ERR_FAIL_INDEX_V(fmt, Image::FORMAT_MAX, ERR_INVALID_DATA);
- uint32_t mipmaps = decode_uint32(&buf[4]);
- uint32_t w = decode_uint32(&buf[8]);
- uint32_t h = decode_uint32(&buf[12]);
- uint32_t datalen = decode_uint32(&buf[16]);
-
- Image img;
- if (datalen > 0) {
- len -= 5 * 4;
- ERR_FAIL_COND_V(len < datalen, ERR_INVALID_DATA);
- PoolVector<uint8_t> data;
- data.resize(datalen);
- PoolVector<uint8_t>::Write wr = data.write();
- copymem(&wr[0], &buf[20], datalen);
- wr = PoolVector<uint8_t>::Write();
-
- img = Image(w, h, mipmaps, fmt, data);
- }
-
- r_variant = img;
- if (r_len) {
- if (datalen % 4)
- (*r_len) += 4 - datalen % 4;
-
- (*r_len) += 4 * 5 + datalen;
- }
-
- } break;
case Variant::NODE_PATH: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
@@ -397,66 +365,6 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
r_variant = (Object *)NULL;
} break;
- case Variant::INPUT_EVENT: {
-
- InputEvent ie;
-
- ie.type = decode_uint32(&buf[0]);
- ie.device = decode_uint32(&buf[4]);
-
- if (r_len)
- (*r_len) += 12;
-
- switch (ie.type) {
-
- case InputEvent::KEY: {
-
- uint32_t mods = decode_uint32(&buf[12]);
- if (mods & KEY_MASK_SHIFT)
- ie.key.mod.shift = true;
- if (mods & KEY_MASK_CTRL)
- ie.key.mod.control = true;
- if (mods & KEY_MASK_ALT)
- ie.key.mod.alt = true;
- if (mods & KEY_MASK_META)
- ie.key.mod.meta = true;
- ie.key.scancode = decode_uint32(&buf[16]);
-
- if (r_len)
- (*r_len) += 8;
-
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- ie.mouse_button.button_index = decode_uint32(&buf[12]);
- if (r_len)
- (*r_len) += 4;
-
- } break;
- case InputEvent::JOYPAD_BUTTON: {
-
- ie.joy_button.button_index = decode_uint32(&buf[12]);
- if (r_len)
- (*r_len) += 4;
- } break;
- case InputEvent::SCREEN_TOUCH: {
-
- ie.screen_touch.index = decode_uint32(&buf[12]);
- if (r_len)
- (*r_len) += 4;
- } break;
- case InputEvent::JOYPAD_MOTION: {
-
- ie.joy_motion.axis = decode_uint32(&buf[12]);
- ie.joy_motion.axis_value = decode_float(&buf[16]);
- if (r_len)
- (*r_len) += 8;
- } break;
- }
-
- r_variant = ie;
-
- } break;
case Variant::DICTIONARY: {
ERR_FAIL_COND_V(len < 4, ERR_INVALID_DATA);
@@ -1078,30 +986,6 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len) {
r_len += 4 * 4;
} break;
- case Variant::IMAGE: {
-
- Image image = p_variant;
- PoolVector<uint8_t> data = image.get_data();
-
- if (buf) {
-
- encode_uint32(image.get_format(), &buf[0]);
- encode_uint32(image.has_mipmaps(), &buf[4]);
- encode_uint32(image.get_width(), &buf[8]);
- encode_uint32(image.get_height(), &buf[12]);
- int ds = data.size();
- encode_uint32(ds, &buf[16]);
- PoolVector<uint8_t>::Read r = data.read();
- copymem(&buf[20], &r[0], ds);
- }
-
- int pad = 0;
- if (data.size() % 4)
- pad = 4 - data.size() % 4;
-
- r_len += data.size() + 5 * 4 + pad;
-
- } break;
/*case Variant::RESOURCE: {
ERR_EXPLAIN("Can't marshallize resources");
@@ -1111,83 +995,6 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len) {
case Variant::OBJECT: {
} break;
- case Variant::INPUT_EVENT: {
-
- InputEvent ie = p_variant;
-
- if (buf) {
-
- encode_uint32(ie.type, &buf[0]);
- encode_uint32(ie.device, &buf[4]);
- encode_uint32(0, &buf[8]);
- }
-
- int llen = 12;
-
- switch (ie.type) {
-
- case InputEvent::KEY: {
-
- if (buf) {
-
- uint32_t mods = 0;
- if (ie.key.mod.shift)
- mods |= KEY_MASK_SHIFT;
- if (ie.key.mod.control)
- mods |= KEY_MASK_CTRL;
- if (ie.key.mod.alt)
- mods |= KEY_MASK_ALT;
- if (ie.key.mod.meta)
- mods |= KEY_MASK_META;
-
- encode_uint32(mods, &buf[llen]);
- encode_uint32(ie.key.scancode, &buf[llen + 4]);
- }
- llen += 8;
-
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- if (buf) {
-
- encode_uint32(ie.mouse_button.button_index, &buf[llen]);
- }
- llen += 4;
- } break;
- case InputEvent::JOYPAD_BUTTON: {
-
- if (buf) {
-
- encode_uint32(ie.joy_button.button_index, &buf[llen]);
- }
- llen += 4;
- } break;
- case InputEvent::SCREEN_TOUCH: {
-
- if (buf) {
-
- encode_uint32(ie.screen_touch.index, &buf[llen]);
- }
- llen += 4;
- } break;
- case InputEvent::JOYPAD_MOTION: {
-
- if (buf) {
-
- int axis = ie.joy_motion.axis;
- encode_uint32(axis, &buf[llen]);
- encode_float(ie.joy_motion.axis_value, &buf[llen + 4]);
- }
- llen += 8;
- } break;
- }
-
- if (buf)
- encode_uint32(llen, &buf[8]);
- r_len += llen;
-
- // not supported
- } break;
case Variant::DICTIONARY: {
Dictionary d = p_variant;
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index fc18a44ed3..26b53c2a31 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -49,12 +49,12 @@ enum {
VARIANT_VECTOR3 = 12,
VARIANT_PLANE = 13,
VARIANT_QUAT = 14,
- VARIANT_AABB = 15,
+ VARIANT_RECT3 = 15,
VARIANT_MATRIX3 = 16,
VARIANT_TRANSFORM = 17,
VARIANT_MATRIX32 = 18,
VARIANT_COLOR = 20,
- VARIANT_IMAGE = 21,
+ //VARIANT_IMAGE = 21, - no longer variant type
VARIANT_NODE_PATH = 22,
VARIANT_RID = 23,
VARIANT_OBJECT = 24,
@@ -71,11 +71,6 @@ enum {
VARIANT_INT64 = 40,
VARIANT_DOUBLE = 41,
- IMAGE_ENCODING_EMPTY = 0,
- IMAGE_ENCODING_RAW = 1,
- IMAGE_ENCODING_LOSSLESS = 2,
- IMAGE_ENCODING_LOSSY = 3,
-
OBJECT_EMPTY = 0,
OBJECT_EXTERNAL_RESOURCE = 1,
OBJECT_INTERNAL_RESOURCE = 2,
@@ -193,7 +188,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = v;
} break;
- case VARIANT_AABB: {
+ case VARIANT_RECT3: {
Rect3 v;
v.pos.x = f->get_real();
@@ -259,74 +254,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
r_v = v;
} break;
- case VARIANT_IMAGE: {
-
- uint32_t encoding = f->get_32();
- if (encoding == IMAGE_ENCODING_EMPTY) {
- r_v = Variant();
- break;
- } else if (encoding == IMAGE_ENCODING_RAW) {
- uint32_t width = f->get_32();
- uint32_t height = f->get_32();
- uint32_t mipmaps = f->get_32();
- uint32_t format = f->get_32();
- const uint32_t format_version_shift = 24;
- const uint32_t format_version_mask = format_version_shift - 1;
-
- uint32_t format_version = format >> format_version_shift;
-
- const uint32_t current_version = 0;
- if (format_version > current_version) {
-
- ERR_PRINT("Format version for encoded binary image is too new");
- return ERR_PARSE_ERROR;
- }
-
- Image::Format fmt = Image::Format(format & format_version_mask); //if format changes, we can add a compatibility bit on top
-
- uint32_t datalen = f->get_32();
- print_line("image format: " + String(Image::get_format_name(fmt)) + " datalen " + itos(datalen));
-
- PoolVector<uint8_t> imgdata;
- imgdata.resize(datalen);
- PoolVector<uint8_t>::Write w = imgdata.write();
- f->get_buffer(w.ptr(), datalen);
- _advance_padding(datalen);
- w = PoolVector<uint8_t>::Write();
-
-#ifdef TOOLS_ENABLED
- //compatibility
- int correct_size = Image::get_image_data_size(width, height, fmt, mipmaps ? -1 : 0);
- if (correct_size < datalen) {
- WARN_PRINT("Image data was too large, shrinking for compatibility")
- imgdata.resize(correct_size);
- }
-#endif
- r_v = Image(width, height, mipmaps, fmt, imgdata);
-
- } else {
- //compressed
- PoolVector<uint8_t> data;
- data.resize(f->get_32());
- PoolVector<uint8_t>::Write w = data.write();
- f->get_buffer(w.ptr(), data.size());
- w = PoolVector<uint8_t>::Write();
-
- Image img;
- if (encoding == IMAGE_ENCODING_LOSSY && Image::lossy_unpacker) {
-
- img = Image::lossy_unpacker(data);
- } else if (encoding == IMAGE_ENCODING_LOSSLESS && Image::lossless_unpacker) {
-
- img = Image::lossless_unpacker(data);
- }
- _advance_padding(data.size());
-
- r_v = img;
- }
-
- } break;
case VARIANT_NODE_PATH: {
Vector<StringName> names;
@@ -431,13 +359,6 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
}
} break;
- case VARIANT_INPUT_EVENT: {
-
- InputEvent ev;
- ev.type = f->get_32(); //will only work for null though.
- r_v = ev;
-
- } break;
case VARIANT_DICTIONARY: {
uint32_t len = f->get_32();
@@ -1404,7 +1325,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant &p_property,
} break;
case Variant::RECT3: {
- f->store_32(VARIANT_AABB);
+ f->store_32(VARIANT_RECT3);
Rect3 val = p_property;
f->store_real(val.pos.x);
f->store_real(val.pos.y);
@@ -1469,67 +1390,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant &p_property,
f->store_real(val.a);
} break;
- case Variant::IMAGE: {
-
- f->store_32(VARIANT_IMAGE);
- Image val = p_property;
- if (val.empty()) {
- f->store_32(IMAGE_ENCODING_EMPTY);
- break;
- }
-
- int encoding = IMAGE_ENCODING_RAW;
- float quality = 0.7;
-
- if (!val.is_compressed()) {
- //can only compress uncompressed stuff
-
- if (p_hint.hint == PROPERTY_HINT_IMAGE_COMPRESS_LOSSY && Image::lossy_packer) {
- encoding = IMAGE_ENCODING_LOSSY;
- float qs = p_hint.hint_string.to_double();
- if (qs != 0.0)
- quality = qs;
-
- } else if (p_hint.hint == PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS && Image::lossless_packer) {
- encoding = IMAGE_ENCODING_LOSSLESS;
- }
- }
-
- f->store_32(encoding); //raw encoding
-
- if (encoding == IMAGE_ENCODING_RAW) {
-
- f->store_32(val.get_width());
- f->store_32(val.get_height());
- f->store_32(val.has_mipmaps());
- f->store_32(val.get_format()); //if format changes we can add a compatibility version bit
-
- int dlen = val.get_data().size();
- f->store_32(dlen);
- PoolVector<uint8_t>::Read r = val.get_data().read();
- f->store_buffer(r.ptr(), dlen);
- _pad_buffer(dlen);
- } else {
- PoolVector<uint8_t> data;
- if (encoding == IMAGE_ENCODING_LOSSY) {
- data = Image::lossy_packer(val, quality);
-
- } else if (encoding == IMAGE_ENCODING_LOSSLESS) {
- data = Image::lossless_packer(val);
- }
-
- int ds = data.size();
- f->store_32(ds);
- if (ds > 0) {
- PoolVector<uint8_t>::Read r = data.read();
- f->store_buffer(r.ptr(), ds);
-
- _pad_buffer(ds);
- }
- }
-
- } break;
case Variant::NODE_PATH: {
f->store_32(VARIANT_NODE_PATH);
NodePath np = p_property;
@@ -1578,13 +1439,6 @@ void ResourceFormatSaverBinaryInstance::write_variant(const Variant &p_property,
}
} break;
- case Variant::INPUT_EVENT: {
-
- f->store_32(VARIANT_INPUT_EVENT);
- InputEvent event = p_property;
- f->store_32(0); //event type none, nothing else suported for now.
-
- } break;
case Variant::DICTIONARY: {
f->store_32(VARIANT_DICTIONARY);
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index c327f7ca44..320990cc50 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -43,6 +43,7 @@ int AStar::get_available_point_id() const {
void AStar::add_point(int p_id, const Vector3 &p_pos, real_t p_weight_scale) {
ERR_FAIL_COND(p_id < 0);
+ ERR_FAIL_COND(p_weight_scale < 1);
if (!points.has(p_id)) {
Point *pt = memnew(Point);
pt->id = p_id;
@@ -86,7 +87,7 @@ void AStar::remove_point(int p_id) {
points.erase(p_id);
}
-void AStar::connect_points(int p_id, int p_with_id) {
+void AStar::connect_points(int p_id, int p_with_id, bool bidirectional) {
ERR_FAIL_COND(!points.has(p_id));
ERR_FAIL_COND(!points.has(p_with_id));
@@ -95,7 +96,9 @@ void AStar::connect_points(int p_id, int p_with_id) {
Point *a = points[p_id];
Point *b = points[p_with_id];
a->neighbours.push_back(b);
- b->neighbours.push_back(a);
+
+ if (bidirectional)
+ b->neighbours.push_back(a);
Segment s(p_id, p_with_id);
if (s.from == p_id) {
@@ -190,8 +193,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
Point *n = begin_point->neighbours[i];
n->prev_point = begin_point;
- n->distance = _compute_cost(n->id, begin_point->id);
- n->distance *= n->weight_scale;
+ n->distance = _compute_cost(begin_point->id, n->id) * n->weight_scale;
n->last_pass = pass;
open_list.add(&n->list);
@@ -219,7 +221,6 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
real_t cost = p->distance;
cost += _estimate_cost(p->id, end_point->id);
- cost *= p->weight_scale;
if (cost < least_cost) {
@@ -236,8 +237,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
Point *e = p->neighbours[i];
- real_t distance = _compute_cost(p->id, e->id) + p->distance;
- distance *= e->weight_scale;
+ real_t distance = _compute_cost(p->id, e->id) * e->weight_scale + p->distance;
if (e->last_pass == pass) {
//oh this was visited already, can we win the cost?
@@ -401,7 +401,7 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale);
ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point);
- ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id"), &AStar::connect_points);
+ ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id"), &AStar::connect_points, DEFVAL(true));
ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar::disconnect_points);
ClassDB::bind_method(D_METHOD("are_points_connected", "id", "to_id"), &AStar::are_points_connected);
diff --git a/core/math/a_star.h b/core/math/a_star.h
index b9c8833386..34a5358344 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -105,7 +105,7 @@ public:
real_t get_point_weight_scale(int p_id) const;
void remove_point(int p_id);
- void connect_points(int p_id, int p_with_id);
+ void connect_points(int p_id, int p_with_id, bool bidirectional = true);
void disconnect_points(int p_id, int p_with_id);
bool are_points_connected(int p_id, int p_with_id) const;
diff --git a/core/message_queue.cpp b/core/message_queue.cpp
index fa1c8112cc..d7d31b6c1e 100644
--- a/core/message_queue.cpp
+++ b/core/message_queue.cpp
@@ -318,12 +318,19 @@ void MessageQueue::flush() {
while (read_pos < buffer_end) {
- _THREAD_SAFE_UNLOCK_
-
//lock on each interation, so a call can re-add itself to the message queue
Message *message = (Message *)&buffer[read_pos];
+ uint32_t advance = sizeof(Message);
+ if ((message->type & FLAG_MASK) != TYPE_NOTIFICATION)
+ advance += sizeof(Variant) * message->args;
+
+ //pre-advance so this function is reentrant
+ read_pos += advance;
+
+ _THREAD_SAFE_UNLOCK_
+
Object *target = ObjectDB::get_instance(message->instance_ID);
if (target != NULL) {
@@ -359,13 +366,9 @@ void MessageQueue::flush() {
}
}
- uint32_t advance = sizeof(Message);
- if ((message->type & FLAG_MASK) != TYPE_NOTIFICATION)
- advance += sizeof(Variant) * message->args;
message->~Message();
_THREAD_SAFE_LOCK_
- read_pos += advance;
}
buffer_end = 0; // reset buffer
diff --git a/core/method_bind.h b/core/method_bind.h
index 749d8b4fda..8d72c8573a 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -146,7 +146,7 @@ struct VariantCaster<const T &> {
// some helpers
VARIANT_ENUM_CAST(Vector3::Axis);
-VARIANT_ENUM_CAST(Image::Format);
+
VARIANT_ENUM_CAST(Error);
VARIANT_ENUM_CAST(wchar_t);
VARIANT_ENUM_CAST(Margin);
@@ -154,7 +154,6 @@ VARIANT_ENUM_CAST(Orientation);
VARIANT_ENUM_CAST(HAlign);
VARIANT_ENUM_CAST(Variant::Type);
VARIANT_ENUM_CAST(Variant::Operator);
-VARIANT_ENUM_CAST(InputEvent::Type);
class MethodBind {
diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h
index 8cb2903842..bcbf2e4531 100644
--- a/core/method_ptrcall.h
+++ b/core/method_ptrcall.h
@@ -103,10 +103,8 @@ MAKE_PTRARG(Rect3);
MAKE_PTRARG(Basis);
MAKE_PTRARG(Transform);
MAKE_PTRARG(Color);
-MAKE_PTRARG(Image);
MAKE_PTRARG(NodePath);
MAKE_PTRARG(RID);
-MAKE_PTRARG(InputEvent);
MAKE_PTRARG(Dictionary);
MAKE_PTRARG(Array);
MAKE_PTRARG(PoolByteArray);
diff --git a/core/os/input.h b/core/os/input.h
index 4f26f097c2..6759c624e3 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -82,7 +82,7 @@ public:
virtual int get_mouse_button_mask() const = 0;
virtual void warp_mouse_pos(const Vector2 &p_to) = 0;
- virtual Point2i warp_mouse_motion(const InputEventMouseMotion &p_motion, const Rect2 &p_rect) = 0;
+ virtual Point2i warp_mouse_motion(const Ref<InputEventMouseMotion> &p_motion, const Rect2 &p_rect) = 0;
virtual Vector3 get_gravity() const = 0;
virtual Vector3 get_accelerometer() const = 0;
@@ -104,7 +104,7 @@ public:
virtual int get_joy_button_index_from_string(String p_button) = 0;
virtual int get_joy_axis_index_from_string(String p_axis) = 0;
- virtual void parse_input_event(const InputEvent &p_event) = 0;
+ virtual void parse_input_event(const Ref<InputEvent> &p_event) = 0;
Input();
};
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 474bc33b41..cf3b8f74ec 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -34,275 +34,794 @@
*
*/
-bool InputEvent::operator==(const InputEvent &p_event) const {
- if (type != p_event.type) {
- return false;
- }
+void InputEvent::set_id(uint32_t p_id) {
+ id = p_id;
+}
- switch (type) {
- /** Current clang-format style doesn't play well with the aligned return values of that switch. */
- /* clang-format off */
- case NONE:
- return true;
- case KEY:
- return key.unicode == p_event.key.unicode
- && key.scancode == p_event.key.scancode
- && key.echo == p_event.key.echo
- && key.pressed == p_event.key.pressed
- && key.mod == p_event.key.mod;
- case MOUSE_MOTION:
- return mouse_motion.x == p_event.mouse_motion.x
- && mouse_motion.y == p_event.mouse_motion.y
- && mouse_motion.relative_x == p_event.mouse_motion.relative_x
- && mouse_motion.relative_y == p_event.mouse_motion.relative_y
- && mouse_motion.button_mask == p_event.mouse_motion.button_mask
- && key.mod == p_event.key.mod;
- case MOUSE_BUTTON:
- return mouse_button.pressed == p_event.mouse_button.pressed
- && mouse_button.x == p_event.mouse_button.x
- && mouse_button.y == p_event.mouse_button.y
- && mouse_button.button_index == p_event.mouse_button.button_index
- && mouse_button.button_mask == p_event.mouse_button.button_mask
- && key.mod == p_event.key.mod;
- case JOYPAD_MOTION:
- return joy_motion.axis == p_event.joy_motion.axis
- && joy_motion.axis_value == p_event.joy_motion.axis_value;
- case JOYPAD_BUTTON:
- return joy_button.pressed == p_event.joy_button.pressed
- && joy_button.button_index == p_event.joy_button.button_index
- && joy_button.pressure == p_event.joy_button.pressure;
- case SCREEN_TOUCH:
- return screen_touch.pressed == p_event.screen_touch.pressed
- && screen_touch.index == p_event.screen_touch.index
- && screen_touch.x == p_event.screen_touch.x
- && screen_touch.y == p_event.screen_touch.y;
- case SCREEN_DRAG:
- return screen_drag.index == p_event.screen_drag.index
- && screen_drag.x == p_event.screen_drag.x
- && screen_drag.y == p_event.screen_drag.y;
- case ACTION:
- return action.action == p_event.action.action
- && action.pressed == p_event.action.pressed;
- /* clang-format on */
- default:
- ERR_PRINT("No logic to compare InputEvents of this type, this shouldn't happen.");
- }
+uint32_t InputEvent::get_id() const {
+ return id;
+}
- return false;
+void InputEvent::set_device(int p_device) {
+ device = p_device;
}
-InputEvent::operator String() const {
-
- String str = "Device " + itos(device) + " ID " + itos(ID) + " ";
-
- switch (type) {
-
- case NONE: {
-
- return "Event: None";
- } break;
- case KEY: {
-
- str += "Event: Key ";
- str = str + "Unicode: " + String::chr(key.unicode) + " Scan: " + itos(key.scancode) + " Echo: " + String(key.echo ? "True" : "False") + " Pressed" + String(key.pressed ? "True" : "False") + " Mod: ";
- if (key.mod.shift)
- str += "S";
- if (key.mod.control)
- str += "C";
- if (key.mod.alt)
- str += "A";
- if (key.mod.meta)
- str += "M";
-
- return str;
- } break;
- case MOUSE_MOTION: {
-
- str += "Event: Motion ";
- str = str + " Pos: " + itos(mouse_motion.x) + "," + itos(mouse_motion.y) + " Rel: " + itos(mouse_motion.relative_x) + "," + itos(mouse_motion.relative_y) + " Mask: ";
- for (int i = 0; i < 8; i++) {
-
- if ((1 << i) & mouse_motion.button_mask)
- str += itos(i + 1);
- }
- str += " Mod: ";
- if (key.mod.shift)
- str += "S";
- if (key.mod.control)
- str += "C";
- if (key.mod.alt)
- str += "A";
- if (key.mod.meta)
- str += "M";
-
- return str;
- } break;
- case MOUSE_BUTTON: {
- str += "Event: Button ";
- str = str + "Pressed: " + itos(mouse_button.pressed) + " Pos: " + itos(mouse_button.x) + "," + itos(mouse_button.y) + " Button: " + itos(mouse_button.button_index) + " Mask: ";
- for (int i = 0; i < 8; i++) {
-
- if ((1 << i) & mouse_button.button_mask)
- str += itos(i + 1);
- }
- str += " Mod: ";
- if (key.mod.shift)
- str += "S";
- if (key.mod.control)
- str += "C";
- if (key.mod.alt)
- str += "A";
- if (key.mod.meta)
- str += "M";
-
- str += String(" DoubleClick: ") + (mouse_button.doubleclick ? "Yes" : "No");
-
- return str;
-
- } break;
- case JOYPAD_MOTION: {
- str += "Event: JoypadMotion ";
- str = str + "Axis: " + itos(joy_motion.axis) + " Value: " + rtos(joy_motion.axis_value);
- return str;
-
- } break;
- case JOYPAD_BUTTON: {
- str += "Event: JoypadButton ";
- str = str + "Pressed: " + itos(joy_button.pressed) + " Index: " + itos(joy_button.button_index) + " pressure " + rtos(joy_button.pressure);
- return str;
-
- } break;
- case SCREEN_TOUCH: {
- str += "Event: ScreenTouch ";
- str = str + "Pressed: " + itos(screen_touch.pressed) + " Index: " + itos(screen_touch.index) + " pos " + rtos(screen_touch.x) + "," + rtos(screen_touch.y);
- return str;
-
- } break;
- case SCREEN_DRAG: {
- str += "Event: ScreenDrag ";
- str = str + " Index: " + itos(screen_drag.index) + " pos " + rtos(screen_drag.x) + "," + rtos(screen_drag.y);
- return str;
-
- } break;
- case ACTION: {
- str += "Event: Action: " + InputMap::get_singleton()->get_action_from_id(action.action) + " Pressed: " + itos(action.pressed);
- return str;
-
- } break;
- }
- return "";
+int InputEvent::get_device() const {
+ return device;
}
-void InputEvent::set_as_action(const String &p_action, bool p_pressed) {
+bool InputEvent::is_pressed() const {
- type = ACTION;
- action.action = InputMap::get_singleton()->get_action_id(p_action);
- action.pressed = p_pressed;
+ return false;
}
-bool InputEvent::is_pressed() const {
+bool InputEvent::is_action(const StringName &p_action) const {
- switch (type) {
+ return InputMap::get_singleton()->event_is_action(Ref<InputEvent>((InputEvent *)this), p_action);
+}
- case KEY: return key.pressed;
- case MOUSE_BUTTON: return mouse_button.pressed;
- case JOYPAD_BUTTON: return joy_button.pressed;
- case SCREEN_TOUCH: return screen_touch.pressed;
- case JOYPAD_MOTION: return ABS(joy_motion.axis_value) > 0.5;
- case ACTION: return action.pressed;
- default: {}
- }
+bool InputEvent::is_action_pressed(const StringName &p_action) const {
+
+ return false; // InputMap::get_singleton()->event_is_action(Ref<InputEvent>(this),p_action);
+}
+bool InputEvent::is_action_released(const StringName &p_action) const {
return false;
}
bool InputEvent::is_echo() const {
- return (type == KEY && key.echo);
+ return false;
+}
+
+Ref<InputEvent> InputEvent::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
+
+ return Ref<InputEvent>((InputEvent *)this);
+}
+
+String InputEvent::as_text() const {
+
+ return String();
+}
+
+bool InputEvent::action_match(const Ref<InputEvent> &p_event) const {
+
+ return false;
+}
+
+bool InputEvent::is_action_type() const {
+
+ return false;
+}
+
+#if 0
+if (String(p_method) == "is_action" && p_argidx == 0) {
+
+ List<PropertyInfo> pinfo;
+ GlobalConfig::get_singleton()->get_property_list(&pinfo);
+
+ for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
+ const PropertyInfo &pi = E->get();
+
+ if (!pi.name.begins_with("input/"))
+ continue;
+
+ String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
+ result.insert("\"" + name + "\"");
+ }
+
+} else
+#endif
+
+void InputEvent::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_id", "id"), &InputEvent::set_id);
+ ClassDB::bind_method(D_METHOD("get_id"), &InputEvent::get_id);
+
+ ClassDB::bind_method(D_METHOD("set_device", "device"), &InputEvent::set_device);
+ ClassDB::bind_method(D_METHOD("get_device"), &InputEvent::get_device);
+
+ ClassDB::bind_method(D_METHOD("is_pressed"), &InputEvent::is_pressed);
+ ClassDB::bind_method(D_METHOD("is_action", "action"), &InputEvent::is_action);
+ ClassDB::bind_method(D_METHOD("is_action_pressed", "action"), &InputEvent::is_action_pressed);
+ ClassDB::bind_method(D_METHOD("is_action_released", "action"), &InputEvent::is_action_released);
+ ClassDB::bind_method(D_METHOD("is_echo"), &InputEvent::is_echo);
+
+ ClassDB::bind_method(D_METHOD("as_text"), &InputEvent::as_text);
+
+ ClassDB::bind_method(D_METHOD("action_match", "event:InputEvent"), &InputEvent::action_match);
+
+ ClassDB::bind_method(D_METHOD("is_action_type"), &InputEvent::is_action_type);
+
+ ClassDB::bind_method(D_METHOD("xformed_by:InputEvent", "xform", "local_ofs"), &InputEvent::xformed_by, DEFVAL(Vector2()));
+}
+
+InputEvent::InputEvent() {
+
+ id = 0;
+ device = 0;
+}
+
+//////////////////
+
+void InputEventWithModifiers::set_shift(bool p_enabled) {
+
+ shift = p_enabled;
+}
+
+bool InputEventWithModifiers::get_shift() const {
+
+ return shift;
+}
+
+void InputEventWithModifiers::set_alt(bool p_enabled) {
+
+ alt = p_enabled;
+}
+bool InputEventWithModifiers::get_alt() const {
+
+ return alt;
+}
+
+void InputEventWithModifiers::set_control(bool p_enabled) {
+
+ control = p_enabled;
+}
+bool InputEventWithModifiers::get_control() const {
+
+ return control;
+}
+
+void InputEventWithModifiers::set_metakey(bool p_enabled) {
+
+ meta = p_enabled;
+}
+bool InputEventWithModifiers::get_metakey() const {
+
+ return meta;
+}
+
+void InputEventWithModifiers::set_command(bool p_enabled) {
+
+ command = p_enabled;
+}
+bool InputEventWithModifiers::get_command() const {
+
+ return command;
+}
+
+void InputEventWithModifiers::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_alt", "enable"), &InputEventWithModifiers::set_alt);
+ ClassDB::bind_method(D_METHOD("get_alt"), &InputEventWithModifiers::get_alt);
+
+ ClassDB::bind_method(D_METHOD("set_shift", "enable"), &InputEventWithModifiers::set_shift);
+ ClassDB::bind_method(D_METHOD("get_shift"), &InputEventWithModifiers::get_shift);
+
+ ClassDB::bind_method(D_METHOD("set_control", "enable"), &InputEventWithModifiers::set_control);
+ ClassDB::bind_method(D_METHOD("get_control"), &InputEventWithModifiers::get_control);
+
+ ClassDB::bind_method(D_METHOD("set_metakey", "enable"), &InputEventWithModifiers::set_metakey);
+ ClassDB::bind_method(D_METHOD("get_metakey"), &InputEventWithModifiers::get_metakey);
+
+ ClassDB::bind_method(D_METHOD("set_command", "enable"), &InputEventWithModifiers::set_command);
+ ClassDB::bind_method(D_METHOD("get_command"), &InputEventWithModifiers::get_command);
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "alt"), "set_alt", "get_alt");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shift"), "set_shift", "get_shift");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "control"), "set_control", "get_control");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta"), "set_metakey", "get_metakey");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "command"), "set_command", "get_command");
+}
+
+InputEventWithModifiers::InputEventWithModifiers() {
+
+ alt = false;
+ shift = false;
+ control = false;
+ meta = false;
+}
+
+//////////////////////////////////
+
+void InputEventKey::set_pressed(bool p_pressed) {
+
+ pressed = p_pressed;
+}
+
+bool InputEventKey::is_pressed() const {
+
+ return pressed;
}
-bool InputEvent::is_action(const String &p_action) const {
+void InputEventKey::set_scancode(uint32_t p_scancode) {
+
+ scancode = p_scancode;
+}
+uint32_t InputEventKey::get_scancode() const {
- return InputMap::get_singleton()->event_is_action(*this, p_action);
+ return scancode;
}
-bool InputEvent::is_action_pressed(const String &p_action) const {
+void InputEventKey::set_unicode(uint32_t p_unicode) {
- return is_action(p_action) && is_pressed() && !is_echo();
+ unicode = p_unicode;
}
+uint32_t InputEventKey::get_unicode() const {
-bool InputEvent::is_action_released(const String &p_action) const {
+ return unicode;
+}
+
+void InputEventKey::set_echo(bool p_enable) {
+
+ echo = p_enable;
+}
+bool InputEventKey::is_echo() const {
- return is_action(p_action) && !is_pressed();
+ return echo;
}
uint32_t InputEventKey::get_scancode_with_modifiers() const {
uint32_t sc = scancode;
- if (mod.control)
+ if (get_control())
sc |= KEY_MASK_CTRL;
- if (mod.alt)
+ if (get_alt())
sc |= KEY_MASK_ALT;
- if (mod.shift)
+ if (get_shift())
sc |= KEY_MASK_SHIFT;
- if (mod.meta)
+ if (get_metakey())
sc |= KEY_MASK_META;
return sc;
}
-InputEvent InputEvent::xform_by(const Transform2D &p_xform) const {
-
- InputEvent ev = *this;
-
- switch (ev.type) {
-
- case InputEvent::MOUSE_BUTTON: {
-
- Vector2 g = p_xform.xform(Vector2(ev.mouse_button.global_x, ev.mouse_button.global_y));
- Vector2 l = p_xform.xform(Vector2(ev.mouse_button.x, ev.mouse_button.y));
- ev.mouse_button.x = l.x;
- ev.mouse_button.y = l.y;
- ev.mouse_button.global_x = g.x;
- ev.mouse_button.global_y = g.y;
-
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- Vector2 g = p_xform.xform(Vector2(ev.mouse_motion.global_x, ev.mouse_motion.global_y));
- Vector2 l = p_xform.xform(Vector2(ev.mouse_motion.x, ev.mouse_motion.y));
- Vector2 r = p_xform.basis_xform(Vector2(ev.mouse_motion.relative_x, ev.mouse_motion.relative_y));
- Vector2 s = p_xform.basis_xform(Vector2(ev.mouse_motion.speed_x, ev.mouse_motion.speed_y));
- ev.mouse_motion.x = l.x;
- ev.mouse_motion.y = l.y;
- ev.mouse_motion.global_x = g.x;
- ev.mouse_motion.global_y = g.y;
- ev.mouse_motion.relative_x = r.x;
- ev.mouse_motion.relative_y = r.y;
- ev.mouse_motion.speed_x = s.x;
- ev.mouse_motion.speed_y = s.y;
-
- } break;
- case InputEvent::SCREEN_TOUCH: {
-
- Vector2 t = p_xform.xform(Vector2(ev.screen_touch.x, ev.screen_touch.y));
- ev.screen_touch.x = t.x;
- ev.screen_touch.y = t.y;
-
- } break;
- case InputEvent::SCREEN_DRAG: {
-
- Vector2 t = p_xform.xform(Vector2(ev.screen_drag.x, ev.screen_drag.y));
- Vector2 r = p_xform.basis_xform(Vector2(ev.screen_drag.relative_x, ev.screen_drag.relative_y));
- Vector2 s = p_xform.basis_xform(Vector2(ev.screen_drag.speed_x, ev.screen_drag.speed_y));
- ev.screen_drag.x = t.x;
- ev.screen_drag.y = t.y;
- ev.screen_drag.relative_x = r.x;
- ev.screen_drag.relative_y = r.y;
- ev.screen_drag.speed_x = s.x;
- ev.screen_drag.speed_y = s.y;
- } break;
- }
+bool InputEventKey::action_match(const Ref<InputEvent> &p_event) const {
+
+ Ref<InputEventKey> key = p_event;
+ if (key.is_null())
+ return false;
+
+ return get_scancode_with_modifiers() == key->get_scancode_with_modifiers();
+}
+
+void InputEventKey::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventKey::set_pressed);
+
+ ClassDB::bind_method(D_METHOD("set_scancode", "scancode"), &InputEventKey::set_scancode);
+ ClassDB::bind_method(D_METHOD("get_scancode"), &InputEventKey::get_scancode);
+
+ ClassDB::bind_method(D_METHOD("set_unicode", "unicode"), &InputEventKey::set_unicode);
+ ClassDB::bind_method(D_METHOD("get_unicode"), &InputEventKey::get_unicode);
+
+ ClassDB::bind_method(D_METHOD("set_echo", "echo"), &InputEventKey::set_echo);
+
+ ClassDB::bind_method(D_METHOD("get_scancode_with_modifiers"), &InputEventKey::get_scancode_with_modifiers);
+
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "scancode"), "set_scancode", "get_scancode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "unicode"), "set_unicode", "get_unicode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "echo"), "set_echo", "is_echo");
+}
+
+InputEventKey::InputEventKey() {
+
+ pressed = false;
+ scancode = 0;
+ unicode = 0; ///unicode
+ echo = false;
+}
+
+////////////////////////////////////////
+
+void InputEventMouse::set_button_mask(int p_mask) {
+
+ button_mask = p_mask;
+}
+int InputEventMouse::get_button_mask() const {
+
+ return button_mask;
+}
+
+void InputEventMouse::set_pos(const Vector2 &p_pos) {
+
+ pos = p_pos;
+}
+Vector2 InputEventMouse::get_pos() const {
+
+ return pos;
+}
+
+void InputEventMouse::set_global_pos(const Vector2 &p_global_pos) {
+
+ global_pos = p_global_pos;
+}
+Vector2 InputEventMouse::get_global_pos() const {
+
+ return global_pos;
+}
+
+void InputEventMouse::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_button_mask", "button_mask"), &InputEventMouse::set_button_mask);
+ ClassDB::bind_method(D_METHOD("get_button_mask"), &InputEventMouse::get_button_mask);
+
+ ClassDB::bind_method(D_METHOD("set_pos", "pos"), &InputEventMouse::set_pos);
+ ClassDB::bind_method(D_METHOD("get_pos"), &InputEventMouse::get_pos);
+
+ ClassDB::bind_method(D_METHOD("set_global_pos", "global_pos"), &InputEventMouse::set_global_pos);
+ ClassDB::bind_method(D_METHOD("get_global_pos"), &InputEventMouse::get_global_pos);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "button_mask"), "set_button_mask", "get_button_mask");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "pos"), "set_pos", "get_pos");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "global_pos"), "set_global_pos", "get_global_pos");
+}
+
+InputEventMouse::InputEventMouse() {
+
+ button_mask = 0;
+}
+
+///////////////////////////////////////
+
+void InputEventMouseButton::set_factor(float p_factor) {
+
+ factor = p_factor;
+}
+
+float InputEventMouseButton::get_factor() {
+
+ return factor;
+}
+
+void InputEventMouseButton::set_button_index(int p_index) {
+
+ button_index = p_index;
+}
+int InputEventMouseButton::get_button_index() const {
+
+ return button_index;
+}
+
+void InputEventMouseButton::set_pressed(bool p_pressed) {
+
+ pressed = p_pressed;
+}
+bool InputEventMouseButton::is_pressed() const {
+
+ return pressed;
+}
+
+void InputEventMouseButton::set_doubleclick(bool p_doubleclick) {
+
+ doubleclick = p_doubleclick;
+}
+bool InputEventMouseButton::is_doubleclick() const {
+
+ return doubleclick;
+}
+
+Ref<InputEvent> InputEventMouseButton::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
+
+ Vector2 g = p_xform.xform(get_global_pos());
+ Vector2 l = p_xform.xform(get_pos() + p_local_ofs);
+
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ mb->set_id(get_id());
+ mb->set_device(get_device());
+
+ mb->set_alt(get_alt());
+ mb->set_shift(get_shift());
+ mb->set_control(get_control());
+ mb->set_metakey(get_metakey());
+
+ mb->set_pos(l);
+ mb->set_global_pos(g);
+
+ mb->set_button_mask(get_button_mask());
+ mb->set_pressed(pressed);
+ mb->set_doubleclick(doubleclick);
+ mb->set_factor(factor);
+ mb->set_button_index(button_index);
+
+ return mb;
+}
+
+bool InputEventMouseButton::action_match(const Ref<InputEvent> &p_event) const {
+
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_null())
+ return false;
+
+ return mb->button_index == button_index;
+}
+
+void InputEventMouseButton::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_factor", "factor"), &InputEventMouseButton::set_factor);
+ ClassDB::bind_method(D_METHOD("get_factor"), &InputEventMouseButton::get_factor);
+
+ ClassDB::bind_method(D_METHOD("set_button_index", "button_index"), &InputEventMouseButton::set_button_index);
+ ClassDB::bind_method(D_METHOD("get_button_index"), &InputEventMouseButton::get_button_index);
+
+ ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventMouseButton::set_pressed);
+ // ClassDB::bind_method(D_METHOD("is_pressed"), &InputEventMouseButton::is_pressed);
+
+ ClassDB::bind_method(D_METHOD("set_doubleclick", "doubleclick"), &InputEventMouseButton::set_doubleclick);
+ ClassDB::bind_method(D_METHOD("is_doubleclick"), &InputEventMouseButton::is_doubleclick);
+
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "factor"), "set_factor", "get_factor");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "doubleclick"), "set_doubleclick", "is_doubleclick");
+}
+
+InputEventMouseButton::InputEventMouseButton() {
+
+ factor = 1;
+ button_index = 0;
+ pressed = false;
+ doubleclick = false;
+}
+
+////////////////////////////////////////////
+
+void InputEventMouseMotion::set_relative(const Vector2 &p_relative) {
+
+ relative = p_relative;
+}
+Vector2 InputEventMouseMotion::get_relative() const {
+
+ return relative;
+}
+
+void InputEventMouseMotion::set_speed(const Vector2 &p_speed) {
+
+ speed = p_speed;
+}
+Vector2 InputEventMouseMotion::get_speed() const {
+
+ return speed;
+}
+
+Ref<InputEvent> InputEventMouseMotion::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
+
+ Vector2 g = p_xform.xform(get_global_pos());
+ Vector2 l = p_xform.xform(get_pos() + p_local_ofs);
+ Vector2 r = p_xform.basis_xform(get_relative());
+ Vector2 s = p_xform.basis_xform(get_speed());
+
+ Ref<InputEventMouseMotion> mm;
+ mm.instance();
+
+ mm->set_id(get_id());
+ mm->set_device(get_device());
+
+ mm->set_alt(get_alt());
+ mm->set_shift(get_shift());
+ mm->set_control(get_control());
+ mm->set_metakey(get_metakey());
+
+ mm->set_pos(l);
+ mm->set_global_pos(g);
+
+ mm->set_button_mask(get_button_mask());
+ mm->set_relative(r);
+ mm->set_speed(s);
+
+ return mm;
+}
+
+void InputEventMouseMotion::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_relative", "relative"), &InputEventMouseMotion::set_relative);
+ ClassDB::bind_method(D_METHOD("get_relative"), &InputEventMouseMotion::get_relative);
+
+ ClassDB::bind_method(D_METHOD("set_speed", "speed"), &InputEventMouseMotion::set_speed);
+ ClassDB::bind_method(D_METHOD("get_speed"), &InputEventMouseMotion::get_speed);
+
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "relative"), "set_relative", "get_relative");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "speed"), "set_speed", "get_speed");
+}
+
+InputEventMouseMotion::InputEventMouseMotion() {
+}
+
+////////////////////////////////////////
+
+void InputEventJoypadMotion::set_axis(int p_axis) {
+
+ axis = p_axis;
+}
+
+int InputEventJoypadMotion::get_axis() const {
+
+ return axis;
+}
+
+void InputEventJoypadMotion::set_axis_value(float p_value) {
+
+ axis_value = p_value;
+}
+float InputEventJoypadMotion::get_axis_value() const {
+
+ return axis_value;
+}
+
+bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event) const {
+
+ Ref<InputEventJoypadMotion> jm = p_event;
+ if (jm.is_null())
+ return false;
+
+ return (axis == jm->axis && (axis_value < 0) == (jm->axis_value < 0));
+}
+
+void InputEventJoypadMotion::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_axis", "axis"), &InputEventJoypadMotion::set_axis);
+ ClassDB::bind_method(D_METHOD("get_axis"), &InputEventJoypadMotion::get_axis);
+
+ ClassDB::bind_method(D_METHOD("set_axis_value", "axis_value"), &InputEventJoypadMotion::set_axis_value);
+ ClassDB::bind_method(D_METHOD("get_axis_value"), &InputEventJoypadMotion::get_axis_value);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "axis"), "set_axis", "get_axis");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "axis_value"), "set_axis_value", "get_axis_value");
+}
+
+InputEventJoypadMotion::InputEventJoypadMotion() {
+
+ axis = 0;
+ axis_value = 0;
+}
+/////////////////////////////////
+
+void InputEventJoypadButton::set_button_index(int p_index) {
+
+ button_index = p_index;
+}
+
+int InputEventJoypadButton::get_button_index() const {
+
+ return button_index;
+}
+
+void InputEventJoypadButton::set_pressed(bool p_pressed) {
+
+ pressed = p_pressed;
+}
+bool InputEventJoypadButton::is_pressed() const {
+
+ return pressed;
+}
+
+void InputEventJoypadButton::set_pressure(float p_pressure) {
+
+ pressure = p_pressure;
+}
+float InputEventJoypadButton::get_pressure() const {
+
+ return pressure;
+}
+
+bool InputEventJoypadButton::action_match(const Ref<InputEvent> &p_event) const {
+
+ Ref<InputEventJoypadButton> jb = p_event;
+ if (jb.is_null())
+ return false;
+
+ return button_index == jb->button_index;
+}
+
+void InputEventJoypadButton::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_button_index", "button_index"), &InputEventJoypadButton::set_button_index);
+ ClassDB::bind_method(D_METHOD("get_button_index"), &InputEventJoypadButton::get_button_index);
+
+ ClassDB::bind_method(D_METHOD("set_pressure", "pressure"), &InputEventJoypadButton::set_pressure);
+ ClassDB::bind_method(D_METHOD("get_pressure"), &InputEventJoypadButton::get_pressure);
+
+ ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventJoypadButton::set_pressed);
+ // ClassDB::bind_method(D_METHOD("is_pressed"), &InputEventJoypadButton::is_pressed);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "button_index"), "set_button_index", "get_button_index");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "pressure"), "set_pressure", "get_pressure");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
+}
+
+InputEventJoypadButton::InputEventJoypadButton() {
+
+ button_index = 0;
+ pressure = 0;
+ pressed = false;
+}
+
+//////////////////////////////////////////////
+
+void InputEventScreenTouch::set_index(int p_index) {
+
+ index = p_index;
+}
+int InputEventScreenTouch::get_index() const {
+
+ return index;
+}
+
+void InputEventScreenTouch::set_pos(const Vector2 &p_pos) {
+
+ pos = p_pos;
+}
+Vector2 InputEventScreenTouch::get_pos() const {
+
+ return pos;
+}
+
+void InputEventScreenTouch::set_pressed(bool p_pressed) {
+
+ pressed = p_pressed;
+}
+bool InputEventScreenTouch::is_pressed() const {
+
+ return pressed;
+}
+
+Ref<InputEvent> InputEventScreenTouch::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
+
+ Ref<InputEventScreenTouch> st;
+ st.instance();
+ st->set_id(get_id());
+ st->set_device(get_device());
+ st->set_index(index);
+ st->set_pos(p_xform.xform(pos + p_local_ofs));
+ st->set_pressed(pressed);
+
+ return st;
+}
+
+void InputEventScreenTouch::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_index", "index"), &InputEventScreenTouch::set_index);
+ ClassDB::bind_method(D_METHOD("get_index"), &InputEventScreenTouch::get_index);
+
+ ClassDB::bind_method(D_METHOD("set_pos", "pos"), &InputEventScreenTouch::set_pos);
+ ClassDB::bind_method(D_METHOD("get_pos"), &InputEventScreenTouch::get_pos);
+
+ ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventScreenTouch::set_pressed);
+ //ClassDB::bind_method(D_METHOD("is_pressed"),&InputEventScreenTouch::is_pressed);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "index"), "set_index", "get_index");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "pos"), "set_pos", "get_pos");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
+}
+
+InputEventScreenTouch::InputEventScreenTouch() {
+
+ index = 0;
+ pressed = false;
+}
+
+/////////////////////////////
+
+void InputEventScreenDrag::set_index(int p_index) {
+
+ index = p_index;
+}
+
+int InputEventScreenDrag::get_index() const {
+
+ return index;
+}
+
+void InputEventScreenDrag::set_pos(const Vector2 &p_pos) {
+
+ pos = p_pos;
+}
+Vector2 InputEventScreenDrag::get_pos() const {
+
+ return pos;
+}
+
+void InputEventScreenDrag::set_relative(const Vector2 &p_relative) {
+
+ relative = p_relative;
+}
+Vector2 InputEventScreenDrag::get_relative() const {
+
+ return relative;
+}
+
+void InputEventScreenDrag::set_speed(const Vector2 &p_speed) {
+
+ speed = p_speed;
+}
+Vector2 InputEventScreenDrag::get_speed() const {
+
+ return speed;
+}
+
+Ref<InputEvent> InputEventScreenDrag::xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs) const {
+
+ Ref<InputEventScreenDrag> sd;
+
+ sd.instance();
+
+ sd->set_id(get_id());
+ sd->set_device(get_device());
+
+ sd->set_index(index);
+ sd->set_pos(p_xform.xform(pos + p_local_ofs));
+ sd->set_relative(p_xform.basis_xform(relative));
+ sd->set_speed(p_xform.basis_xform(speed));
+
+ return sd;
+}
+
+void InputEventScreenDrag::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_index", "index"), &InputEventScreenDrag::set_index);
+ ClassDB::bind_method(D_METHOD("get_index"), &InputEventScreenDrag::get_index);
+
+ ClassDB::bind_method(D_METHOD("set_pos", "pos"), &InputEventScreenDrag::set_pos);
+ ClassDB::bind_method(D_METHOD("get_pos"), &InputEventScreenDrag::get_pos);
+
+ ClassDB::bind_method(D_METHOD("set_relative", "relative"), &InputEventScreenDrag::set_relative);
+ ClassDB::bind_method(D_METHOD("get_relative"), &InputEventScreenDrag::get_relative);
+
+ ClassDB::bind_method(D_METHOD("set_speed", "speed"), &InputEventScreenDrag::set_speed);
+ ClassDB::bind_method(D_METHOD("get_speed"), &InputEventScreenDrag::get_speed);
+
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "index"), "set_index", "get_index");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "pos"), "set_pos", "get_pos");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "relative"), "set_relative", "get_relative");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "speed"), "set_speed", "get_speed");
+}
+
+InputEventScreenDrag::InputEventScreenDrag() {
+
+ index = 0;
+}
+/////////////////////////////
+
+void InputEventAction::set_action(const StringName &p_action) {
+
+ action = p_action;
+}
+StringName InputEventAction::get_action() const {
+
+ return action;
+}
+
+void InputEventAction::set_pressed(bool p_pressed) {
+
+ pressed = p_pressed;
+}
+bool InputEventAction::is_pressed() const {
+
+ return pressed;
+}
+
+bool InputEventAction::is_action(const StringName &p_action) const {
+
+ return action == p_action;
+}
+
+void InputEventAction::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("set_action", "action"), &InputEventAction::set_action);
+ ClassDB::bind_method(D_METHOD("get_action"), &InputEventAction::get_action);
+
+ ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventAction::set_pressed);
+ //ClassDB::bind_method(D_METHOD("is_pressed"), &InputEventAction::is_pressed);
+
+ // ClassDB::bind_method(D_METHOD("is_action", "name"), &InputEventAction::is_action);
+
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "action"), "set_action", "get_action");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
+}
- return ev;
+InputEventAction::InputEventAction() {
+ pressed = false;
}
diff --git a/core/os/input_event.h b/core/os/input_event.h
index 93cceac27c..31f88b295b 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -32,6 +32,7 @@
#include "math_2d.h"
#include "os/copymem.h"
+#include "resource.h"
#include "typedefs.h"
#include "ustring.h"
/**
@@ -137,7 +138,40 @@ enum {
* Input Modifier Status
* for keyboard/mouse events.
*/
-struct InputModifierState {
+
+class InputEvent : public Resource {
+ GDCLASS(InputEvent, Resource)
+
+ uint32_t id;
+ int device;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_id(uint32_t p_id);
+ uint32_t get_id() const;
+
+ void set_device(int p_device);
+ int get_device() const;
+
+ virtual bool is_pressed() const;
+ virtual bool is_action(const StringName &p_action) const;
+ virtual bool is_action_pressed(const StringName &p_action) const;
+ virtual bool is_action_released(const StringName &p_action) const;
+ virtual bool is_echo() const;
+ virtual String as_text() const;
+
+ virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+
+ virtual bool action_match(const Ref<InputEvent> &p_event) const;
+ virtual bool is_action_type() const;
+
+ InputEvent();
+};
+
+class InputEventWithModifiers : public InputEvent {
+ GDCLASS(InputEventWithModifiers, InputEvent)
bool shift;
bool alt;
@@ -157,126 +191,267 @@ struct InputModifierState {
#endif
- bool operator==(const InputModifierState &rvalue) const {
+protected:
+ static void _bind_methods();
+
+public:
+ void set_shift(bool p_enabled);
+ bool get_shift() const;
+
+ void set_alt(bool p_enabled);
+ bool get_alt() const;
+
+ void set_control(bool p_enabled);
+ bool get_control() const;
+
+ void set_metakey(bool p_enabled);
+ bool get_metakey() const;
- return ((shift == rvalue.shift) && (alt == rvalue.alt) && (control == rvalue.control) && (meta == rvalue.meta));
- }
+ void set_command(bool p_enabled);
+ bool get_command() const;
+
+ InputEventWithModifiers();
};
-struct InputEventKey {
+class InputEventKey : public InputEventWithModifiers {
- InputModifierState mod;
+ GDCLASS(InputEventKey, InputEventWithModifiers)
bool pressed; /// otherwise release
uint32_t scancode; ///< check keyboard.h , KeyCode enum, without modifier masks
uint32_t unicode; ///unicode
+ bool echo; /// true if this is an echo key
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_pressed(bool p_pressed);
+ virtual bool is_pressed() const;
+
+ void set_scancode(uint32_t p_scancode);
+ uint32_t get_scancode() const;
+
+ void set_unicode(uint32_t p_unicode);
+ uint32_t get_unicode() const;
+
+ void set_echo(bool p_enable);
+ virtual bool is_echo() const;
+
uint32_t get_scancode_with_modifiers() const;
- bool echo; /// true if this is an echo key
+ virtual bool action_match(const Ref<InputEvent> &p_event) const;
+
+ virtual bool is_action_type() const { return true; }
+
+ InputEventKey();
};
-struct InputEventMouse {
+class InputEventMouse : public InputEventWithModifiers {
+
+ GDCLASS(InputEventMouse, InputEventWithModifiers)
- InputModifierState mod;
int button_mask;
- float x, y;
- float global_x, global_y;
- int pointer_index;
+
+ Vector2 pos;
+ Vector2 global_pos;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_button_mask(int p_mask);
+ int get_button_mask() const;
+
+ void set_pos(const Vector2 &p_pos);
+ Vector2 get_pos() const;
+
+ void set_global_pos(const Vector2 &p_global_pos);
+ Vector2 get_global_pos() const;
+
+ InputEventMouse();
};
-struct InputEventMouseButton : public InputEventMouse {
+class InputEventMouseButton : public InputEventMouse {
+
+ GDCLASS(InputEventMouseButton, InputEventMouse)
- double factor;
+ float factor;
int button_index;
bool pressed; //otherwise released
bool doubleclick; //last even less than doubleclick time
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_factor(float p_factor);
+ float get_factor();
+
+ void set_button_index(int p_index);
+ int get_button_index() const;
+
+ void set_pressed(bool p_pressed);
+ virtual bool is_pressed() const;
+
+ void set_doubleclick(bool p_doubleclick);
+ bool is_doubleclick() const;
+
+ virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+ virtual bool action_match(const Ref<InputEvent> &p_event) const;
+
+ virtual bool is_action_type() const { return true; }
+
+ InputEventMouseButton();
};
-struct InputEventMouseMotion : public InputEventMouse {
+class InputEventMouseMotion : public InputEventMouse {
+
+ GDCLASS(InputEventMouseMotion, InputEventMouse)
+ Vector2 relative;
+ Vector2 speed;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_relative(const Vector2 &p_relative);
+ Vector2 get_relative() const;
+
+ void set_speed(const Vector2 &p_speed);
+ Vector2 get_speed() const;
+
+ virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
- float relative_x, relative_y;
- float speed_x, speed_y;
+ InputEventMouseMotion();
};
-struct InputEventJoypadMotion {
+class InputEventJoypadMotion : public InputEvent {
+ GDCLASS(InputEventJoypadMotion, InputEvent)
int axis; ///< Joypad axis
float axis_value; ///< -1 to 1
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_axis(int p_axis);
+ int get_axis() const;
+
+ void set_axis_value(float p_value);
+ float get_axis_value() const;
+
+ virtual bool action_match(const Ref<InputEvent> &p_event) const;
+
+ virtual bool is_action_type() const { return true; }
+
+ InputEventJoypadMotion();
};
-struct InputEventJoypadButton {
+class InputEventJoypadButton : public InputEvent {
+ GDCLASS(InputEventJoypadButton, InputEvent)
int button_index;
bool pressed;
float pressure; //0 to 1
-};
+protected:
+ static void _bind_methods();
+
+public:
+ void set_button_index(int p_index);
+ int get_button_index() const;
+
+ void set_pressed(bool p_pressed);
+ virtual bool is_pressed() const;
+
+ void set_pressure(float p_pressure);
+ float get_pressure() const;
-struct InputEventScreenTouch {
+ virtual bool action_match(const Ref<InputEvent> &p_event) const;
+ virtual bool is_action_type() const { return true; }
+
+ InputEventJoypadButton();
+};
+
+class InputEventScreenTouch : public InputEvent {
+ GDCLASS(InputEventScreenTouch, InputEvent)
int index;
- float x, y;
+ Vector2 pos;
bool pressed;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_index(int p_index);
+ int get_index() const;
+
+ void set_pos(const Vector2 &p_pos);
+ Vector2 get_pos() const;
+
+ void set_pressed(bool p_pressed);
+ virtual bool is_pressed() const;
+
+ virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+
+ InputEventScreenTouch();
};
-struct InputEventScreenDrag {
+class InputEventScreenDrag : public InputEvent {
+
+ GDCLASS(InputEventScreenDrag, InputEvent)
int index;
- float x, y;
- float relative_x, relative_y;
- float speed_x, speed_y;
+ Vector2 pos;
+ Vector2 relative;
+ Vector2 speed;
+
+protected:
+ static void _bind_methods();
+
+public:
+ void set_index(int p_index);
+ int get_index() const;
+
+ void set_pos(const Vector2 &p_pos);
+ Vector2 get_pos() const;
+
+ void set_relative(const Vector2 &p_relative);
+ Vector2 get_relative() const;
+
+ void set_speed(const Vector2 &p_speed);
+ Vector2 get_speed() const;
+
+ virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+
+ InputEventScreenDrag();
};
-struct InputEventAction {
+class InputEventAction : public InputEvent {
+
+ GDCLASS(InputEventAction, InputEvent)
- int action;
+ StringName action;
bool pressed;
-};
-struct InputEvent {
-
- enum Type {
- NONE,
- KEY,
- MOUSE_MOTION,
- MOUSE_BUTTON,
- JOYPAD_MOTION,
- JOYPAD_BUTTON,
- SCREEN_TOUCH,
- SCREEN_DRAG,
- ACTION,
- TYPE_MAX
- };
+protected:
+ static void _bind_methods();
- uint32_t ID;
- int type;
- int device;
+public:
+ void set_action(const StringName &p_action);
+ StringName get_action() const;
- union {
- InputEventMouseMotion mouse_motion;
- InputEventMouseButton mouse_button;
- InputEventJoypadMotion joy_motion;
- InputEventJoypadButton joy_button;
- InputEventKey key;
- InputEventScreenTouch screen_touch;
- InputEventScreenDrag screen_drag;
- InputEventAction action;
- };
+ void set_pressed(bool p_pressed);
+ virtual bool is_pressed() const;
+
+ virtual bool is_action(const StringName &p_action) const;
+
+ virtual bool is_action_type() const { return true; }
- bool is_pressed() const;
- bool is_action(const String &p_action) const;
- bool is_action_pressed(const String &p_action) const;
- bool is_action_released(const String &p_action) const;
- bool is_echo() const;
- void set_as_action(const String &p_action, bool p_pressed);
-
- InputEvent xform_by(const Transform2D &p_xform) const;
- bool operator==(const InputEvent &p_event) const;
- operator String() const;
- InputEvent() {
- zeromem(this, sizeof(InputEvent));
- mouse_button.factor = 1;
- }
+ InputEventAction();
};
#endif
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 9f8fcccd82..248f5537c6 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -39,7 +39,7 @@ void MainLoop::_bind_methods() {
ClassDB::bind_method(D_METHOD("idle", "delta"), &MainLoop::idle);
ClassDB::bind_method(D_METHOD("finish"), &MainLoop::finish);
- BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::INPUT_EVENT, "ev")));
+ BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "ev", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo("_input_text", PropertyInfo(Variant::STRING, "text")));
BIND_VMETHOD(MethodInfo("_initialize"));
BIND_VMETHOD(MethodInfo("_iteration", PropertyInfo(Variant::REAL, "delta")));
@@ -73,7 +73,7 @@ void MainLoop::input_text(const String &p_text) {
get_script_instance()->call("_input_text", p_text);
}
-void MainLoop::input_event(const InputEvent &p_event) {
+void MainLoop::input_event(const Ref<InputEvent> &p_event) {
if (get_script_instance())
get_script_instance()->call("_input_event", p_event);
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index a53137afa4..23b352468e 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -59,7 +59,7 @@ public:
NOTIFICATION_TRANSLATION_CHANGED = 10,
};
- virtual void input_event(const InputEvent &p_event);
+ virtual void input_event(const Ref<InputEvent> &p_event);
virtual void input_text(const String &p_text);
virtual void init();
diff --git a/core/os/os.cpp b/core/os/os.cpp
index e323e03829..8bee725813 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -389,7 +389,7 @@ void OS::_ensure_data_dir() {
memdelete(da);
}
-void OS::set_icon(const Image &p_icon) {
+void OS::set_icon(const Ref<Image> &p_icon) {
}
String OS::get_model_name() const {
diff --git a/core/os/os.h b/core/os/os.h
index ff2a24f40d..037ce436c1 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -31,6 +31,7 @@
#define OS_H
#include "engine.h"
+#include "image.h"
#include "list.h"
#include "os/main_loop.h"
#include "power.h"
@@ -357,7 +358,7 @@ public:
virtual void make_rendering_thread();
virtual void swap_buffers();
- virtual void set_icon(const Image &p_icon);
+ virtual void set_icon(const Ref<Image> &p_icon);
virtual int get_exit_code() const;
virtual void set_exit_code(int p_code);
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index addb0841f4..0565d0d3f5 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -237,8 +237,6 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
case Variant::RECT3:
case Variant::BASIS:
case Variant::TRANSFORM:
- case Variant::IMAGE:
- case Variant::INPUT_EVENT:
case Variant::POOL_BYTE_ARRAY:
case Variant::POOL_INT_ARRAY:
case Variant::POOL_REAL_ARRAY:
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 4d12e42895..b089ba9129 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -108,6 +108,20 @@ void register_core_types() {
ClassDB::register_class<Reference>();
ClassDB::register_class<WeakRef>();
ClassDB::register_class<Resource>();
+ ClassDB::register_class<Image>();
+
+ ClassDB::register_virtual_class<InputEvent>();
+ ClassDB::register_virtual_class<InputEventWithModifiers>();
+ ClassDB::register_class<InputEventKey>();
+ ClassDB::register_virtual_class<InputEventMouse>();
+ ClassDB::register_class<InputEventMouseButton>();
+ ClassDB::register_class<InputEventMouseMotion>();
+ ClassDB::register_class<InputEventJoypadButton>();
+ ClassDB::register_class<InputEventJoypadMotion>();
+ ClassDB::register_class<InputEventScreenDrag>();
+ ClassDB::register_class<InputEventScreenTouch>();
+ ClassDB::register_class<InputEventAction>();
+
ClassDB::register_class<FuncRef>();
ClassDB::register_virtual_class<StreamPeer>();
ClassDB::register_class<StreamPeerBuffer>();
diff --git a/core/resource.cpp b/core/resource.cpp
index aa070558f5..559d4c1201 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -185,7 +185,7 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res
return Ref<Resource>(r);
}
-Ref<Resource> Resource::duplicate(bool p_subresources) {
+Ref<Resource> Resource::duplicate(bool p_subresources) const {
List<PropertyInfo> plist;
get_property_list(&plist);
diff --git a/core/resource.h b/core/resource.h
index ab3404df8f..903edeff52 100644
--- a/core/resource.h
+++ b/core/resource.h
@@ -103,7 +103,7 @@ public:
void set_subindex(int p_sub_index);
int get_subindex() const;
- Ref<Resource> duplicate(bool p_subresources = false);
+ virtual Ref<Resource> duplicate(bool p_subresources = false) const;
Ref<Resource> duplicate_for_local_scene(Node *p_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache);
void set_local_to_scene(bool p_enable);
diff --git a/core/ring_buffer.h b/core/ring_buffer.h
index d5085e9560..8b32bb5e10 100644
--- a/core/ring_buffer.h
+++ b/core/ring_buffer.h
@@ -101,6 +101,32 @@ public:
return p_size;
};
+ int find(const T &t, int p_offset, int p_max_size) {
+
+ int left = data_left();
+ if ((p_offset + p_max_size) > left) {
+ p_max_size -= left - p_offset;
+ if (p_max_size <= 0)
+ return 0;
+ }
+ p_max_size = MIN(left, p_max_size);
+ int pos = read_pos;
+ inc(pos, p_offset);
+ int to_read = p_max_size;
+ while (to_read) {
+ int end = pos + to_read;
+ end = MIN(end, size());
+ int total = end - pos;
+ for (int i = 0; i < total; i++) {
+ if (data[pos + i] == t)
+ return i + (p_max_size - to_read);
+ };
+ to_read -= total;
+ pos = 0;
+ }
+ return -1;
+ }
+
inline int advance_read(int p_n) {
p_n = MIN(p_n, data_left());
inc(read_pos, p_n);
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index bd0352b7a4..f230a4bc95 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -586,9 +586,7 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) {
packet_peer_stream->put_var(E->get().hint);
packet_peer_stream->put_var(E->get().hint_string);
//only send information that can be sent..
- if (var.get_type() == Variant::IMAGE) {
- var = Image();
- }
+
if (var.get_type() >= Variant::DICTIONARY) {
var = Array(); //send none for now, may be to big
}
diff --git a/core/variant.cpp b/core/variant.cpp
index 67ce8af483..ae5141b8bf 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -120,11 +120,6 @@ String Variant::get_type_name(Variant::Type p_type) {
return "Color";
} break;
- case IMAGE: {
-
- return "Image";
-
- } break;
case _RID: {
return "RID";
@@ -138,11 +133,6 @@ String Variant::get_type_name(Variant::Type p_type) {
return "NodePath";
} break;
- case INPUT_EVENT: {
-
- return "InputEvent";
-
- } break;
case DICTIONARY: {
return "Dictionary";
@@ -249,7 +239,6 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
static const Type invalid[] = {
OBJECT,
- IMAGE,
NIL
};
@@ -791,11 +780,6 @@ bool Variant::is_zero() const {
return *reinterpret_cast<const Color *>(_data._mem) == Color();
} break;
- case IMAGE: {
-
- return _data._image->empty();
-
- } break;
case _RID: {
return *reinterpret_cast<const RID *>(_data._mem) == RID();
@@ -809,11 +793,6 @@ bool Variant::is_zero() const {
return reinterpret_cast<const NodePath *>(_data._mem)->is_empty();
} break;
- case INPUT_EVENT: {
-
- return _data._input_event->type == InputEvent::NONE;
-
- } break;
case DICTIONARY: {
return reinterpret_cast<const Dictionary *>(_data._mem)->empty();
@@ -1016,11 +995,6 @@ void Variant::reference(const Variant &p_variant) {
memnew_placement(_data._mem, Color(*reinterpret_cast<const Color *>(p_variant._data._mem)));
} break;
- case IMAGE: {
-
- _data._image = memnew(Image(*p_variant._data._image));
-
- } break;
case _RID: {
memnew_placement(_data._mem, RID(*reinterpret_cast<const RID *>(p_variant._data._mem)));
@@ -1034,11 +1008,6 @@ void Variant::reference(const Variant &p_variant) {
memnew_placement(_data._mem, NodePath(*reinterpret_cast<const NodePath *>(p_variant._data._mem)));
} break;
- case INPUT_EVENT: {
-
- _data._input_event = memnew(InputEvent(*p_variant._data._input_event));
-
- } break;
case DICTIONARY: {
memnew_placement(_data._mem, Dictionary(*reinterpret_cast<const Dictionary *>(p_variant._data._mem)));
@@ -1141,11 +1110,6 @@ void Variant::clear() {
} break;
// misc types
- case IMAGE: {
-
- memdelete(_data._image);
-
- } break;
case NODE_PATH: {
reinterpret_cast<NodePath *>(_data._mem)->~NodePath();
@@ -1170,12 +1134,6 @@ void Variant::clear() {
reinterpret_cast<Array *>(_data._mem)->~Array();
} break;
- case INPUT_EVENT: {
-
- memdelete(_data._input_event);
-
- } break;
-
// arrays
case POOL_BYTE_ARRAY: {
@@ -1524,7 +1482,6 @@ Variant::operator String() const {
} break;
case TRANSFORM: return operator Transform();
case NODE_PATH: return operator NodePath();
- case INPUT_EVENT: return operator InputEvent();
case COLOR: return String::num(operator Color().r) + "," + String::num(operator Color().g) + "," + String::num(operator Color().b) + "," + String::num(operator Color().a);
case DICTIONARY: {
@@ -1760,13 +1717,6 @@ Variant::operator Color() const {
else
return Color();
}
-Variant::operator Image() const {
-
- if (type == IMAGE)
- return *_data._image;
- else
- return Image();
-}
Variant::operator NodePath() const {
@@ -1826,14 +1776,6 @@ Variant::operator Control *() const {
return NULL;
}
-Variant::operator InputEvent() const {
-
- if (type == INPUT_EVENT)
- return *reinterpret_cast<const InputEvent *>(_data._input_event);
- else
- return InputEvent();
-}
-
Variant::operator Dictionary() const {
if (type == DICTIONARY)
@@ -2306,11 +2248,6 @@ Variant::Variant(const Color &p_color) {
type = COLOR;
memnew_placement(_data._mem, Color(p_color));
}
-Variant::Variant(const Image &p_image) {
-
- type = IMAGE;
- _data._image = memnew(Image(p_image));
-}
Variant::Variant(const NodePath &p_node_path) {
@@ -2318,12 +2255,6 @@ Variant::Variant(const NodePath &p_node_path) {
memnew_placement(_data._mem, NodePath(p_node_path));
}
-Variant::Variant(const InputEvent &p_input_event) {
-
- type = INPUT_EVENT;
- _data._input_event = memnew(InputEvent(p_input_event));
-}
-
Variant::Variant(const RefPtr &p_resource) {
type = OBJECT;
@@ -2711,11 +2642,6 @@ uint32_t Variant::hash() const {
return hash_djb2_one_float(reinterpret_cast<const Color *>(_data._mem)->a, hash);
} break;
- case IMAGE: {
-
- return 0;
-
- } break;
case _RID: {
return hash_djb2_one_64(reinterpret_cast<const RID *>(_data._mem)->get_id());
@@ -2728,11 +2654,6 @@ uint32_t Variant::hash() const {
return reinterpret_cast<const NodePath *>(_data._mem)->hash();
} break;
- case INPUT_EVENT: {
-
- return hash_djb2_buffer((uint8_t *)_data._input_event, sizeof(InputEvent));
-
- } break;
case DICTIONARY: {
return reinterpret_cast<const Dictionary *>(_data._mem)->hash();
diff --git a/core/variant.h b/core/variant.h
index e1a2b89a07..661d31cf16 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -39,11 +39,9 @@
#include "dictionary.h"
#include "dvector.h"
#include "face3.h"
-#include "image.h"
#include "io/ip_address.h"
#include "math_2d.h"
#include "matrix3.h"
-#include "os/input_event.h"
#include "os/power.h"
#include "path_db.h"
#include "plane.h"
@@ -92,26 +90,24 @@ public:
TRANSFORM2D,
PLANE,
QUAT, // 10
- RECT3, //sorry naming convention fail :( not like it's used often
+ RECT3,
BASIS,
TRANSFORM,
// misc types
COLOR,
- IMAGE, // 15
- NODE_PATH,
+ NODE_PATH, // 15
_RID,
OBJECT,
- INPUT_EVENT,
- DICTIONARY, // 20
- ARRAY,
+ DICTIONARY,
+ ARRAY, // 20
// arrays
POOL_BYTE_ARRAY,
POOL_INT_ARRAY,
POOL_REAL_ARRAY,
- POOL_STRING_ARRAY, // 25
- POOL_VECTOR2_ARRAY,
+ POOL_STRING_ARRAY,
+ POOL_VECTOR2_ARRAY, // 25
POOL_VECTOR3_ARRAY,
POOL_COLOR_ARRAY,
@@ -145,8 +141,6 @@ private:
Basis *_basis;
Transform *_transform;
RefPtr *_resource;
- InputEvent *_input_event;
- Image *_image;
void *_ptr; //generic pointer
uint8_t _mem[sizeof(ObjData) > (sizeof(real_t) * 4) ? sizeof(ObjData) : (sizeof(real_t) * 4)];
} _data;
@@ -207,11 +201,10 @@ public:
operator Transform2D() const;
operator Color() const;
- operator Image() const;
operator NodePath() const;
operator RefPtr() const;
operator RID() const;
- operator InputEvent() const;
+
operator Object *() const;
operator Node *() const;
operator Control *() const;
@@ -276,12 +269,10 @@ public:
Variant(const Transform2D &p_transform);
Variant(const Transform &p_transform);
Variant(const Color &p_color);
- Variant(const Image &p_image);
Variant(const NodePath &p_path);
Variant(const RefPtr &p_resource);
Variant(const RID &p_rid);
Variant(const Object *p_object);
- Variant(const InputEvent &p_input_event);
Variant(const Dictionary &p_dictionary);
Variant(const Array &p_array);
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index beaee188eb..6568dc877e 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -37,9 +37,6 @@
typedef void (*VariantFunc)(Variant &r_ret, Variant &p_self, const Variant **p_args);
typedef void (*VariantConstructFunc)(Variant &r_ret, const Variant **p_args);
-VARIANT_ENUM_CAST(Image::CompressMode);
-//VARIANT_ENUM_CAST(Image::Format);
-
struct _VariantCall {
static void Vector3_dot(Variant &r_ret, Variant &p_self, const Variant **p_args) {
@@ -614,22 +611,6 @@ struct _VariantCall {
#define VCALL_PTR5R(m_type, m_method) \
static void _call_##m_type##_##m_method(Variant &r_ret, Variant &p_self, const Variant **p_args) { r_ret = reinterpret_cast<m_type *>(p_self._data._ptr)->m_method(*p_args[0], *p_args[1], *p_args[2], *p_args[3], *p_args[4]); }
- VCALL_PTR0R(Image, get_format);
- VCALL_PTR0R(Image, get_width);
- VCALL_PTR0R(Image, get_height);
- VCALL_PTR0R(Image, empty);
- VCALL_PTR0R(Image, get_used_rect);
- VCALL_PTR1R(Image, load);
- VCALL_PTR1R(Image, save_png);
- VCALL_PTR1R(Image, get_rect);
- VCALL_PTR1R(Image, compressed);
- VCALL_PTR0R(Image, decompressed);
- VCALL_PTR3R(Image, resized);
- VCALL_PTR0R(Image, get_data);
- VCALL_PTR3(Image, blit_rect);
- VCALL_PTR1R(Image, converted);
- VCALL_PTR0(Image, fix_alpha_edges);
-
VCALL_PTR0R(Rect3, get_area);
VCALL_PTR0R(Rect3, has_no_area);
VCALL_PTR0R(Rect3, has_no_surface);
@@ -756,13 +737,6 @@ struct _VariantCall {
VCALL_PTR1( Transform, translate );
VCALL_PTR0( Transform, orthonormalize ); */
- VCALL_PTR0R(InputEvent, is_pressed);
- VCALL_PTR1R(InputEvent, is_action);
- VCALL_PTR1R(InputEvent, is_action_pressed);
- VCALL_PTR1R(InputEvent, is_action_released);
- VCALL_PTR0R(InputEvent, is_echo);
- VCALL_PTR2(InputEvent, set_as_action);
-
struct ConstructData {
int arg_count;
@@ -901,11 +875,6 @@ struct _VariantCall {
r_ret = Transform(p_args[0]->operator Basis(), p_args[1]->operator Vector3());
}
- static void Image_init1(Variant &r_ret, const Variant **p_args) {
-
- r_ret = Image(*p_args[0], *p_args[1], *p_args[2], Image::Format(p_args[3]->operator int()));
- }
-
static void add_constructor(VariantConstructFunc p_func, const Variant::Type p_type,
const String &p_name1 = "", const Variant::Type p_type1 = Variant::NIL,
const String &p_name2 = "", const Variant::Type p_type2 = Variant::NIL,
@@ -1056,12 +1025,10 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
// misc types
case COLOR: return Color();
- case IMAGE: return Image();
case NODE_PATH:
return NodePath(); // 15
case _RID: return RID();
case OBJECT: return (Object *)NULL;
- case INPUT_EVENT: return InputEvent();
case DICTIONARY: return Dictionary();
case ARRAY:
return Array(); // 20
@@ -1138,12 +1105,10 @@ Variant Variant::construct(const Variant::Type p_type, const Variant **p_args, i
// misc types
case COLOR: return p_args[0]->type == Variant::STRING ? Color::html(*p_args[0]) : Color::hex(*p_args[0]);
- case IMAGE: return (Image(*p_args[0]));
case NODE_PATH:
return (NodePath(p_args[0]->operator NodePath())); // 15
case _RID: return (RID(*p_args[0]));
case OBJECT: return ((Object *)(p_args[0]->operator Object *()));
- case INPUT_EVENT: return (InputEvent(*p_args[0]));
case DICTIONARY: return p_args[0]->operator Dictionary();
case ARRAY:
return p_args[0]->operator Array(); // 20
@@ -1486,7 +1451,6 @@ void register_variant_methods() {
ADDFUNC1(VECTOR3, BASIS, Vector3, outer, VECTOR3, "b", varray());
ADDFUNC0(VECTOR3, BASIS, Vector3, to_diagonal_matrix, varray());
ADDFUNC0(VECTOR3, VECTOR3, Vector3, abs, varray());
- ADDFUNC0(VECTOR3, VECTOR3, Vector3, abs, varray());
ADDFUNC0(VECTOR3, VECTOR3, Vector3, floor, varray());
ADDFUNC0(VECTOR3, VECTOR3, Vector3, ceil, varray());
ADDFUNC1(VECTOR3, REAL, Vector3, distance_to, VECTOR3, "b", varray());
@@ -1527,22 +1491,6 @@ void register_variant_methods() {
ADDFUNC1(COLOR, COLOR, Color, blend, COLOR, "over", varray());
ADDFUNC1(COLOR, STRING, Color, to_html, BOOL, "with_alpha", varray(true));
- ADDFUNC0(IMAGE, INT, Image, get_format, varray());
- ADDFUNC0(IMAGE, INT, Image, get_width, varray());
- ADDFUNC0(IMAGE, INT, Image, get_height, varray());
- ADDFUNC0(IMAGE, BOOL, Image, empty, varray());
- ADDFUNC1(IMAGE, INT, Image, load, STRING, "path", varray(0));
- ADDFUNC1(IMAGE, INT, Image, save_png, STRING, "path", varray(0));
- ADDFUNC0(IMAGE, RECT2, Image, get_used_rect, varray(0));
- ADDFUNC1(IMAGE, IMAGE, Image, get_rect, RECT2, "area", varray(0));
- ADDFUNC1(IMAGE, IMAGE, Image, compressed, INT, "format", varray(0));
- ADDFUNC0(IMAGE, IMAGE, Image, decompressed, varray(0));
- ADDFUNC3(IMAGE, IMAGE, Image, resized, INT, "x", INT, "y", INT, "interpolation", varray(((int)Image::INTERPOLATE_BILINEAR)));
- ADDFUNC0(IMAGE, POOL_BYTE_ARRAY, Image, get_data, varray());
- ADDFUNC3(IMAGE, NIL, Image, blit_rect, IMAGE, "src", RECT2, "src_rect", VECTOR2, "dest", varray(0));
- ADDFUNC1(IMAGE, IMAGE, Image, converted, INT, "format", varray(0));
- ADDFUNC0(IMAGE, NIL, Image, fix_alpha_edges, varray());
-
ADDFUNC0(_RID, INT, RID, get_id, varray());
ADDFUNC0(NODE_PATH, BOOL, NodePath, is_absolute, varray());
@@ -1733,13 +1681,6 @@ void register_variant_methods() {
_VariantCall::type_funcs[Variant::TRANSFORM].functions["xform_inv"].returns = true;
#endif
- ADDFUNC0(INPUT_EVENT, BOOL, InputEvent, is_pressed, varray());
- ADDFUNC1(INPUT_EVENT, BOOL, InputEvent, is_action, STRING, "action", varray());
- ADDFUNC1(INPUT_EVENT, BOOL, InputEvent, is_action_pressed, STRING, "action", varray());
- ADDFUNC1(INPUT_EVENT, BOOL, InputEvent, is_action_released, STRING, "action", varray());
- ADDFUNC0(INPUT_EVENT, BOOL, InputEvent, is_echo, varray());
- ADDFUNC2(INPUT_EVENT, NIL, InputEvent, set_as_action, STRING, "action", BOOL, "pressed", varray());
-
/* REGISTER CONSTRUCTORS */
_VariantCall::add_constructor(_VariantCall::Vector2_init1, Variant::VECTOR2, "x", Variant::REAL, "y", Variant::REAL);
@@ -1771,73 +1712,11 @@ void register_variant_methods() {
_VariantCall::add_constructor(_VariantCall::Transform_init1, Variant::TRANSFORM, "x_axis", Variant::VECTOR3, "y_axis", Variant::VECTOR3, "z_axis", Variant::VECTOR3, "origin", Variant::VECTOR3);
_VariantCall::add_constructor(_VariantCall::Transform_init2, Variant::TRANSFORM, "basis", Variant::BASIS, "origin", Variant::VECTOR3);
- _VariantCall::add_constructor(_VariantCall::Image_init1, Variant::IMAGE, "width", Variant::INT, "height", Variant::INT, "mipmaps", Variant::BOOL, "format", Variant::INT);
-
/* REGISTER CONSTANTS */
_VariantCall::add_constant(Variant::VECTOR3, "AXIS_X", Vector3::AXIS_X);
_VariantCall::add_constant(Variant::VECTOR3, "AXIS_Y", Vector3::AXIS_Y);
_VariantCall::add_constant(Variant::VECTOR3, "AXIS_Z", Vector3::AXIS_Z);
-
- _VariantCall::add_constant(Variant::INPUT_EVENT, "NONE", InputEvent::NONE);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "KEY", InputEvent::KEY);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "MOUSE_MOTION", InputEvent::MOUSE_MOTION);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "MOUSE_BUTTON", InputEvent::MOUSE_BUTTON);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "JOYPAD_MOTION", InputEvent::JOYPAD_MOTION);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "JOYPAD_BUTTON", InputEvent::JOYPAD_BUTTON);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "SCREEN_TOUCH", InputEvent::SCREEN_TOUCH);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "SCREEN_DRAG", InputEvent::SCREEN_DRAG);
- _VariantCall::add_constant(Variant::INPUT_EVENT, "ACTION", InputEvent::ACTION);
-
- _VariantCall::add_constant(Variant::IMAGE, "COMPRESS_16BIT", Image::COMPRESS_16BIT);
- _VariantCall::add_constant(Variant::IMAGE, "COMPRESS_S3TC", Image::COMPRESS_S3TC);
- _VariantCall::add_constant(Variant::IMAGE, "COMPRESS_PVRTC2", Image::COMPRESS_PVRTC2);
- _VariantCall::add_constant(Variant::IMAGE, "COMPRESS_PVRTC4", Image::COMPRESS_PVRTC4);
- _VariantCall::add_constant(Variant::IMAGE, "COMPRESS_ETC", Image::COMPRESS_ETC);
- _VariantCall::add_constant(Variant::IMAGE, "COMPRESS_ETC2", Image::COMPRESS_ETC2);
-
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_L8", Image::FORMAT_L8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_LA8", Image::FORMAT_LA8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_R8", Image::FORMAT_R8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RG8", Image::FORMAT_RG8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGB8", Image::FORMAT_RGB8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBA8", Image::FORMAT_RGBA8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGB565", Image::FORMAT_RGB565);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBA4444", Image::FORMAT_RGBA4444);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBA5551", Image::FORMAT_DXT1);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RF", Image::FORMAT_RF);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGF", Image::FORMAT_RGF);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBF", Image::FORMAT_RGBF);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBAF", Image::FORMAT_RGBAF);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RH", Image::FORMAT_RH);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGH", Image::FORMAT_RGH);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBH", Image::FORMAT_RGBH);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_RGBAH", Image::FORMAT_RGBAH);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_DXT1", Image::FORMAT_DXT1);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_DXT3", Image::FORMAT_DXT3);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_DXT5", Image::FORMAT_DXT5);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ATI1", Image::FORMAT_ATI1);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ATI2", Image::FORMAT_ATI2);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_BPTC_RGBA", Image::FORMAT_BPTC_RGBA);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_BPTC_RGBF", Image::FORMAT_BPTC_RGBF);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_BPTC_RGBFU", Image::FORMAT_BPTC_RGBFU);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_PVRTC2", Image::FORMAT_PVRTC2);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_PVRTC2A", Image::FORMAT_PVRTC2A);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_PVRTC4", Image::FORMAT_PVRTC4);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_PVRTC4A", Image::FORMAT_PVRTC4A);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC", Image::FORMAT_ETC);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_R11", Image::FORMAT_ETC2_R11);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_R11S", Image::FORMAT_ETC2_R11S);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_RG11", Image::FORMAT_ETC2_RG11);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_RG11S", Image::FORMAT_ETC2_RG11S);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_RGB8", Image::FORMAT_ETC2_RGB8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_RGBA8", Image::FORMAT_ETC2_RGBA8);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_ETC2_RGB8A1", Image::FORMAT_ETC2_RGB8A1);
- _VariantCall::add_constant(Variant::IMAGE, "FORMAT_MAX", Image::FORMAT_MAX);
-
- _VariantCall::add_constant(Variant::IMAGE, "INTERPOLATE_NEAREST", Image::INTERPOLATE_NEAREST);
- _VariantCall::add_constant(Variant::IMAGE, "INTERPOLATE_BILINEAR", Image::INTERPOLATE_BILINEAR);
- _VariantCall::add_constant(Variant::IMAGE, "INTERPOLATE_CUBIC", Image::INTERPOLATE_CUBIC);
}
void unregister_variant_methods() {
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index e8274d10af..7b9b7abd9e 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -58,11 +58,9 @@ bool Variant::booleanize(bool &r_valid) const {
case BASIS:
case TRANSFORM:
case COLOR:
- case IMAGE: r_valid = false; return false;
case _RID: return (*reinterpret_cast<const RID *>(_data._mem)).is_valid();
case OBJECT: return _get_obj().obj;
case NODE_PATH: return (*reinterpret_cast<const NodePath *>(_data._mem)) != NodePath();
- case INPUT_EVENT:
case DICTIONARY:
case ARRAY:
case POOL_BYTE_ARRAY:
@@ -283,7 +281,6 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_PTRREF(==, TRANSFORM, _transform);
DEFAULT_OP_LOCALMEM(==, COLOR, Color);
- DEFAULT_OP_PTRREF(==, IMAGE, _image);
DEFAULT_OP_STR(==, NODE_PATH, NodePath);
DEFAULT_OP_LOCALMEM(==, _RID, RID);
case OBJECT: {
@@ -293,7 +290,6 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
if (p_b.type == NIL)
_RETURN(!p_a._get_obj().obj);
} break;
- DEFAULT_OP_PTRREF(==, INPUT_EVENT, _input_event);
case DICTIONARY: {
@@ -372,7 +368,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(TRANSFORM);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_LOCALMEM(<, _RID, RID);
case OBJECT: {
@@ -380,7 +376,6 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
if (p_b.type == OBJECT)
_RETURN((p_a._get_obj().obj < p_b._get_obj().obj));
} break;
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
case ARRAY: {
@@ -437,7 +432,7 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(TRANSFORM);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_LOCALMEM(<=, _RID, RID);
case OBJECT: {
@@ -445,7 +440,6 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
if (p_b.type == OBJECT)
_RETURN((p_a._get_obj().obj <= p_b._get_obj().obj));
} break;
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
DEFAULT_OP_FAIL(ARRAY);
DEFAULT_OP_FAIL(POOL_BYTE_ARRAY);
@@ -500,11 +494,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(TRANSFORM);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
DEFAULT_OP_FAIL(OBJECT);
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
case ARRAY: {
@@ -557,11 +550,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(TRANSFORM);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
DEFAULT_OP_FAIL(OBJECT);
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
DEFAULT_OP_FAIL(ARRAY);
DEFAULT_OP_FAIL(POOL_BYTE_ARRAY);
@@ -654,11 +646,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
return;
} break;
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
DEFAULT_OP_FAIL(OBJECT);
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
DEFAULT_OP_FAIL(ARRAY);
DEFAULT_OP_FAIL(POOL_BYTE_ARRAY);
@@ -727,11 +718,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(TRANSFORM);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
DEFAULT_OP_FAIL(OBJECT);
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
DEFAULT_OP_FAIL(ARRAY);
DEFAULT_OP_FAIL(POOL_BYTE_ARRAY);
@@ -769,11 +759,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_LOCALMEM_POS(VECTOR2, Vector2);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
DEFAULT_OP_FAIL(OBJECT);
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
DEFAULT_OP_FAIL(ARRAY);
DEFAULT_OP_FAIL(POOL_BYTE_ARRAY);
@@ -809,11 +798,10 @@ void Variant::evaluate(const Operator &p_op, const Variant &p_a, const Variant &
DEFAULT_OP_FAIL(TRANSFORM);
DEFAULT_OP_FAIL(COLOR);
- DEFAULT_OP_FAIL(IMAGE);
+
DEFAULT_OP_FAIL(NODE_PATH);
DEFAULT_OP_FAIL(_RID);
DEFAULT_OP_FAIL(OBJECT);
- DEFAULT_OP_FAIL(INPUT_EVENT);
DEFAULT_OP_FAIL(DICTIONARY);
DEFAULT_OP_FAIL(ARRAY);
DEFAULT_OP_FAIL(POOL_BYTE_ARRAY);
@@ -1305,7 +1293,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
}
- } break;
+ } break; // 10
case RECT3: {
if (p_value.type != Variant::VECTOR3)
@@ -1330,7 +1318,7 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
return;
}
}
- } break; //sorry naming convention fail :( not like it's used often // 10
+ } break;
case BASIS: {
if (p_value.type != Variant::VECTOR3)
@@ -1480,8 +1468,6 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
}
} break;
- case IMAGE: {
- } break;
case NODE_PATH: {
} break; // 15
case _RID: {
@@ -1511,402 +1497,19 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid)
return obj->set(p_index, p_value, r_valid);
}
} break;
- case INPUT_EVENT: {
-
- InputEvent &ie = *_data._input_event;
-
- if (p_index.get_type() != Variant::STRING)
- return;
-
- const String &str = *reinterpret_cast<const String *>(p_index._data._mem);
-
- if (str == "type") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
-
- int type = p_value;
- if (type < 0 || type >= InputEvent::TYPE_MAX)
- return; //fail
- valid = true;
- ie.type = InputEvent::Type(type);
- return;
- } else if (str == "device") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
-
- valid = true;
- ie.device = p_value;
- return;
- } else if (str == "ID") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
-
- valid = true;
- ie.ID = p_value;
- return;
- }
-
- if (ie.type == InputEvent::KEY || ie.type == InputEvent::MOUSE_BUTTON || ie.type == InputEvent::MOUSE_MOTION) {
-
- if (str == "shift") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.key.mod.shift = p_value;
- return;
- }
- if (str == "alt") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.key.mod.alt = p_value;
- return;
- }
- if (str == "control") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.key.mod.control = p_value;
- return;
- }
- if (str == "meta") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.key.mod.meta = p_value;
- return;
- }
- }
-
- if (ie.type == InputEvent::KEY) {
-
- if (str == "pressed") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.key.pressed = p_value;
- return;
- } else if (str == "scancode") {
-
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
-
- valid = true;
- ie.key.scancode = p_value;
- return;
- } else if (str == "unicode") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.key.unicode = p_value;
- return;
- } else if (str == "echo") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.key.echo = p_value;
- return;
- }
- }
-
- if (ie.type == InputEvent::MOUSE_MOTION || ie.type == InputEvent::MOUSE_BUTTON) {
-
- if (str == "button_mask") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_button.button_mask = p_value;
- return;
- } else if (str == "x") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_button.x = p_value;
- return;
- } else if (str == "y") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_button.y = p_value;
- return;
- } else if (str == "pos") {
- if (p_value.type != Variant::VECTOR2)
- return;
- valid = true;
- Point2 value = p_value;
- ie.mouse_button.x = value.x;
- ie.mouse_button.y = value.y;
- return;
- } else if (str == "global_x") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_button.global_x = p_value;
- return;
- } else if (str == "global_y") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_button.global_y = p_value;
- return;
- } else if (str == "global_pos") {
- if (p_value.type != Variant::VECTOR2)
- return;
- valid = true;
- Point2 value = p_value;
- ie.mouse_button.global_x = value.x;
- ie.mouse_button.global_y = value.y;
- return;
- } /*else if (str=="pointer_index") {
- valid=true;
- return ie.mouse_button.pointer_index;
- }*/
-
- if (ie.type == InputEvent::MOUSE_MOTION) {
-
- if (str == "relative_x") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_motion.relative_x = p_value;
- return;
- } else if (str == "relative_y") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_motion.relative_y = p_value;
- return;
- } else if (str == "relative_pos") {
- if (p_value.type != Variant::VECTOR2)
- return;
- valid = true;
- Point2 value = p_value;
- ie.mouse_motion.relative_x = value.x;
- ie.mouse_motion.relative_y = value.y;
- return;
- }
-
- if (str == "speed_x") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_motion.speed_x = p_value;
- return;
- } else if (str == "speed_y") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_motion.speed_y = p_value;
- return;
- } else if (str == "speed") {
- if (p_value.type != Variant::VECTOR2)
- return;
- valid = true;
- Point2 value = p_value;
- ie.mouse_motion.speed_x = value.x;
- ie.mouse_motion.speed_y = value.y;
- return;
- }
-
- } else if (ie.type == InputEvent::MOUSE_BUTTON) {
-
- if (str == "button_index") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL)
- return;
- valid = true;
- ie.mouse_button.button_index = p_value;
- return;
- } else if (str == "pressed") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
- valid = true;
- ie.mouse_button.pressed = p_value;
- return;
- } else if (str == "doubleclick") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
- valid = true;
- ie.mouse_button.doubleclick = p_value;
- return;
- }
- }
- }
-
- if (ie.type == InputEvent::JOYPAD_BUTTON) {
-
- if (str == "button_index") {
- if (p_value.type != Variant::REAL && p_value.type != Variant::INT)
- return;
- valid = true;
- ie.joy_button.button_index = p_value;
- return;
- }
- if (str == "pressed") {
- if (p_value.type != Variant::INT && p_value.type != Variant::REAL && p_value.type != Variant::BOOL)
- return;
-
- valid = true;
- ie.joy_button.pressed = p_value;
- return;
- }
- if (str == "pressure") {
- if (p_value.type != Variant::REAL && p_value.type != Variant::INT)
- return;
- valid = true;
- ie.joy_button.pressure = p_value;
- return;
- }
- }
-
- if (ie.type == InputEvent::JOYPAD_MOTION) {
-
- if (str == "axis") {
- if (p_value.type != Variant::REAL && p_value.type != Variant::INT)
- return;
- valid = true;
- ie.joy_motion.axis = p_value;
- return;
- }
- if (str == "value") {
- if (p_value.type != Variant::REAL && p_value.type != Variant::INT)
- return;
- valid = true;
- ie.joy_motion.axis_value = p_value;
- return;
- }
- }
-
- if (ie.type == InputEvent::SCREEN_TOUCH) {
-
- if (str == "index") {
- valid = true;
- ie.screen_touch.index = p_value;
- return;
- }
- if (str == "x") {
- valid = true;
- ie.screen_touch.x = p_value;
- return;
- }
- if (str == "y") {
- valid = true;
- ie.screen_touch.y = p_value;
- return;
- }
- if (str == "pos") {
- valid = true;
- Vector2 v = p_value;
- ie.screen_touch.x = v.x;
- ie.screen_touch.y = v.y;
- return;
- }
- if (str == "pressed") {
- valid = true;
- ie.screen_touch.pressed = p_value;
- return;
- }
- }
-
- if (ie.type == InputEvent::SCREEN_DRAG) {
-
- if (str == "index") {
- valid = true;
- ie.screen_drag.index = p_value;
- return;
- }
- if (str == "x") {
- valid = true;
- ie.screen_drag.x = p_value;
- return;
- }
- if (str == "y") {
- valid = true;
- ie.screen_drag.y = p_value;
- return;
- }
- if (str == "pos") {
- valid = true;
- Vector2 v = p_value;
- ie.screen_drag.x = v.x;
- ie.screen_drag.y = v.y;
- return;
- }
- if (str == "relative_x") {
- valid = true;
- ie.screen_drag.relative_x = p_value;
- return;
- }
- if (str == "relative_y") {
- valid = true;
- ie.screen_drag.relative_y = p_value;
- return;
- }
- if (str == "relative_pos") {
- valid = true;
- Vector2 v = p_value;
- ie.screen_drag.relative_x = v.x;
- ie.screen_drag.relative_y = v.y;
- return;
- }
- if (str == "speed_x") {
- valid = true;
- ie.screen_drag.speed_x = p_value;
- return;
- }
- if (str == "speed_y") {
- valid = true;
- ie.screen_drag.speed_y = p_value;
- return;
- }
- if (str == "speed") {
- valid = true;
- Vector2 v = p_value;
- ie.screen_drag.speed_x = v.x;
- ie.screen_drag.speed_y = v.y;
- return;
- }
- }
- if (ie.type == InputEvent::ACTION) {
-
- if (str == "action") {
- valid = true;
- ie.action.action = p_value;
- return;
- } else if (str == "pressed") {
- valid = true;
- ie.action.pressed = p_value;
- return;
- }
- }
-
- } break;
case DICTIONARY: {
Dictionary *dic = reinterpret_cast<Dictionary *>(_data._mem);
dic->operator[](p_index) = p_value;
valid = true; //always valid, i guess? should this really be ok?
return;
- } break; // 20
- DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return )
+ } break;
+ DEFAULT_OP_ARRAY_CMD(ARRAY, Array, ;, (*arr)[index] = p_value; return ) // 20
DEFAULT_OP_DVECTOR_SET(POOL_BYTE_ARRAY, uint8_t, p_value.type != Variant::REAL && p_value.type != Variant::INT)
DEFAULT_OP_DVECTOR_SET(POOL_INT_ARRAY, int, p_value.type != Variant::REAL && p_value.type != Variant::INT)
DEFAULT_OP_DVECTOR_SET(POOL_REAL_ARRAY, real_t, p_value.type != Variant::REAL && p_value.type != Variant::INT)
- DEFAULT_OP_DVECTOR_SET(POOL_STRING_ARRAY, String, p_value.type != Variant::STRING) // 25
- DEFAULT_OP_DVECTOR_SET(POOL_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2)
+ DEFAULT_OP_DVECTOR_SET(POOL_STRING_ARRAY, String, p_value.type != Variant::STRING)
+ DEFAULT_OP_DVECTOR_SET(POOL_VECTOR2_ARRAY, Vector2, p_value.type != Variant::VECTOR2) // 25
DEFAULT_OP_DVECTOR_SET(POOL_VECTOR3_ARRAY, Vector3, p_value.type != Variant::VECTOR3)
DEFAULT_OP_DVECTOR_SET(POOL_COLOR_ARRAY, Color, p_value.type != Variant::COLOR)
default: return;
@@ -2107,7 +1710,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
}
- } break;
+ } break; // 10
case RECT3: {
if (p_index.get_type() == Variant::STRING) {
@@ -2126,7 +1729,7 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
return v->size + v->pos;
}
}
- } break; //sorry naming convention fail :( not like it's used often // 10
+ } break;
case BASIS: {
if (p_index.get_type() == Variant::INT || p_index.get_type() == Variant::REAL) {
@@ -2239,8 +1842,6 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
} break;
- case IMAGE: {
- } break;
case NODE_PATH: {
} break; // 15
case _RID: {
@@ -2267,235 +1868,6 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
}
} break;
- case INPUT_EVENT: {
-
- InputEvent ie = operator InputEvent();
-
- if (p_index.get_type() != Variant::STRING)
- break;
-
- const String &str = *reinterpret_cast<const String *>(p_index._data._mem);
-
- if (str == "type") {
- valid = true;
- return ie.type;
- } else if (str == "device") {
- valid = true;
- return ie.device;
- } else if (str == "ID") {
- valid = true;
- return ie.ID;
- }
-
- if (ie.type == InputEvent::KEY || ie.type == InputEvent::MOUSE_BUTTON || ie.type == InputEvent::MOUSE_MOTION) {
-
- if (str == "shift") {
- valid = true;
- return ie.key.mod.shift;
- }
- if (str == "alt") {
- valid = true;
- return ie.key.mod.alt;
- }
- if (str == "control") {
- valid = true;
- return ie.key.mod.control;
- }
- if (str == "meta") {
- valid = true;
- return ie.key.mod.meta;
- }
- }
-
- if (ie.type == InputEvent::KEY) {
-
- if (str == "pressed") {
- valid = true;
- return ie.key.pressed;
- } else if (str == "scancode") {
- valid = true;
- return ie.key.scancode;
- } else if (str == "unicode") {
- valid = true;
- return ie.key.unicode;
- } else if (str == "echo") {
- valid = true;
- return ie.key.echo;
- }
- }
-
- if (ie.type == InputEvent::MOUSE_MOTION || ie.type == InputEvent::MOUSE_BUTTON) {
-
- if (str == "button_mask") {
- valid = true;
- return ie.mouse_button.button_mask;
- } else if (str == "x") {
- valid = true;
- return ie.mouse_button.x;
- } else if (str == "y") {
- valid = true;
- return ie.mouse_button.y;
- } else if (str == "pos") {
- valid = true;
- return Point2(ie.mouse_button.x, ie.mouse_button.y);
- } else if (str == "global_x") {
- valid = true;
- return ie.mouse_button.global_x;
- } else if (str == "global_y") {
- valid = true;
- return ie.mouse_button.global_y;
- } else if (str == "global_pos") {
- valid = true;
- return Point2(ie.mouse_button.global_x, ie.mouse_button.global_y);
- } /*else if (str=="pointer_index") {
- valid=true;
- return ie.mouse_button.pointer_index;
- }*/
-
- if (ie.type == InputEvent::MOUSE_MOTION) {
-
- if (str == "relative_x") {
- valid = true;
- return ie.mouse_motion.relative_x;
- } else if (str == "relative_y") {
- valid = true;
- return ie.mouse_motion.relative_y;
- } else if (str == "relative_pos") {
- valid = true;
- return Point2(ie.mouse_motion.relative_x, ie.mouse_motion.relative_y);
- } else if (str == "speed_x") {
- valid = true;
- return ie.mouse_motion.speed_x;
- } else if (str == "speed_y") {
- valid = true;
- return ie.mouse_motion.speed_y;
- } else if (str == "speed") {
- valid = true;
- return Point2(ie.mouse_motion.speed_x, ie.mouse_motion.speed_y);
- }
-
- } else if (ie.type == InputEvent::MOUSE_BUTTON) {
-
- if (str == "button_index") {
- valid = true;
- return ie.mouse_button.button_index;
- } else if (str == "pressed") {
- valid = true;
- return ie.mouse_button.pressed;
- } else if (str == "doubleclick") {
- valid = true;
- return ie.mouse_button.doubleclick;
- }
- }
- }
-
- if (ie.type == InputEvent::JOYPAD_BUTTON) {
-
- if (str == "button_index") {
- valid = true;
- return ie.joy_button.button_index;
- }
- if (str == "pressed") {
- valid = true;
- return ie.joy_button.pressed;
- }
- if (str == "pressure") {
- valid = true;
- return ie.joy_button.pressure;
- }
- }
-
- if (ie.type == InputEvent::JOYPAD_MOTION) {
-
- if (str == "axis") {
- valid = true;
- return ie.joy_motion.axis;
- }
- if (str == "value") {
- valid = true;
- return ie.joy_motion.axis_value;
- }
- }
-
- if (ie.type == InputEvent::SCREEN_TOUCH) {
-
- if (str == "index") {
- valid = true;
- return ie.screen_touch.index;
- }
- if (str == "x") {
- valid = true;
- return ie.screen_touch.x;
- }
- if (str == "y") {
- valid = true;
- return ie.screen_touch.y;
- }
- if (str == "pos") {
- valid = true;
- return Vector2(ie.screen_touch.x, ie.screen_touch.y);
- }
- if (str == "pressed") {
- valid = true;
- return ie.screen_touch.pressed;
- }
- }
-
- if (ie.type == InputEvent::SCREEN_DRAG) {
-
- if (str == "index") {
- valid = true;
- return ie.screen_drag.index;
- }
- if (str == "x") {
- valid = true;
- return ie.screen_drag.x;
- }
- if (str == "y") {
- valid = true;
- return ie.screen_drag.y;
- }
- if (str == "pos") {
- valid = true;
- return Vector2(ie.screen_drag.x, ie.screen_drag.y);
- }
- if (str == "relative_x") {
- valid = true;
- return ie.screen_drag.relative_x;
- }
- if (str == "relative_y") {
- valid = true;
- return ie.screen_drag.relative_y;
- }
- if (str == "relative_pos") {
- valid = true;
- return Vector2(ie.screen_drag.relative_x, ie.screen_drag.relative_y);
- }
- if (str == "speed_x") {
- valid = true;
- return ie.screen_drag.speed_x;
- }
- if (str == "speed_y") {
- valid = true;
- return ie.screen_drag.speed_y;
- }
- if (str == "speed") {
- valid = true;
- return Vector2(ie.screen_drag.speed_x, ie.screen_drag.speed_y);
- }
- }
- if (ie.type == InputEvent::ACTION) {
-
- if (str == "action") {
- valid = true;
- return ie.action.action;
- } else if (str == "pressed") {
- valid = true;
- return ie.action.pressed;
- }
- }
-
- } break;
case DICTIONARY: {
const Dictionary *dic = reinterpret_cast<const Dictionary *>(_data._mem);
@@ -2504,13 +1876,13 @@ Variant Variant::get(const Variant &p_index, bool *r_valid) const {
valid = true;
return *res;
}
- } break; // 20
- DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index])
+ } break;
+ DEFAULT_OP_ARRAY_CMD(ARRAY, const Array, ;, return (*arr)[index]) // 20
DEFAULT_OP_DVECTOR_GET(POOL_BYTE_ARRAY, uint8_t)
DEFAULT_OP_DVECTOR_GET(POOL_INT_ARRAY, int)
DEFAULT_OP_DVECTOR_GET(POOL_REAL_ARRAY, real_t)
DEFAULT_OP_DVECTOR_GET(POOL_STRING_ARRAY, String)
- DEFAULT_OP_DVECTOR_GET(POOL_VECTOR2_ARRAY, Vector2)
+ DEFAULT_OP_DVECTOR_GET(POOL_VECTOR2_ARRAY, Vector2) // 25
DEFAULT_OP_DVECTOR_GET(POOL_VECTOR3_ARRAY, Vector3)
DEFAULT_OP_DVECTOR_GET(POOL_COLOR_ARRAY, Color)
default: return Variant();
@@ -2774,12 +2146,12 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::REAL, "z"));
p_list->push_back(PropertyInfo(Variant::REAL, "w"));
- } break;
+ } break; // 10
case RECT3: {
p_list->push_back(PropertyInfo(Variant::VECTOR3, "pos"));
p_list->push_back(PropertyInfo(Variant::VECTOR3, "size"));
p_list->push_back(PropertyInfo(Variant::VECTOR3, "end"));
- } break; //sorry naming convention fail :( not like it's used often // 10
+ } break;
case BASIS: {
p_list->push_back(PropertyInfo(Variant::VECTOR3, "x"));
@@ -2807,8 +2179,6 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::INT, "a8"));
} break;
- case IMAGE: {
- } break;
case NODE_PATH: {
} break; // 15
case _RID: {
@@ -2831,94 +2201,6 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
}
} break;
- case INPUT_EVENT: {
-
- InputEvent ie = operator InputEvent();
-
- p_list->push_back(PropertyInfo(Variant::INT, "type"));
- p_list->push_back(PropertyInfo(Variant::INT, "device"));
- p_list->push_back(PropertyInfo(Variant::INT, "ID"));
-
- if (ie.type == InputEvent::KEY || ie.type == InputEvent::MOUSE_BUTTON || ie.type == InputEvent::MOUSE_MOTION) {
-
- p_list->push_back(PropertyInfo(Variant::BOOL, "shift"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "alt"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "control"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "meta"));
- }
-
- if (ie.type == InputEvent::KEY) {
-
- p_list->push_back(PropertyInfo(Variant::BOOL, "pressed"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "echo"));
- p_list->push_back(PropertyInfo(Variant::INT, "scancode"));
- p_list->push_back(PropertyInfo(Variant::INT, "unicode"));
- }
-
- if (ie.type == InputEvent::MOUSE_MOTION || ie.type == InputEvent::MOUSE_BUTTON) {
-
- p_list->push_back(PropertyInfo(Variant::INT, "button_mask"));
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "pos"));
- p_list->push_back(PropertyInfo(Variant::REAL, "global_x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "global_y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "global_pos"));
-
- if (ie.type == InputEvent::MOUSE_MOTION) {
-
- p_list->push_back(PropertyInfo(Variant::REAL, "relative_x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "relative_y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "relative_pos"));
- p_list->push_back(PropertyInfo(Variant::REAL, "speed_x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "speed_y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "speed"));
-
- } else if (ie.type == InputEvent::MOUSE_BUTTON) {
-
- p_list->push_back(PropertyInfo(Variant::INT, "button_index"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "pressed"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "doubleclick"));
- }
- }
-
- if (ie.type == InputEvent::JOYPAD_BUTTON) {
-
- p_list->push_back(PropertyInfo(Variant::INT, "button_index"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "pressed"));
- p_list->push_back(PropertyInfo(Variant::REAL, "pressure"));
- }
-
- if (ie.type == InputEvent::JOYPAD_MOTION) {
-
- p_list->push_back(PropertyInfo(Variant::INT, "axis"));
- p_list->push_back(PropertyInfo(Variant::REAL, "value"));
- }
-
- if (ie.type == InputEvent::SCREEN_TOUCH) {
-
- p_list->push_back(PropertyInfo(Variant::INT, "index"));
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "pos"));
- p_list->push_back(PropertyInfo(Variant::BOOL, "pressed"));
- }
-
- if (ie.type == InputEvent::SCREEN_DRAG) {
-
- p_list->push_back(PropertyInfo(Variant::INT, "index"));
- p_list->push_back(PropertyInfo(Variant::REAL, "x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "pos"));
- p_list->push_back(PropertyInfo(Variant::REAL, "relative_x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "relative_y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "relative_pos"));
- p_list->push_back(PropertyInfo(Variant::REAL, "speed_x"));
- p_list->push_back(PropertyInfo(Variant::REAL, "speed_y"));
- p_list->push_back(PropertyInfo(Variant::VECTOR2, "speed"));
- }
-
- } break;
case DICTIONARY: {
const Dictionary *dic = reinterpret_cast<const Dictionary *>(_data._mem);
@@ -2929,12 +2211,13 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::STRING, E->get()));
}
}
- } break; // 20
- case ARRAY:
+ } break;
+ case ARRAY: // 20
case POOL_BYTE_ARRAY:
case POOL_INT_ARRAY:
case POOL_REAL_ARRAY:
case POOL_STRING_ARRAY:
+ case POOL_VECTOR2_ARRAY: // 25
case POOL_VECTOR3_ARRAY:
case POOL_COLOR_ARRAY: {
@@ -3631,10 +2914,6 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = reinterpret_cast<const Color *>(a._data._mem)->linear_interpolate(*reinterpret_cast<const Color *>(b._data._mem), c);
}
return;
- case IMAGE: {
- r_dst = a;
- }
- return;
case NODE_PATH: {
r_dst = a;
}
@@ -3647,10 +2926,6 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant &
r_dst = a;
}
return;
- case INPUT_EVENT: {
- r_dst = a;
- }
- return;
case DICTIONARY: {
}
return;
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 234156d39f..0d4d0429e7 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -30,6 +30,7 @@
#include "variant_parser.h"
#include "io/resource_loader.h"
+#include "os/input_event.h"
#include "os/keyboard.h"
CharType VariantParser::StreamFile::get_char() {
@@ -504,39 +505,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return OK;
} else if (token.type == TK_IDENTIFIER) {
- /*
- VECTOR2, // 5
- RECT2,
- VECTOR3,
- MATRIX32,
- PLANE,
- QUAT, // 10
- _AABB, //sorry naming convention fail :( not like it's used often
- MATRIX3,
- TRANSFORM,
- // misc types
- COLOR,
- IMAGE, // 15
- NODE_PATH,
- _RID,
- OBJECT,
- INPUT_EVENT,
- DICTIONARY, // 20
- ARRAY,
-
- // arrays
- RAW_ARRAY,
- INT_ARRAY,
- REAL_ARRAY,
- STRING_ARRAY, // 25
- VECTOR2_ARRAY,
- VECTOR3_ARRAY,
- COLOR_ARRAY,
-
- VARIANT_MAX
-
-*/
String id = token.value;
if (id == "true")
value = true;
@@ -681,126 +650,6 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = Color(args[0], args[1], args[2], args[3]);
return OK;
- } else if (id == "Image") {
-
- //:|
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_PARENTHESIS_OPEN) {
- r_err_str = "Expected '('";
- return ERR_PARSE_ERROR;
- }
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type == TK_PARENTHESIS_CLOSE) {
- value = Image(); // just an Image()
- return OK;
- } else if (token.type != TK_NUMBER) {
- r_err_str = "Expected number (width)";
- return ERR_PARSE_ERROR;
- }
-
- get_token(p_stream, token, line, r_err_str);
-
- int width = token.value;
- if (token.type != TK_COMMA) {
- r_err_str = "Expected ','";
- return ERR_PARSE_ERROR;
- }
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_NUMBER) {
- r_err_str = "Expected number (height)";
- return ERR_PARSE_ERROR;
- }
-
- int height = token.value;
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_COMMA) {
- r_err_str = "Expected ','";
- return ERR_PARSE_ERROR;
- }
-
- get_token(p_stream, token, line, r_err_str);
-
- bool has_mipmaps = false;
-
- if (token.type == TK_NUMBER) {
- has_mipmaps = bool(token.value);
- } else if (token.type == TK_IDENTIFIER && String(token.value) == "true") {
- has_mipmaps = true;
- } else if (token.type == TK_IDENTIFIER && String(token.value) == "false") {
- has_mipmaps = false;
- } else {
- r_err_str = "Expected number/true/false (mipmaps)";
- return ERR_PARSE_ERROR;
- }
-
- int mipmaps = token.value;
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_COMMA) {
- r_err_str = "Expected ','";
- return ERR_PARSE_ERROR;
- }
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_IDENTIFIER) {
- r_err_str = "Expected identifier (format)";
- return ERR_PARSE_ERROR;
- }
-
- String sformat = token.value;
-
- Image::Format format = Image::FORMAT_MAX;
-
- for (int i = 0; i < Image::FORMAT_MAX; i++) {
- if (Image::get_format_name(Image::Format(i)) == sformat) {
- format = Image::Format(i);
- }
- }
-
- if (format == Image::FORMAT_MAX) {
- r_err_str = "Unknown image format: " + String(sformat);
- return ERR_PARSE_ERROR;
- }
-
- int len = Image::get_image_data_size(width, height, format, mipmaps);
-
- PoolVector<uint8_t> buffer;
- buffer.resize(len);
-
- if (buffer.size() != len) {
- r_err_str = "Couldn't allocate image buffer of size: " + itos(len);
- }
-
- {
- PoolVector<uint8_t>::Write w = buffer.write();
-
- for (int i = 0; i < len; i++) {
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_COMMA) {
- r_err_str = "Expected ','";
- return ERR_PARSE_ERROR;
- }
-
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_NUMBER) {
- r_err_str = "Expected number";
- return ERR_PARSE_ERROR;
- }
-
- w[i] = int(token.value);
- }
- }
-
- Image img(width, height, mipmaps, format, buffer);
-
- value = img;
-
- return OK;
-
} else if (id == "NodePath") {
get_token(p_stream, token, line, r_err_str);
@@ -912,7 +761,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
}
return OK;
-
+#ifndef DISABLE_DEPRECATED
} else if (id == "InputEvent") {
get_token(p_stream, token, line, r_err_str);
@@ -930,12 +779,10 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
String id = token.value;
- InputEvent ie;
+ Ref<InputEvent> ie;
if (id == "NONE") {
- ie.type = InputEvent::NONE;
-
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_PARENTHESIS_CLOSE) {
@@ -945,21 +792,23 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
} else if (id == "KEY") {
+ Ref<InputEventKey> key;
+ key.instance();
+ ie = key;
+
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_COMMA) {
r_err_str = "Expected ','";
return ERR_PARSE_ERROR;
}
- ie.type = InputEvent::KEY;
-
get_token(p_stream, token, line, r_err_str);
if (token.type == TK_IDENTIFIER) {
String name = token.value;
- ie.key.scancode = find_keycode(name);
+ key->set_scancode(find_keycode(name));
} else if (token.type == TK_NUMBER) {
- ie.key.scancode = token.value;
+ key->set_scancode(token.value);
} else {
r_err_str = "Expected string or integer for keycode";
@@ -980,13 +829,13 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
String mods = token.value;
if (mods.findn("C") != -1)
- ie.key.mod.control = true;
+ key->set_control(true);
if (mods.findn("A") != -1)
- ie.key.mod.alt = true;
+ key->set_alt(true);
if (mods.findn("S") != -1)
- ie.key.mod.shift = true;
+ key->set_shift(true);
if (mods.findn("M") != -1)
- ie.key.mod.meta = true;
+ key->set_metakey(true);
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_PARENTHESIS_CLOSE) {
@@ -1002,21 +851,23 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
} else if (id == "MBUTTON") {
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+ ie = mb;
+
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_COMMA) {
r_err_str = "Expected ','";
return ERR_PARSE_ERROR;
}
- ie.type = InputEvent::MOUSE_BUTTON;
-
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_NUMBER) {
r_err_str = "Expected button index";
return ERR_PARSE_ERROR;
}
- ie.mouse_button.button_index = token.value;
+ mb->set_button_index(token.value);
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_PARENTHESIS_CLOSE) {
@@ -1026,21 +877,23 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
} else if (id == "JBUTTON") {
+ Ref<InputEventJoypadButton> jb;
+ jb.instance();
+ ie = jb;
+
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_COMMA) {
r_err_str = "Expected ','";
return ERR_PARSE_ERROR;
}
- ie.type = InputEvent::JOYPAD_BUTTON;
-
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_NUMBER) {
r_err_str = "Expected button index";
return ERR_PARSE_ERROR;
}
- ie.joy_button.button_index = token.value;
+ jb->set_button_index(token.value);
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_PARENTHESIS_CLOSE) {
@@ -1050,21 +903,23 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
} else if (id == "JAXIS") {
+ Ref<InputEventJoypadMotion> jm;
+ jm.instance();
+ ie = jm;
+
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_COMMA) {
r_err_str = "Expected ','";
return ERR_PARSE_ERROR;
}
- ie.type = InputEvent::JOYPAD_MOTION;
-
get_token(p_stream, token, line, r_err_str);
if (token.type != TK_NUMBER) {
r_err_str = "Expected axis index";
return ERR_PARSE_ERROR;
}
- ie.joy_motion.axis = token.value;
+ jm->set_axis(token.value);
get_token(p_stream, token, line, r_err_str);
@@ -1079,7 +934,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return ERR_PARSE_ERROR;
}
- ie.joy_motion.axis_value = token.value;
+ jm->set_axis_value(token.value);
get_token(p_stream, token, line, r_err_str);
@@ -1097,7 +952,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = ie;
return OK;
-
+#endif
} else if (id == "PoolByteArray" || id == "ByteArray") {
Vector<uint8_t> args;
@@ -1273,152 +1128,11 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
value = arr;
return OK;
- } else if (id == "key") { // compatibility with project.godot
-
- Vector<String> params;
- Error err = _parse_enginecfg(p_stream, params, line, r_err_str);
- if (err)
- return err;
- ERR_FAIL_COND_V(params.size() != 1 && params.size() != 2, ERR_PARSE_ERROR);
-
- int scode = 0;
-
- if (params[0].is_numeric()) {
- scode = params[0].to_int();
- if (scode < 10) {
- scode = KEY_0 + scode;
- }
- } else
- scode = find_keycode(params[0]);
-
- InputEvent ie;
- ie.type = InputEvent::KEY;
- ie.key.scancode = scode;
-
- if (params.size() == 2) {
- String mods = params[1];
- if (mods.findn("C") != -1)
- ie.key.mod.control = true;
- if (mods.findn("A") != -1)
- ie.key.mod.alt = true;
- if (mods.findn("S") != -1)
- ie.key.mod.shift = true;
- if (mods.findn("M") != -1)
- ie.key.mod.meta = true;
- }
- value = ie;
- return OK;
-
- } else if (id == "mbutton") { // compatibility with project.godot
-
- Vector<String> params;
- Error err = _parse_enginecfg(p_stream, params, line, r_err_str);
- if (err)
- return err;
- ERR_FAIL_COND_V(params.size() != 2, ERR_PARSE_ERROR);
-
- InputEvent ie;
- ie.type = InputEvent::MOUSE_BUTTON;
- ie.device = params[0].to_int();
- ie.mouse_button.button_index = params[1].to_int();
-
- value = ie;
- return OK;
- } else if (id == "jbutton") { // compatibility with project.godot
-
- Vector<String> params;
- Error err = _parse_enginecfg(p_stream, params, line, r_err_str);
- if (err)
- return err;
- ERR_FAIL_COND_V(params.size() != 2, ERR_PARSE_ERROR);
- InputEvent ie;
- ie.type = InputEvent::JOYPAD_BUTTON;
- ie.device = params[0].to_int();
- ie.joy_button.button_index = params[1].to_int();
-
- value = ie;
-
- return OK;
- } else if (id == "jaxis") { // compatibility with project.godot
-
- Vector<String> params;
- Error err = _parse_enginecfg(p_stream, params, line, r_err_str);
- if (err)
- return err;
- ERR_FAIL_COND_V(params.size() != 2, ERR_PARSE_ERROR);
-
- InputEvent ie;
- ie.type = InputEvent::JOYPAD_MOTION;
- ie.device = params[0].to_int();
- int axis = params[1].to_int();
- ie.joy_motion.axis = axis >> 1;
- ie.joy_motion.axis_value = axis & 1 ? 1 : -1;
-
- value = ie;
-
- return OK;
- } else if (id == "img") { // compatibility with project.godot
-
- Token token; // FIXME: no need for this declaration? the first argument in line 509 is a Token& token.
- get_token(p_stream, token, line, r_err_str);
- if (token.type != TK_PARENTHESIS_OPEN) {
- r_err_str = "Expected '(' in old-style project.godot construct";
- return ERR_PARSE_ERROR;
- }
-
- while (true) {
- CharType c = p_stream->get_char();
- if (p_stream->is_eof()) {
- r_err_str = "Unexpected EOF in old style project.godot img()";
- return ERR_PARSE_ERROR;
- }
- if (c == ')')
- break;
- }
-
- value = Image();
-
- return OK;
-
} else {
r_err_str = "Unexpected identifier: '" + id + "'.";
return ERR_PARSE_ERROR;
}
- /*
- VECTOR2, // 5
- RECT2,
- VECTOR3,
- MATRIX32,
- PLANE,
- QUAT, // 10
- _AABB, //sorry naming convention fail :( not like it's used often
- MATRIX3,
- TRANSFORM,
-
- // misc types
- COLOR,
- IMAGE, // 15
- NODE_PATH,
- _RID,
- OBJECT,
- INPUT_EVENT,
- DICTIONARY, // 20
- ARRAY,
-
- // arrays
- RAW_ARRAY,
- INT_ARRAY,
- REAL_ARRAY,
- STRING_ARRAY, // 25
- VECTOR2_ARRAY,
- VECTOR3_ARRAY,
- COLOR_ARRAY,
-
- VARIANT_MAX
-
- */
-
return OK;
} else if (token.type == TK_NUMBER) {
@@ -1886,39 +1600,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, "Color( " + rtosfix(c.r) + ", " + rtosfix(c.g) + ", " + rtosfix(c.b) + ", " + rtosfix(c.a) + " )");
} break;
- case Variant::IMAGE: {
-
- Image img = p_variant;
-
- if (img.empty()) {
- p_store_string_func(p_store_string_ud, "Image()");
- break;
- }
-
- String imgstr = "Image( ";
- imgstr += itos(img.get_width());
- imgstr += ", " + itos(img.get_height());
- imgstr += ", " + String(img.has_mipmaps() ? "true" : "false");
- imgstr += ", " + Image::get_format_name(img.get_format());
-
- String s;
-
- PoolVector<uint8_t> data = img.get_data();
- int len = data.size();
- PoolVector<uint8_t>::Read r = data.read();
- const uint8_t *ptr = r.ptr();
- for (int i = 0; i < len; i++) {
-
- if (i > 0)
- s += ", ";
- s += itos(ptr[i]);
- }
-
- imgstr += ", ";
- p_store_string_func(p_store_string_ud, imgstr);
- p_store_string_func(p_store_string_ud, s);
- p_store_string_func(p_store_string_ud, " )");
- } break;
case Variant::NODE_PATH: {
String str = p_variant;
@@ -1956,50 +1637,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, res_text);
} break;
- case Variant::INPUT_EVENT: {
-
- String str = "InputEvent(";
-
- InputEvent ev = p_variant;
- switch (ev.type) {
- case InputEvent::KEY: {
-
- str += "KEY," + itos(ev.key.scancode);
- String mod;
- if (ev.key.mod.alt)
- mod += "A";
- if (ev.key.mod.shift)
- mod += "S";
- if (ev.key.mod.control)
- mod += "C";
- if (ev.key.mod.meta)
- mod += "M";
-
- if (mod != String())
- str += "," + mod;
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- str += "MBUTTON," + itos(ev.mouse_button.button_index);
- } break;
- case InputEvent::JOYPAD_BUTTON: {
- str += "JBUTTON," + itos(ev.joy_button.button_index);
-
- } break;
- case InputEvent::JOYPAD_MOTION: {
- str += "JAXIS," + itos(ev.joy_motion.axis) + "," + itos(ev.joy_motion.axis_value);
- } break;
- case InputEvent::NONE: {
- str += "NONE";
- } break;
- default: {}
- }
-
- str += ")";
- p_store_string_func(p_store_string_ud, str); //will be added later
-
- } break;
case Variant::DICTIONARY: {
Dictionary dict = p_variant;
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index b50590c105..da614e14d3 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -1991,6 +1991,7 @@
<argument index="1" name="pos" type="Vector3">
</argument>
<argument index="2" name="weight_scale" type="float" default="1">
+ Weight scale has to be 1 or larger.
</argument>
<description>
</description>
@@ -15433,6 +15434,10 @@
<method name="is_valid" qualifiers="const">
<return type="bool">
</return>
+ <argument index="0" name="extended_check" type="bool" default="false">
+ If true, also check if the associated script and object still exists.
+ The extended check is done in debug mode as part of [method GDFunctionState.resume], but you can use this if you know you may be trying to resume without knowing for sure the object and/or script have survived up to that point.
+ </argument>
<description>
Check whether the function call may be resumed. This is not the case if the function state was already resumed.
</description>
@@ -20356,7 +20361,7 @@
Singleton that manages actions.
</brief_description>
<description>
- Singleton that manages actions. InputMap has a list of the actions used in InputEvent, which can be modified.
+ Singleton that manages actions. InputMap has a list of the actions used in Ref<InputEvent>, which can be modified.
</description>
<methods>
<method name="action_add_event">
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 60282fb3fa..3c543365f0 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -342,12 +342,12 @@ void RasterizerGLES2::_draw_primitive(int p_points, const Vector3 *p_vertices, c
/* TEXTURE API */
-Image RasterizerGLES2::_get_gl_image_and_format(const Image &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, int &r_gl_components, bool &r_has_alpha_cache, bool &r_compressed) {
+Ref<Image> RasterizerGLES2::_get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, int &r_gl_components, bool &r_has_alpha_cache, bool &r_compressed) {
r_has_alpha_cache = false;
r_compressed = false;
r_gl_format = 0;
- Image image = p_image;
+ Ref<Image> image = p_image;
switch (p_format) {
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index db814ec721..aa4150cbe4 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -271,9 +271,9 @@ void RasterizerGLES3::clear_render_target(const Color &p_color) {
storage->frame.clear_request_color = p_color;
}
-void RasterizerGLES3::set_boot_image(const Image &p_image, const Color &p_color, bool p_scale) {
+void RasterizerGLES3::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
- if (p_image.empty())
+ if (p_image.is_null() || p_image->empty())
return;
begin_frame();
@@ -290,10 +290,10 @@ void RasterizerGLES3::set_boot_image(const Image &p_image, const Color &p_color,
canvas->canvas_begin();
RID texture = storage->texture_create();
- storage->texture_allocate(texture, p_image.get_width(), p_image.get_height(), p_image.get_format(), VS::TEXTURE_FLAG_FILTER);
+ storage->texture_allocate(texture, p_image->get_width(), p_image->get_height(), p_image->get_format(), VS::TEXTURE_FLAG_FILTER);
storage->texture_set_data(texture, p_image);
- Rect2 imgrect(0, 0, p_image.get_width(), p_image.get_height());
+ Rect2 imgrect(0, 0, p_image->get_width(), p_image->get_height());
Rect2 screenrect;
if (p_scale) {
diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h
index 12014cd814..ce18d6b6c1 100644
--- a/drivers/gles3/rasterizer_gles3.h
+++ b/drivers/gles3/rasterizer_gles3.h
@@ -48,7 +48,7 @@ public:
virtual RasterizerCanvas *get_canvas();
virtual RasterizerScene *get_scene();
- virtual void set_boot_image(const Image &p_image, const Color &p_color, bool p_scale);
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale);
virtual void initialize();
virtual void begin_frame();
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index a7996b09d3..5214de6d06 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -798,20 +798,20 @@ void RasterizerSceneGLES3::environment_set_background(RID p_env, VS::Environment
env->bg_mode = p_bg;
}
-void RasterizerSceneGLES3::environment_set_skybox(RID p_env, RID p_skybox) {
+void RasterizerSceneGLES3::environment_set_sky(RID p_env, RID p_sky) {
Environment *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
- env->skybox = p_skybox;
+ env->sky = p_sky;
}
-void RasterizerSceneGLES3::environment_set_skybox_scale(RID p_env, float p_scale) {
+void RasterizerSceneGLES3::environment_set_sky_scale(RID p_env, float p_scale) {
Environment *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
- env->skybox_scale = p_scale;
+ env->sky_scale = p_scale;
}
void RasterizerSceneGLES3::environment_set_bg_color(RID p_env, const Color &p_color) {
@@ -836,14 +836,14 @@ void RasterizerSceneGLES3::environment_set_canvas_max_layer(RID p_env, int p_max
env->canvas_max_layer = p_max_layer;
}
-void RasterizerSceneGLES3::environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy, float p_skybox_contribution) {
+void RasterizerSceneGLES3::environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy, float p_sky_contribution) {
Environment *env = environment_owner.getornull(p_env);
ERR_FAIL_COND(!env);
env->ambient_color = p_color;
env->ambient_energy = p_energy;
- env->ambient_skybox_contribution = p_skybox_contribution;
+ env->ambient_sky_contribution = p_sky_contribution;
}
void RasterizerSceneGLES3::environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_amount, VS::EnvironmentDOFBlurQuality p_quality) {
@@ -2120,12 +2120,12 @@ void RasterizerSceneGLES3::_add_geometry(RasterizerStorageGLES3::Geometry *p_geo
}
}
-void RasterizerSceneGLES3::_draw_skybox(RasterizerStorageGLES3::SkyBox *p_skybox, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_scale) {
+void RasterizerSceneGLES3::_draw_sky(RasterizerStorageGLES3::Sky *p_sky, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_scale) {
- if (!p_skybox)
+ if (!p_sky)
return;
- RasterizerStorageGLES3::Texture *tex = storage->texture_owner.getornull(p_skybox->cubemap);
+ RasterizerStorageGLES3::Texture *tex = storage->texture_owner.getornull(p_sky->panorama);
ERR_FAIL_COND(!tex);
glActiveTexture(GL_TEXTURE0);
@@ -2164,7 +2164,7 @@ void RasterizerSceneGLES3::_draw_skybox(RasterizerStorageGLES3::SkyBox *p_skybox
};
- //skybox uv vectors
+ //sky uv vectors
float vw, vh, zn;
p_projection.get_viewport_size(vw, vh);
zn = p_projection.get_z_near();
@@ -2181,13 +2181,13 @@ void RasterizerSceneGLES3::_draw_skybox(RasterizerStorageGLES3::SkyBox *p_skybox
vertices[i * 2 + 1].z = -vertices[i * 2 + 1].z;
}
- glBindBuffer(GL_ARRAY_BUFFER, state.skybox_verts);
+ glBindBuffer(GL_ARRAY_BUFFER, state.sky_verts);
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(Vector3) * 8, vertices);
glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
- glBindVertexArray(state.skybox_array);
+ glBindVertexArray(state.sky_array);
- storage->shaders.copy.set_conditional(CopyShaderGLES3::USE_CUBEMAP, true);
+ storage->shaders.copy.set_conditional(CopyShaderGLES3::USE_PANORAMA, true);
storage->shaders.copy.bind();
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
@@ -2195,7 +2195,7 @@ void RasterizerSceneGLES3::_draw_skybox(RasterizerStorageGLES3::SkyBox *p_skybox
glBindVertexArray(0);
glColorMask(1, 1, 1, 1);
- storage->shaders.copy.set_conditional(CopyShaderGLES3::USE_CUBEMAP, false);
+ storage->shaders.copy.set_conditional(CopyShaderGLES3::USE_PANORAMA, false);
}
void RasterizerSceneGLES3::_setup_environment(Environment *env, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform) {
@@ -2239,7 +2239,7 @@ void RasterizerSceneGLES3::_setup_environment(Environment *env, const CameraMatr
state.ubo_data.bg_color[2] = bg_color.b;
state.ubo_data.bg_color[3] = bg_color.a;
- state.env_radiance_data.ambient_contribution = env->ambient_skybox_contribution;
+ state.env_radiance_data.ambient_contribution = env->ambient_sky_contribution;
state.ubo_data.ambient_occlusion_affect_light = env->ssao_light_affect;
} else {
state.ubo_data.bg_energy = 1.0;
@@ -2683,7 +2683,7 @@ void RasterizerSceneGLES3::_setup_reflections(RID *p_reflection_probe_cull_resul
ambient_linear.r *= p_env->ambient_energy;
ambient_linear.g *= p_env->ambient_energy;
ambient_linear.b *= p_env->ambient_energy;
- contrib = p_env->ambient_skybox_contribution;
+ contrib = p_env->ambient_sky_contribution;
}
reflection_ubo.ambient[0] = ambient_linear.r;
@@ -3807,7 +3807,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
Color clear_color(0, 0, 0, 0);
- RasterizerStorageGLES3::SkyBox *skybox = NULL;
+ RasterizerStorageGLES3::Sky *sky = NULL;
GLuint env_radiance_tex = 0;
if (!env || env->bg_mode == VS::ENV_BG_CLEAR_COLOR) {
@@ -3822,12 +3822,12 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
clear_color = env->bg_color.to_linear();
storage->frame.clear_request = false;
- } else if (env->bg_mode == VS::ENV_BG_SKYBOX) {
+ } else if (env->bg_mode == VS::ENV_BG_SKY) {
- skybox = storage->skybox_owner.getornull(env->skybox);
+ sky = storage->sky_owner.getornull(env->sky);
- if (skybox) {
- env_radiance_tex = skybox->radiance;
+ if (sky) {
+ env_radiance_tex = sky->radiance;
}
storage->frame.clear_request = false;
@@ -3878,14 +3878,14 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glDrawBuffers(1, &gldb);
}
- if (env && env->bg_mode == VS::ENV_BG_SKYBOX) {
+ if (env && env->bg_mode == VS::ENV_BG_SKY) {
/*
if (use_mrt) {
- glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for skybox, only diffuse/ambient matters
+ glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for sky, only diffuse/ambient matters
*/
- _draw_skybox(skybox, p_cam_projection, p_cam_transform, storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP], env->skybox_scale);
+ _draw_sky(sky, p_cam_projection, p_cam_transform, storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP], env->sky_scale);
}
//_render_list_forward(&alpha_render_list,camera_transform,camera_transform_inverse,camera_projection,false,fragment_lighting,true);
@@ -4585,14 +4585,14 @@ void RasterizerSceneGLES3::initialize() {
{
//quad buffers
- glGenBuffers(1, &state.skybox_verts);
- glBindBuffer(GL_ARRAY_BUFFER, state.skybox_verts);
+ glGenBuffers(1, &state.sky_verts);
+ glBindBuffer(GL_ARRAY_BUFFER, state.sky_verts);
glBufferData(GL_ARRAY_BUFFER, sizeof(Vector3) * 8, NULL, GL_DYNAMIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
- glGenVertexArrays(1, &state.skybox_array);
- glBindVertexArray(state.skybox_array);
- glBindBuffer(GL_ARRAY_BUFFER, state.skybox_verts);
+ glGenVertexArrays(1, &state.sky_array);
+ glBindVertexArray(state.sky_array);
+ glBindBuffer(GL_ARRAY_BUFFER, state.sky_verts);
glVertexAttribPointer(VS::ARRAY_VERTEX, 3, GL_FLOAT, GL_FALSE, sizeof(Vector3) * 2, 0);
glEnableVertexAttribArray(VS::ARRAY_VERTEX);
glVertexAttribPointer(VS::ARRAY_TEX_UV, 3, GL_FLOAT, GL_FALSE, sizeof(Vector3) * 2, ((uint8_t *)NULL) + sizeof(Vector3));
@@ -4831,7 +4831,12 @@ void RasterizerSceneGLES3::initialize() {
glGenTextures(1, &e.color);
glBindTexture(GL_TEXTURE_2D, e.color);
+#ifdef IPHONE_ENABLED
+ ///@TODO ugly hack to get around iOS not supporting 32bit single channel floating point textures...
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_FLOAT, NULL);
+#else
glTexImage2D(GL_TEXTURE_2D, 0, GL_R32F, max_exposure_shrink_size, max_exposure_shrink_size, 0, GL_RED, GL_FLOAT, NULL);
+#endif
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, e.color, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 33698fc267..69a7e40604 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -141,8 +141,8 @@ public:
GLuint brdf_texture;
- GLuint skybox_verts;
- GLuint skybox_array;
+ GLuint sky_verts;
+ GLuint sky_array;
GLuint directional_ubo;
@@ -329,16 +329,16 @@ public:
VS::EnvironmentBG bg_mode;
- RID skybox;
- float skybox_scale;
+ RID sky;
+ float sky_scale;
Color bg_color;
float bg_energy;
- float skybox_ambient;
+ float sky_ambient;
Color ambient_color;
float ambient_energy;
- float ambient_skybox_contribution;
+ float ambient_sky_contribution;
int canvas_max_layer;
@@ -393,11 +393,11 @@ public:
Environment() {
bg_mode = VS::ENV_BG_CLEAR_COLOR;
- skybox_scale = 1.0;
+ sky_scale = 1.0;
bg_energy = 1.0;
- skybox_ambient = 0;
+ sky_ambient = 0;
ambient_energy = 1.0;
- ambient_skybox_contribution = 0.0;
+ ambient_sky_contribution = 0.0;
canvas_max_layer = 0;
ssr_enabled = false;
@@ -455,12 +455,12 @@ public:
virtual RID environment_create();
virtual void environment_set_background(RID p_env, VS::EnvironmentBG p_bg);
- virtual void environment_set_skybox(RID p_env, RID p_skybox);
- virtual void environment_set_skybox_scale(RID p_env, float p_scale);
+ virtual void environment_set_sky(RID p_env, RID p_sky);
+ virtual void environment_set_sky_scale(RID p_env, float p_scale);
virtual void environment_set_bg_color(RID p_env, const Color &p_color);
virtual void environment_set_bg_energy(RID p_env, float p_energy);
virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer);
- virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_skybox_contribution = 0.0);
+ virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_sky_contribution = 0.0);
virtual void environment_set_dof_blur_near(RID p_env, bool p_enable, float p_distance, float p_transition, float p_far_amount, VS::EnvironmentDOFBlurQuality p_quality);
virtual void environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_far_amount, VS::EnvironmentDOFBlurQuality p_quality);
@@ -700,7 +700,7 @@ public:
_FORCE_INLINE_ void _add_geometry(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, int p_material, bool p_shadow);
- void _draw_skybox(RasterizerStorageGLES3::SkyBox *p_skybox, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_scale);
+ void _draw_sky(RasterizerStorageGLES3::Sky *p_sky, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_scale);
void _setup_environment(Environment *env, const CameraMatrix &p_cam_projection, const Transform &p_cam_transform);
void _setup_directional_light(int p_index, const Transform &p_camera_inverse_transformm, bool p_use_shadows);
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 1025acceb4..08ff687510 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -101,11 +101,11 @@
GLuint RasterizerStorageGLES3::system_fbo = 0;
-Image RasterizerStorageGLES3::_get_gl_image_and_format(const Image &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed, bool &srgb) {
+Ref<Image> RasterizerStorageGLES3::_get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_gl_type, bool &r_compressed, bool &srgb) {
r_compressed = false;
r_gl_format = 0;
- Image image = p_image;
+ Ref<Image> image = p_image;
srgb = false;
bool need_decompress = false;
@@ -538,16 +538,17 @@ Image RasterizerStorageGLES3::_get_gl_image_and_format(const Image &p_image, Ima
} break;
default: {
- ERR_FAIL_V(Image());
+ ERR_FAIL_V(Ref<Image>());
}
}
if (need_decompress) {
- if (!image.empty()) {
- image.decompress();
- ERR_FAIL_COND_V(image.is_compressed(), image);
- image.convert(Image::FORMAT_RGBA8);
+ if (!image.is_null()) {
+ image = image->duplicate();
+ image->decompress();
+ ERR_FAIL_COND_V(image->is_compressed(), image);
+ image->convert(Image::FORMAT_RGBA8);
}
r_gl_format = GL_RGBA;
@@ -607,7 +608,7 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_
texture->stored_cube_sides = 0;
texture->target = (p_flags & VS::TEXTURE_FLAG_CUBEMAP) ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D;
- _get_gl_image_and_format(Image(), texture->format, texture->flags, format, internal_format, type, compressed, srgb);
+ _get_gl_image_and_format(Ref<Image>(), texture->format, texture->flags, format, internal_format, type, compressed, srgb);
texture->alloc_width = texture->width;
texture->alloc_height = texture->height;
@@ -631,15 +632,15 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_
texture->active = true;
}
-void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Image &p_image, VS::CubeMapSide p_cube_side) {
+void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Ref<Image> &p_image, VS::CubeMapSide p_cube_side) {
Texture *texture = texture_owner.get(p_texture);
ERR_FAIL_COND(!texture);
ERR_FAIL_COND(!texture->active);
ERR_FAIL_COND(texture->render_target);
- ERR_FAIL_COND(texture->format != p_image.get_format());
- ERR_FAIL_COND(p_image.empty());
+ ERR_FAIL_COND(texture->format != p_image->get_format());
+ ERR_FAIL_COND(p_image.is_null());
GLenum type;
GLenum format;
@@ -651,31 +652,31 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Image &p_imag
texture->images[p_cube_side] = p_image;
}
- Image img = _get_gl_image_and_format(p_image, p_image.get_format(), texture->flags, format, internal_format, type, compressed, srgb);
+ Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), texture->flags, format, internal_format, type, compressed, srgb);
- if (config.shrink_textures_x2 && (p_image.has_mipmaps() || !p_image.is_compressed()) && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) {
+ if (config.shrink_textures_x2 && (p_image->has_mipmaps() || !p_image->is_compressed()) && !(texture->flags & VS::TEXTURE_FLAG_USED_FOR_STREAMING)) {
texture->alloc_height = MAX(1, texture->alloc_height / 2);
texture->alloc_width = MAX(1, texture->alloc_width / 2);
- if (texture->alloc_width == img.get_width() / 2 && texture->alloc_height == img.get_height() / 2) {
+ if (texture->alloc_width == img->get_width() / 2 && texture->alloc_height == img->get_height() / 2) {
- img.shrink_x2();
- } else if (img.get_format() <= Image::FORMAT_RGB565) {
+ img->shrink_x2();
+ } else if (img->get_format() <= Image::FORMAT_RGB565) {
- img.resize(texture->alloc_width, texture->alloc_height, Image::INTERPOLATE_BILINEAR);
+ img->resize(texture->alloc_width, texture->alloc_height, Image::INTERPOLATE_BILINEAR);
}
};
GLenum blit_target = (texture->target == GL_TEXTURE_CUBE_MAP) ? _cube_side_enum[p_cube_side] : GL_TEXTURE_2D;
- texture->data_size = img.get_data().size();
- PoolVector<uint8_t>::Read read = img.get_data().read();
+ texture->data_size = img->get_data().size();
+ PoolVector<uint8_t>::Read read = img->get_data().read();
glActiveTexture(GL_TEXTURE0);
glBindTexture(texture->target, texture->tex_id);
- texture->ignore_mipmaps = compressed && !img.has_mipmaps();
+ texture->ignore_mipmaps = compressed && !img->has_mipmaps();
if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps)
glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, config.use_fast_texture_filter ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR_MIPMAP_LINEAR);
@@ -761,16 +762,16 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Image &p_imag
}
}
- int mipmaps = (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && img.has_mipmaps()) ? img.get_mipmap_count() + 1 : 1;
+ int mipmaps = (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && img->has_mipmaps()) ? img->get_mipmap_count() + 1 : 1;
- int w = img.get_width();
- int h = img.get_height();
+ int w = img->get_width();
+ int h = img->get_height();
int tsize = 0;
for (int i = 0; i < mipmaps; i++) {
int size, ofs;
- img.get_mipmap_offset_and_size(i, ofs, size);
+ img->get_mipmap_offset_and_size(i, ofs, size);
//print_line("mipmap: "+itos(i)+" size: "+itos(size)+" w: "+itos(mm_w)+", h: "+itos(mm_h));
@@ -813,16 +814,16 @@ void RasterizerStorageGLES3::texture_set_data(RID p_texture, const Image &p_imag
//texture_set_flags(p_texture,texture->flags);
}
-Image RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side) const {
+Ref<Image> RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side) const {
Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND_V(!texture, Image());
- ERR_FAIL_COND_V(!texture->active, Image());
- ERR_FAIL_COND_V(texture->data_size == 0, Image());
- ERR_FAIL_COND_V(texture->render_target, Image());
+ ERR_FAIL_COND_V(!texture, Ref<Image>());
+ ERR_FAIL_COND_V(!texture->active, Ref<Image>());
+ ERR_FAIL_COND_V(texture->data_size == 0, Ref<Image>());
+ ERR_FAIL_COND_V(texture->render_target, Ref<Image>());
- if (!texture->images[p_cube_side].empty()) {
+ if (!texture->images[p_cube_side].is_null()) {
return texture->images[p_cube_side];
}
@@ -867,13 +868,13 @@ Image RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSide p_
data.resize(data_size);
- Image img(texture->alloc_width, texture->alloc_height, texture->mipmaps > 1 ? true : false, texture->format, data);
+ Image *img = memnew(Image(texture->alloc_width, texture->alloc_height, texture->mipmaps > 1 ? true : false, texture->format, data));
- return img;
+ return Ref<Image>(img);
#else
ERR_EXPLAIN("Sorry, It's not posible to obtain images back in OpenGL ES");
- return Image();
+ return Ref<Image>();
#endif
}
@@ -969,6 +970,14 @@ Image::Format RasterizerStorageGLES3::texture_get_format(RID p_texture) const {
return texture->format;
}
+uint32_t RasterizerStorageGLES3::texture_get_texid(RID p_texture) const {
+
+ Texture *texture = texture_owner.get(p_texture);
+
+ ERR_FAIL_COND_V(!texture, 0);
+
+ return texture->tex_id;
+}
uint32_t RasterizerStorageGLES3::texture_get_width(RID p_texture) const {
Texture *texture = texture_owner.get(p_texture);
@@ -1204,32 +1213,32 @@ RID RasterizerStorageGLES3::texture_create_radiance_cubemap(RID p_source, int p_
return texture_owner.make_rid(ctex);
}
-RID RasterizerStorageGLES3::skybox_create() {
+RID RasterizerStorageGLES3::sky_create() {
- SkyBox *skybox = memnew(SkyBox);
- skybox->radiance = 0;
- return skybox_owner.make_rid(skybox);
+ Sky *sky = memnew(Sky);
+ sky->radiance = 0;
+ return sky_owner.make_rid(sky);
}
-void RasterizerStorageGLES3::skybox_set_texture(RID p_skybox, RID p_cube_map, int p_radiance_size) {
+void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_radiance_size) {
- SkyBox *skybox = skybox_owner.getornull(p_skybox);
- ERR_FAIL_COND(!skybox);
+ Sky *sky = sky_owner.getornull(p_sky);
+ ERR_FAIL_COND(!sky);
- if (skybox->cubemap.is_valid()) {
- skybox->cubemap = RID();
- glDeleteTextures(1, &skybox->radiance);
- skybox->radiance = 0;
+ if (sky->panorama.is_valid()) {
+ sky->panorama = RID();
+ glDeleteTextures(1, &sky->radiance);
+ sky->radiance = 0;
}
- skybox->cubemap = p_cube_map;
- if (!skybox->cubemap.is_valid())
+ sky->panorama = p_panorama;
+ if (!sky->panorama.is_valid())
return; //cleared
- Texture *texture = texture_owner.getornull(skybox->cubemap);
- if (!texture || !(texture->flags & VS::TEXTURE_FLAG_CUBEMAP)) {
- skybox->cubemap = RID();
- ERR_FAIL_COND(!texture || !(texture->flags & VS::TEXTURE_FLAG_CUBEMAP));
+ Texture *texture = texture_owner.getornull(sky->panorama);
+ if (!texture) {
+ sky->panorama = RID();
+ ERR_FAIL_COND(!texture);
}
glBindVertexArray(0);
@@ -1254,8 +1263,8 @@ void RasterizerStorageGLES3::skybox_set_texture(RID p_skybox, RID p_cube_map, in
}
glActiveTexture(GL_TEXTURE1);
- glGenTextures(1, &skybox->radiance);
- glBindTexture(GL_TEXTURE_2D, skybox->radiance);
+ glGenTextures(1, &sky->radiance);
+ glBindTexture(GL_TEXTURE_2D, sky->radiance);
GLuint tmp_fb;
@@ -1295,11 +1304,12 @@ void RasterizerStorageGLES3::skybox_set_texture(RID p_skybox, RID p_cube_map, in
size = p_radiance_size;
shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_DUAL_PARABOLOID, true);
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_PANORAMA, true);
shaders.cubemap_filter.bind();
while (mm_level) {
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, skybox->radiance, lod);
+ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sky->radiance, lod);
#ifdef DEBUG_ENABLED
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE);
@@ -1322,6 +1332,7 @@ void RasterizerStorageGLES3::skybox_set_texture(RID p_skybox, RID p_cube_map, in
mm_level--;
}
shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_DUAL_PARABOLOID, false);
+ shaders.cubemap_filter.set_conditional(CubemapFilterShaderGLES3::USE_PANORAMA, false);
//restore ranges
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
@@ -6107,12 +6118,12 @@ bool RasterizerStorageGLES3::free(RID p_rid) {
info.texture_mem -= texture->total_data_size;
texture_owner.free(p_rid);
memdelete(texture);
- } else if (skybox_owner.owns(p_rid)) {
- // delete the skybox
- SkyBox *skybox = skybox_owner.get(p_rid);
- skybox_set_texture(p_rid, RID(), 256);
- skybox_owner.free(p_rid);
- memdelete(skybox);
+ } else if (sky_owner.owns(p_rid)) {
+ // delete the sky
+ Sky *sky = sky_owner.get(p_rid);
+ sky_set_texture(p_rid, RID(), 256);
+ sky_owner.free(p_rid);
+ memdelete(sky);
} else if (shader_owner.owns(p_rid)) {
@@ -6469,7 +6480,7 @@ void RasterizerStorageGLES3::initialize() {
glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
}
- //generic quadie for copying without touching skybox
+ //generic quadie for copying without touching sky
{
//transform feedback buffers
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index bb4a7e23a1..26b7cea45e 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/drivers/gles3/rasterizer_storage_gles3.h
@@ -240,7 +240,7 @@ public:
RenderTarget *render_target;
- Image images[6];
+ Ref<Image> images[6];
VisualServer::TextureDetectCallback detect_3d;
void *detect_3d_ud;
@@ -280,15 +280,16 @@ public:
mutable RID_Owner<Texture> texture_owner;
- Image _get_gl_image_and_format(const Image &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_type, bool &r_compressed, bool &srgb);
+ Ref<Image> _get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, GLenum &r_type, bool &r_compressed, bool &srgb);
virtual RID texture_create();
virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT);
- virtual void texture_set_data(RID p_texture, const Image &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT);
- virtual Image texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const;
+ virtual void texture_set_data(RID p_texture, const Ref<Image> &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT);
+ virtual Ref<Image> texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const;
virtual void texture_set_flags(RID p_texture, uint32_t p_flags);
virtual uint32_t texture_get_flags(RID p_texture) const;
virtual Image::Format texture_get_format(RID p_texture) const;
+ virtual uint32_t texture_get_texid(RID p_texture) const;
virtual uint32_t texture_get_width(RID p_texture) const;
virtual uint32_t texture_get_height(RID p_texture) const;
virtual void texture_set_size_override(RID p_texture, int p_width, int p_height);
@@ -307,19 +308,19 @@ public:
virtual void texture_set_detect_3d_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
virtual void texture_set_detect_srgb_callback(RID p_texture, VisualServer::TextureDetectCallback p_callback, void *p_userdata);
- /* SKYBOX API */
+ /* SKY API */
- struct SkyBox : public RID_Data {
+ struct Sky : public RID_Data {
- RID cubemap;
+ RID panorama;
GLuint radiance;
int radiance_size;
};
- mutable RID_Owner<SkyBox> skybox_owner;
+ mutable RID_Owner<Sky> sky_owner;
- virtual RID skybox_create();
- virtual void skybox_set_texture(RID p_skybox, RID p_cube_map, int p_radiance_size);
+ virtual RID sky_create();
+ virtual void sky_set_texture(RID p_sky, RID p_panorama, int p_radiance_size);
/* SHADER API */
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 89b056df84..23bcb79b46 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -383,7 +383,7 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
String vcode;
vcode += _prestr(E->get().precission);
vcode += _typestr(E->get().type);
- vcode += " " + String(E->key());
+ vcode += " " + _mkid(E->key());
vcode += ";\n";
r_gen_code.vertex_global += "out " + vcode;
r_gen_code.fragment_global += "in " + vcode;
diff --git a/drivers/gles3/shaders/copy.glsl b/drivers/gles3/shaders/copy.glsl
index a87d62f2d7..f3c72a4e6f 100644
--- a/drivers/gles3/shaders/copy.glsl
+++ b/drivers/gles3/shaders/copy.glsl
@@ -2,14 +2,14 @@
layout(location=0) in highp vec4 vertex_attrib;
-#ifdef USE_CUBEMAP
+#if defined(USE_CUBEMAP) || defined(USE_PANORAMA)
layout(location=4) in vec3 cube_in;
#else
layout(location=4) in vec2 uv_in;
#endif
layout(location=5) in vec2 uv2_in;
-#ifdef USE_CUBEMAP
+#if defined(USE_CUBEMAP) || defined(USE_PANORAMA)
out vec3 cube_interp;
#else
out vec2 uv_interp;
@@ -19,7 +19,7 @@ out vec2 uv2_interp;
void main() {
-#ifdef USE_CUBEMAP
+#if defined(USE_CUBEMAP) || defined(USE_PANORAMA)
cube_interp = cube_in;
#else
uv_interp = uv_in;
@@ -30,15 +30,40 @@ void main() {
[fragment]
+#define M_PI 3.14159265359
-#ifdef USE_CUBEMAP
+
+#if defined(USE_CUBEMAP) || defined(USE_PANORAMA)
in vec3 cube_interp;
-uniform samplerCube source_cube; //texunit:0
#else
in vec2 uv_interp;
+#endif
+
+#ifdef USE_CUBEMAP
+uniform samplerCube source_cube; //texunit:0
+#else
uniform sampler2D source; //texunit:0
#endif
+#ifdef USE_PANORAMA
+
+vec4 texturePanorama(vec3 normal,sampler2D pano ) {
+
+ vec2 st = vec2(
+ atan(normal.x, normal.z),
+ acos(normal.y)
+ );
+
+ if(st.x < 0.0)
+ st.x += M_PI*2.0;
+
+ st/=vec2(M_PI*2.0,M_PI);
+
+ return textureLod(pano,st,0.0);
+
+}
+
+#endif
float sRGB_gamma_correct(float c){
float a = 0.055;
@@ -60,13 +85,19 @@ void main() {
//vec4 color = color_interp;
-#ifdef USE_CUBEMAP
+#ifdef USE_PANORAMA
+
+ vec4 color = texturePanorama( normalize(cube_interp), source );
+
+#elif defined(USE_CUBEMAP)
vec4 color = texture( source_cube, normalize(cube_interp) );
#else
vec4 color = texture( source, uv_interp );
#endif
+
+
#ifdef LINEAR_TO_SRGB
//regular Linear -> SRGB conversion
vec3 a = vec3(0.055);
diff --git a/drivers/gles3/shaders/cubemap_filter.glsl b/drivers/gles3/shaders/cubemap_filter.glsl
index 768d20ad22..2aec6380f5 100644
--- a/drivers/gles3/shaders/cubemap_filter.glsl
+++ b/drivers/gles3/shaders/cubemap_filter.glsl
@@ -19,8 +19,12 @@ void main() {
precision highp float;
precision highp int;
-
+#ifdef USE_PANORAMA
+uniform sampler2D source_panorama; //texunit:0
+#else
uniform samplerCube source_cube; //texunit:0
+#endif
+
uniform int face_id;
uniform float roughness;
in highp vec2 uv_interp;
@@ -165,6 +169,26 @@ vec2 Hammersley(uint i, uint N) {
uniform bool z_flip;
+#ifdef USE_PANORAMA
+
+vec4 texturePanorama(vec3 normal,sampler2D pano ) {
+
+ vec2 st = vec2(
+ atan(normal.x, normal.z),
+ acos(normal.y)
+ );
+
+ if(st.x < 0.0)
+ st.x += M_PI*2.0;
+
+ st/=vec2(M_PI*2.0,M_PI);
+
+ return textureLod(pano,st,0.0);
+
+}
+
+#endif
+
void main() {
#ifdef USE_DUAL_PARABOLOID
@@ -188,7 +212,12 @@ void main() {
#ifdef USE_DIRECT_WRITE
+#ifdef USE_PANORAMA
+
+ frag_color=vec4(texturePanorama(N,source_panorama).rgb,1.0);
+#else
frag_color=vec4(texture(N,source_cube).rgb,1.0);
+#endif
#else
@@ -204,7 +233,11 @@ void main() {
float ndotl = clamp(dot(N, L),0.0,1.0);
if (ndotl>0.0) {
+#ifdef USE_PANORAMA
+ sum.rgb += texturePanorama(H,source_panorama).rgb *ndotl;
+#else
sum.rgb += textureLod(source_cube, H, 0.0).rgb *ndotl;
+#endif
sum.a += ndotl;
}
}
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp
index c9677bed11..fe2372e3af 100644
--- a/drivers/png/image_loader_png.cpp
+++ b/drivers/png/image_loader_png.cpp
@@ -68,7 +68,7 @@ static void _png_warn_function(png_structp, png_const_charp text) {
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
-Error ImageLoaderPNG::_load_image(void *rf_up, png_rw_ptr p_func, Image *p_image) {
+Error ImageLoaderPNG::_load_image(void *rf_up, png_rw_ptr p_func, Ref<Image> p_image) {
png_structp png;
png_infop info;
@@ -201,7 +201,7 @@ Error ImageLoaderPNG::_load_image(void *rf_up, png_rw_ptr p_func, Image *p_image
return OK;
}
-Error ImageLoaderPNG::load_image(Image *p_image, FileAccess *f) {
+Error ImageLoaderPNG::load_image(Ref<Image> p_image, FileAccess *f) {
Error err = _load_image(f, _read_png_data, p_image);
f->close();
@@ -238,25 +238,26 @@ static void user_read_data(png_structp png_ptr, png_bytep data, png_size_t p_len
}
}
-static Image _load_mem_png(const uint8_t *p_png, int p_size) {
+static Ref<Image> _load_mem_png(const uint8_t *p_png, int p_size) {
PNGReadStatus prs;
prs.image = p_png;
prs.offset = 0;
prs.size = p_size;
- Image img;
- Error err = ImageLoaderPNG::_load_image(&prs, user_read_data, &img);
- ERR_FAIL_COND_V(err, Image());
+ Ref<Image> img;
+ img.instance();
+ Error err = ImageLoaderPNG::_load_image(&prs, user_read_data, img);
+ ERR_FAIL_COND_V(err, Ref<Image>());
return img;
}
-static Image _lossless_unpack_png(const PoolVector<uint8_t> &p_data) {
+static Ref<Image> _lossless_unpack_png(const PoolVector<uint8_t> &p_data) {
int len = p_data.size();
PoolVector<uint8_t>::Read r = p_data.read();
- ERR_FAIL_COND_V(r[0] != 'P' || r[1] != 'N' || r[2] != 'G' || r[3] != ' ', Image());
+ ERR_FAIL_COND_V(r[0] != 'P' || r[1] != 'N' || r[2] != 'G' || r[3] != ' ', Ref<Image>());
return _load_mem_png(&r[4], len - 4);
}
@@ -271,13 +272,14 @@ static void _write_png_data(png_structp png_ptr, png_bytep data, png_size_t p_le
//print_line("png write: "+itos(p_length));
}
-static PoolVector<uint8_t> _lossless_pack_png(const Image &p_image) {
+static PoolVector<uint8_t> _lossless_pack_png(const Ref<Image> &p_image) {
- Image img = p_image;
- if (img.is_compressed())
- img.decompress();
+ Ref<Image> img = p_image->duplicate();
- ERR_FAIL_COND_V(img.is_compressed(), PoolVector<uint8_t>());
+ if (img->is_compressed())
+ img->decompress();
+
+ ERR_FAIL_COND_V(img->is_compressed(), PoolVector<uint8_t>());
png_structp png_ptr;
png_infop info_ptr;
@@ -311,7 +313,7 @@ static PoolVector<uint8_t> _lossless_pack_png(const Image &p_image) {
int pngf = 0;
int cs = 0;
- switch (img.get_format()) {
+ switch (img->get_format()) {
case Image::FORMAT_L8: {
@@ -335,22 +337,22 @@ static PoolVector<uint8_t> _lossless_pack_png(const Image &p_image) {
} break;
default: {
- if (img.detect_alpha()) {
+ if (img->detect_alpha()) {
- img.convert(Image::FORMAT_RGBA8);
+ img->convert(Image::FORMAT_RGBA8);
pngf = PNG_COLOR_TYPE_RGB_ALPHA;
cs = 4;
} else {
- img.convert(Image::FORMAT_RGB8);
+ img->convert(Image::FORMAT_RGB8);
pngf = PNG_COLOR_TYPE_RGB;
cs = 3;
}
}
}
- int w = img.get_width();
- int h = img.get_height();
+ int w = img->get_width();
+ int h = img->get_height();
png_set_IHDR(png_ptr, info_ptr, w, h,
8, pngf, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
@@ -362,7 +364,7 @@ static PoolVector<uint8_t> _lossless_pack_png(const Image &p_image) {
ERR_FAIL_V(PoolVector<uint8_t>());
}
- PoolVector<uint8_t>::Read r = img.get_data().read();
+ PoolVector<uint8_t>::Read r = img->get_data().read();
row_pointers = (png_bytep *)memalloc(sizeof(png_bytep) * h);
for (int i = 0; i < h; i++) {
diff --git a/drivers/png/image_loader_png.h b/drivers/png/image_loader_png.h
index 78e4252e26..f94b8bce6e 100644
--- a/drivers/png/image_loader_png.h
+++ b/drivers/png/image_loader_png.h
@@ -42,8 +42,8 @@ class ImageLoaderPNG : public ImageFormatLoader {
static void _read_png_data(png_structp png_ptr, png_bytep data, png_size_t p_length);
public:
- static Error _load_image(void *rf_up, png_rw_ptr p_func, Image *p_image);
- virtual Error load_image(Image *p_image, FileAccess *f);
+ static Error _load_image(void *rf_up, png_rw_ptr p_func, Ref<Image> p_image);
+ virtual Error load_image(Ref<Image> p_image, FileAccess *f);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
ImageLoaderPNG();
};
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index b754ef97b4..1700603489 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -50,7 +50,7 @@ Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32
ERR_EXPLAIN("Can't save empty texture as PNG");
ERR_FAIL_COND_V(!texture->get_width() || !texture->get_height(), ERR_INVALID_PARAMETER);
- Image img = texture->get_data();
+ Ref<Image> img = texture->get_data();
Error err = save_image(p_path, img);
@@ -95,12 +95,14 @@ Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32
return err;
};
-Error ResourceSaverPNG::save_image(const String &p_path, Image &p_img) {
+Error ResourceSaverPNG::save_image(const String &p_path, const Ref<Image> &p_img) {
- if (p_img.is_compressed())
- p_img.decompress();
+ Ref<Image> img = p_img->duplicate();
- ERR_FAIL_COND_V(p_img.is_compressed(), ERR_INVALID_PARAMETER);
+ if (img->is_compressed())
+ img->decompress();
+
+ ERR_FAIL_COND_V(img->is_compressed(), ERR_INVALID_PARAMETER);
png_structp png_ptr;
png_infop info_ptr;
@@ -135,7 +137,7 @@ Error ResourceSaverPNG::save_image(const String &p_path, Image &p_img) {
int pngf = 0;
int cs = 0;
- switch (p_img.get_format()) {
+ switch (img->get_format()) {
case Image::FORMAT_L8: {
@@ -159,22 +161,22 @@ Error ResourceSaverPNG::save_image(const String &p_path, Image &p_img) {
} break;
default: {
- if (p_img.detect_alpha()) {
+ if (img->detect_alpha()) {
- p_img.convert(Image::FORMAT_RGBA8);
+ img->convert(Image::FORMAT_RGBA8);
pngf = PNG_COLOR_TYPE_RGB_ALPHA;
cs = 4;
} else {
- p_img.convert(Image::FORMAT_RGB8);
+ img->convert(Image::FORMAT_RGB8);
pngf = PNG_COLOR_TYPE_RGB;
cs = 3;
}
}
}
- int w = p_img.get_width();
- int h = p_img.get_height();
+ int w = img->get_width();
+ int h = img->get_height();
png_set_IHDR(png_ptr, info_ptr, w, h,
8, pngf, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
@@ -187,7 +189,7 @@ Error ResourceSaverPNG::save_image(const String &p_path, Image &p_img) {
ERR_FAIL_V(ERR_CANT_OPEN);
}
- PoolVector<uint8_t>::Read r = p_img.get_data().read();
+ PoolVector<uint8_t>::Read r = img->get_data().read();
row_pointers = (png_bytep *)memalloc(sizeof(png_bytep) * h);
for (int i = 0; i < h; i++) {
diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h
index c25a01c1f6..31ec35c192 100644
--- a/drivers/png/resource_saver_png.h
+++ b/drivers/png/resource_saver_png.h
@@ -30,11 +30,12 @@
#ifndef RESOURCE_SAVER_PNG_H
#define RESOURCE_SAVER_PNG_H
+#include "image.h"
#include "io/resource_saver.h"
class ResourceSaverPNG : public ResourceFormatSaver {
public:
- static Error save_image(const String &p_path, Image &p_img);
+ static Error save_image(const String &p_path, const Ref<Image> &p_img);
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
virtual bool recognize(const RES &p_resource) const;
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 1e6562fcf2..7c29162e67 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -154,13 +154,15 @@ private:
}
}
- void _gui_input(const InputEvent &p_ev) {
- if (p_ev.type == InputEvent::MOUSE_MOTION && p_ev.mouse_motion.button_mask & BUTTON_MASK_LEFT) {
+ void _gui_input(const Ref<InputEvent> &p_ev) {
+
+ Ref<InputEventMouseMotion> mm = p_ev;
+ if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
if (mode == MODE_DISABLED)
return;
- float rel = p_ev.mouse_motion.relative_x;
+ float rel = mm->get_relative().x;
if (rel == 0)
return;
@@ -1035,7 +1037,7 @@ void AnimationKeyEditor::_track_pos_draw() {
//draw position
int pixel = (timeline_pos - h_scroll->get_value()) * zoom_scale;
pixel += name_limit;
- track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), get_color("animation_editor_track_pos", "Editor"));
+ track_pos->draw_line(ofs + Point2(pixel, 0), ofs + Point2(pixel, size.height), get_color("highlight_color", "Editor"));
}
}
@@ -1089,12 +1091,12 @@ void AnimationKeyEditor::_track_editor_draw() {
int sep = get_constant("vseparation", "Tree");
int hsep = get_constant("hseparation", "Tree");
Color color = get_color("font_color", "Tree");
- Color sepcolor = get_color("guide_color", "Editor");
- Color timecolor = get_color("animation_editor_time", "Editor");
+ Color sepcolor = get_color("light_color_1", "Editor");
+ Color timecolor = get_color("dark_color_2", "Editor");
Color hover_color = Color(1, 1, 1, 0.05);
Color select_color = Color(1, 1, 1, 0.1);
Color invalid_path_color = Color(1, 0.6, 0.4, 0.5);
- Color track_select_color = Color::html("ffbd8e8e");
+ Color track_select_color = get_color("highlight_color", "Editor");
Ref<Texture> remove_icon = get_icon("Remove", "EditorIcons");
Ref<Texture> move_up_icon = get_icon("MoveUp", "EditorIcons");
@@ -1154,9 +1156,8 @@ void AnimationKeyEditor::_track_editor_draw() {
int settings_limit = size.width - right_separator_ofs;
int name_limit = settings_limit * name_column_ratio;
- Color line_color = get_color("animation_editor_line", "Editor");
- te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), line_color);
- te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), line_color);
+ te->draw_line(ofs + Point2(name_limit, 0), ofs + Point2(name_limit, size.height), color);
+ te->draw_line(ofs + Point2(settings_limit, 0), ofs + Point2(settings_limit, size.height), color);
te->draw_texture(hsize_icon, ofs + Point2(name_limit - hsize_icon->get_width() - hsep, (h - hsize_icon->get_height()) / 2));
te->draw_line(ofs + Point2(0, h), ofs + Point2(size.width, h), color);
@@ -1179,11 +1180,7 @@ void AnimationKeyEditor::_track_editor_draw() {
int end_px = (l - h_scroll->get_value()) * scale;
int begin_px = -h_scroll->get_value() * scale;
- Color notimecol;
- notimecol.r = timecolor.gray();
- notimecol.g = notimecol.r;
- notimecol.b = notimecol.r;
- notimecol.a = timecolor.a;
+ Color notimecol = get_color("light_color_1", "Editor");
{
@@ -1483,7 +1480,9 @@ void AnimationKeyEditor::_track_editor_draw() {
switch (click.click) {
case ClickOver::CLICK_SELECT_KEYS: {
- te->draw_rect(Rect2(click.at, click.to - click.at), get_color("animation_editor_selection_rect", "Editor"));
+ Color box_color = get_color("highlight_color", "Editor");
+ box_color.a = 0.35;
+ te->draw_rect(Rect2(click.at, click.to - click.at), box_color);
} break;
case ClickOver::CLICK_MOVE_KEYS: {
@@ -1749,7 +1748,7 @@ void AnimationKeyEditor::_anim_delete_keys() {
}
}
-void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
+void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input) {
Control *te = track_editor;
Ref<StyleBox> style = get_stylebox("normal", "TextEdit");
@@ -1807,1087 +1806,1083 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent &p_input) {
int settings_limit = size.width - right_separator_ofs;
int name_limit = settings_limit * name_column_ratio;
- switch (p_input.type) {
+ Ref<InputEventKey> key = p_input;
+ if (key.is_valid()) {
- case InputEvent::KEY: {
+ if (key->get_scancode() == KEY_D && key->is_pressed() && key->get_command()) {
- if (p_input.key.scancode == KEY_D && p_input.key.pressed && p_input.key.mod.command) {
+ if (key->get_shift())
+ _menu_track(TRACK_MENU_DUPLICATE_TRANSPOSE);
+ else
+ _menu_track(TRACK_MENU_DUPLICATE);
- if (p_input.key.mod.shift)
- _menu_track(TRACK_MENU_DUPLICATE_TRANSPOSE);
- else
- _menu_track(TRACK_MENU_DUPLICATE);
+ accept_event();
- accept_event();
+ } else if (key->get_scancode() == KEY_DELETE && key->is_pressed() && click.click == ClickOver::CLICK_NONE) {
- } else if (p_input.key.scancode == KEY_DELETE && p_input.key.pressed && click.click == ClickOver::CLICK_NONE) {
+ _anim_delete_keys();
+ } else if (animation.is_valid() && animation->get_track_count() > 0) {
- _anim_delete_keys();
- } else if (animation.is_valid() && animation->get_track_count() > 0) {
-
- if (p_input.is_pressed() && (p_input.is_action("ui_up") || p_input.is_action("ui_page_up"))) {
+ if (key->is_pressed() && (key->is_action("ui_up") || key->is_action("ui_page_up"))) {
- if (p_input.is_action("ui_up"))
- selected_track--;
- if (v_scroll->is_visible_in_tree() && p_input.is_action("ui_page_up"))
- selected_track--;
+ if (key->is_action("ui_up"))
+ selected_track--;
+ if (v_scroll->is_visible_in_tree() && key->is_action("ui_page_up"))
+ selected_track--;
- if (selected_track < 0)
- selected_track = 0;
+ if (selected_track < 0)
+ selected_track = 0;
- if (v_scroll->is_visible_in_tree()) {
- if (v_scroll->get_value() > selected_track)
- v_scroll->set_value(selected_track);
- }
-
- track_editor->update();
- accept_event();
+ if (v_scroll->is_visible_in_tree()) {
+ if (v_scroll->get_value() > selected_track)
+ v_scroll->set_value(selected_track);
}
- if (p_input.is_pressed() && (p_input.is_action("ui_down") || p_input.is_action("ui_page_down"))) {
+ track_editor->update();
+ accept_event();
+ }
- if (p_input.is_action("ui_down"))
- selected_track++;
- else if (v_scroll->is_visible_in_tree() && p_input.is_action("ui_page_down"))
- selected_track += v_scroll->get_page();
+ if (key->is_pressed() && (key->is_action("ui_down") || key->is_action("ui_page_down"))) {
- if (selected_track >= animation->get_track_count())
- selected_track = animation->get_track_count() - 1;
+ if (key->is_action("ui_down"))
+ selected_track++;
+ else if (v_scroll->is_visible_in_tree() && key->is_action("ui_page_down"))
+ selected_track += v_scroll->get_page();
- if (v_scroll->is_visible_in_tree() && v_scroll->get_page() + v_scroll->get_value() < selected_track + 1) {
- v_scroll->set_value(selected_track - v_scroll->get_page() + 1);
- }
+ if (selected_track >= animation->get_track_count())
+ selected_track = animation->get_track_count() - 1;
- track_editor->update();
- accept_event();
+ if (v_scroll->is_visible_in_tree() && v_scroll->get_page() + v_scroll->get_value() < selected_track + 1) {
+ v_scroll->set_value(selected_track - v_scroll->get_page() + 1);
}
+
+ track_editor->update();
+ accept_event();
}
+ }
+ }
- } break;
- case InputEvent::MOUSE_BUTTON: {
+ Ref<InputEventMouseButton> mb = p_input;
- const InputEventMouseButton &mb = p_input.mouse_button;
+ if (mb.is_valid()) {
- if (mb.button_index == BUTTON_WHEEL_UP && mb.pressed) {
+ if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
- if (mb.mod.command) {
+ if (mb->get_command()) {
- zoom->set_value(zoom->get_value() + zoom->get_step());
- } else {
+ zoom->set_value(zoom->get_value() + zoom->get_step());
+ } else {
- v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * mb.factor / 8);
- }
+ v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * mb->get_factor() / 8);
}
+ }
- if (mb.button_index == BUTTON_WHEEL_DOWN && mb.pressed) {
+ if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
- if (mb.mod.command) {
+ if (mb->get_command()) {
- zoom->set_value(zoom->get_value() - zoom->get_step());
- } else {
+ zoom->set_value(zoom->get_value() - zoom->get_step());
+ } else {
- v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * mb.factor / 8);
- }
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * mb->get_factor() / 8);
}
+ }
- if (mb.button_index == BUTTON_WHEEL_RIGHT && mb.pressed) {
+ if (mb->get_button_index() == BUTTON_WHEEL_RIGHT && mb->is_pressed()) {
- h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * mb.factor / 8);
- }
+ h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * mb->get_factor() / 8);
+ }
- if (mb.button_index == BUTTON_WHEEL_LEFT && mb.pressed) {
+ if (mb->get_button_index() == BUTTON_WHEEL_LEFT && mb->is_pressed()) {
- v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * mb.factor / 8);
- }
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * mb->get_factor() / 8);
+ }
- if (mb.button_index == BUTTON_RIGHT && mb.pressed) {
+ if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
- Point2 mpos = Point2(mb.x, mb.y) - ofs;
+ Point2 mpos = mb->get_pos() - ofs;
- if (selection.size() == 0) {
- // Auto-select on right-click if nothing is selected
- // Note: This code is pretty much duplicated from the left click code,
- // both codes could be moved into a function to avoid the duplicated code.
- Point2 mpos = Point2(mb.x, mb.y) - ofs;
+ if (selection.size() == 0) {
+ // Auto-select on right-click if nothing is selected
+ // Note: This code is pretty much duplicated from the left click code,
+ // both codes could be moved into a function to avoid the duplicated code.
+ Point2 mpos = mb->get_pos() - ofs;
- if (mpos.y < h) {
- return;
- }
+ if (mpos.y < h) {
+ return;
+ }
- mpos.y -= h;
+ mpos.y -= h;
- int idx = mpos.y / h;
- idx += v_scroll->get_value();
- if (idx < 0 || idx >= animation->get_track_count())
- break;
+ int idx = mpos.y / h;
+ idx += v_scroll->get_value();
+ if (idx < 0 || idx >= animation->get_track_count())
+ return;
- if (mpos.x < name_limit) {
- } else if (mpos.x < settings_limit) {
- float pos = mpos.x - name_limit;
- pos /= _get_zoom_scale();
- pos += h_scroll->get_value();
- float w_time = (type_icon[0]->get_width() / _get_zoom_scale()) / 2.0;
+ if (mpos.x < name_limit) {
+ } else if (mpos.x < settings_limit) {
+ float pos = mpos.x - name_limit;
+ pos /= _get_zoom_scale();
+ pos += h_scroll->get_value();
+ float w_time = (type_icon[0]->get_width() / _get_zoom_scale()) / 2.0;
- int kidx = animation->track_find_key(idx, pos);
- int kidx_n = kidx + 1;
- int key = -1;
+ int kidx = animation->track_find_key(idx, pos);
+ int kidx_n = kidx + 1;
+ int key = -1;
- if (kidx >= 0 && kidx < animation->track_get_key_count(idx)) {
+ if (kidx >= 0 && kidx < animation->track_get_key_count(idx)) {
- float kpos = animation->track_get_key_time(idx, kidx);
- if (ABS(pos - kpos) <= w_time) {
+ float kpos = animation->track_get_key_time(idx, kidx);
+ if (ABS(pos - kpos) <= w_time) {
- key = kidx;
- }
+ key = kidx;
}
+ }
- if (key == -1 && kidx_n >= 0 && kidx_n < animation->track_get_key_count(idx)) {
+ if (key == -1 && kidx_n >= 0 && kidx_n < animation->track_get_key_count(idx)) {
- float kpos = animation->track_get_key_time(idx, kidx_n);
- if (ABS(pos - kpos) <= w_time) {
+ float kpos = animation->track_get_key_time(idx, kidx_n);
+ if (ABS(pos - kpos) <= w_time) {
- key = kidx_n;
- }
+ key = kidx_n;
}
+ }
- if (key == -1) {
+ if (key == -1) {
- click.click = ClickOver::CLICK_SELECT_KEYS;
- click.at = Point2(mb.x, mb.y);
- click.to = click.at;
- click.shift = mb.mod.shift;
- selected_track = idx;
- track_editor->update();
- //drag select region
- return;
- }
+ click.click = ClickOver::CLICK_SELECT_KEYS;
+ click.at = mb->get_pos();
+ click.to = click.at;
+ click.shift = mb->get_shift();
+ selected_track = idx;
+ track_editor->update();
+ //drag select region
+ return;
+ }
- SelectedKey sk;
- sk.track = idx;
- sk.key = key;
- KeyInfo ki;
- ki.pos = animation->track_get_key_time(idx, key);
- click.shift = mb.mod.shift;
- click.selk = sk;
+ SelectedKey sk;
+ sk.track = idx;
+ sk.key = key;
+ KeyInfo ki;
+ ki.pos = animation->track_get_key_time(idx, key);
+ click.shift = mb->get_shift();
+ click.selk = sk;
- if (!mb.mod.shift && !selection.has(sk))
- _clear_selection();
+ if (!mb->get_shift() && !selection.has(sk))
+ _clear_selection();
- selection.insert(sk, ki);
+ selection.insert(sk, ki);
- click.click = ClickOver::CLICK_MOVE_KEYS;
- click.at = Point2(mb.x, mb.y);
- click.to = click.at;
- update();
- selected_track = idx;
- track_editor->update();
+ click.click = ClickOver::CLICK_MOVE_KEYS;
+ click.at = mb->get_pos();
+ click.to = click.at;
+ update();
+ selected_track = idx;
+ track_editor->update();
- if (_edit_if_single_selection() && mb.mod.command) {
- edit_button->set_pressed(true);
- key_editor_tab->show();
- }
+ if (_edit_if_single_selection() && mb->get_command()) {
+ edit_button->set_pressed(true);
+ key_editor_tab->show();
}
}
+ }
- if (selection.size()) {
- // User has right clicked and we have a selection, show a popup menu with options
- track_menu->clear();
- track_menu->set_size(Point2(1, 1));
- track_menu->add_item(TTR("Duplicate Selection"), RIGHT_MENU_DUPLICATE);
- track_menu->add_item(TTR("Duplicate Transposed"), RIGHT_MENU_DUPLICATE_TRANSPOSE);
- track_menu->add_item(TTR("Remove Selection"), RIGHT_MENU_REMOVE);
+ if (selection.size()) {
+ // User has right clicked and we have a selection, show a popup menu with options
+ track_menu->clear();
+ track_menu->set_size(Point2(1, 1));
+ track_menu->add_item(TTR("Duplicate Selection"), RIGHT_MENU_DUPLICATE);
+ track_menu->add_item(TTR("Duplicate Transposed"), RIGHT_MENU_DUPLICATE_TRANSPOSE);
+ track_menu->add_item(TTR("Remove Selection"), RIGHT_MENU_REMOVE);
- track_menu->set_position(te->get_global_position() + mpos);
+ track_menu->set_position(te->get_global_position() + mpos);
- interp_editing = -1;
- cont_editing = -1;
- wrap_editing = -1;
+ interp_editing = -1;
+ cont_editing = -1;
+ wrap_editing = -1;
- track_menu->popup();
- }
+ track_menu->popup();
}
+ }
- if (mb.button_index == BUTTON_LEFT && !(mb.button_mask & ~BUTTON_MASK_LEFT)) {
+ if (mb->get_button_index() == BUTTON_LEFT && !(mb->get_button_mask() & ~BUTTON_MASK_LEFT)) {
- if (mb.pressed) {
+ if (mb->is_pressed()) {
- Point2 mpos = Point2(mb.x, mb.y) - ofs;
+ Point2 mpos = mb->get_pos() - ofs;
- if (mpos.y < h) {
+ if (mpos.y < h) {
- if (mpos.x < name_limit && mpos.x > (name_limit - hsep - hsize_icon->get_width())) {
+ if (mpos.x < name_limit && mpos.x > (name_limit - hsep - hsize_icon->get_width())) {
- click.click = ClickOver::CLICK_RESIZE_NAMES;
- click.at = Point2(mb.x, mb.y);
- click.to = click.at;
- click.at.y = name_limit;
- }
+ click.click = ClickOver::CLICK_RESIZE_NAMES;
+ click.at = mb->get_pos();
+ click.to = click.at;
+ click.at.y = name_limit;
+ }
- if (mpos.x >= name_limit && mpos.x < settings_limit) {
- //seek
- //int zoomw = settings_limit-name_limit;
- float scale = _get_zoom_scale();
- float pos = h_scroll->get_value() + (mpos.x - name_limit) / scale;
- if (animation->get_step())
- pos = Math::stepify(pos, animation->get_step());
-
- if (pos < 0)
- pos = 0;
- if (pos >= animation->get_length())
- pos = animation->get_length();
- timeline_pos = pos;
- click.click = ClickOver::CLICK_DRAG_TIMELINE;
- click.at = Point2(mb.x, mb.y);
- click.to = click.at;
- emit_signal("timeline_changed", pos, false);
- }
+ if (mpos.x >= name_limit && mpos.x < settings_limit) {
+ //seek
+ //int zoomw = settings_limit-name_limit;
+ float scale = _get_zoom_scale();
+ float pos = h_scroll->get_value() + (mpos.x - name_limit) / scale;
+ if (animation->get_step())
+ pos = Math::stepify(pos, animation->get_step());
- return;
+ if (pos < 0)
+ pos = 0;
+ if (pos >= animation->get_length())
+ pos = animation->get_length();
+ timeline_pos = pos;
+ click.click = ClickOver::CLICK_DRAG_TIMELINE;
+ click.at = mb->get_pos();
+ click.to = click.at;
+ emit_signal("timeline_changed", pos, false);
}
- mpos.y -= h;
+ return;
+ }
- int idx = mpos.y / h;
- idx += v_scroll->get_value();
- if (idx < 0)
- break;
+ mpos.y -= h;
- if (idx >= animation->get_track_count()) {
+ int idx = mpos.y / h;
+ idx += v_scroll->get_value();
+ if (idx < 0)
+ return;
- if (mpos.x >= name_limit && mpos.x < settings_limit) {
+ if (idx >= animation->get_track_count()) {
- click.click = ClickOver::CLICK_SELECT_KEYS;
- click.at = Point2(mb.x, mb.y);
- click.to = click.at;
- //drag select region
- }
+ if (mpos.x >= name_limit && mpos.x < settings_limit) {
- break;
+ click.click = ClickOver::CLICK_SELECT_KEYS;
+ click.at = mb->get_pos();
+ click.to = click.at;
+ //drag select region
}
- if (mpos.x < name_limit) {
- //name column
-
- // area
- if (idx != selected_track) {
-
- selected_track = idx;
- track_editor->update();
- break;
- }
+ return;
+ }
- Rect2 area(ofs.x, ofs.y + ((int(mpos.y) / h) + 1) * h, name_limit, h);
- track_name->set_text(animation->track_get_path(idx));
- track_name->set_position(te->get_global_position() + area.pos);
- track_name->set_size(area.size);
- track_name->show_modal();
- track_name->grab_focus();
- track_name->select_all();
- track_name_editing = idx;
+ if (mpos.x < name_limit) {
+ //name column
- } else if (mpos.x < settings_limit) {
+ // area
+ if (idx != selected_track) {
- float pos = mpos.x - name_limit;
- pos /= _get_zoom_scale();
- pos += h_scroll->get_value();
- float w_time = (type_icon[0]->get_width() / _get_zoom_scale()) / 2.0;
+ selected_track = idx;
+ track_editor->update();
+ return;
+ }
- int kidx = animation->track_find_key(idx, pos);
- int kidx_n = kidx + 1;
- int key = -1;
+ Rect2 area(ofs.x, ofs.y + ((int(mpos.y) / h) + 1) * h, name_limit, h);
+ track_name->set_text(animation->track_get_path(idx));
+ track_name->set_position(te->get_global_position() + area.pos);
+ track_name->set_size(area.size);
+ track_name->show_modal();
+ track_name->grab_focus();
+ track_name->select_all();
+ track_name_editing = idx;
- if (kidx >= 0 && kidx < animation->track_get_key_count(idx)) {
+ } else if (mpos.x < settings_limit) {
- float kpos = animation->track_get_key_time(idx, kidx);
- if (ABS(pos - kpos) <= w_time) {
+ float pos = mpos.x - name_limit;
+ pos /= _get_zoom_scale();
+ pos += h_scroll->get_value();
+ float w_time = (type_icon[0]->get_width() / _get_zoom_scale()) / 2.0;
- key = kidx;
- }
- }
+ int kidx = animation->track_find_key(idx, pos);
+ int kidx_n = kidx + 1;
+ int key = -1;
- if (key == -1 && kidx_n >= 0 && kidx_n < animation->track_get_key_count(idx)) {
+ if (kidx >= 0 && kidx < animation->track_get_key_count(idx)) {
- float kpos = animation->track_get_key_time(idx, kidx_n);
- if (ABS(pos - kpos) <= w_time) {
+ float kpos = animation->track_get_key_time(idx, kidx);
+ if (ABS(pos - kpos) <= w_time) {
- key = kidx_n;
- }
+ key = kidx;
}
+ }
- if (key == -1) {
+ if (key == -1 && kidx_n >= 0 && kidx_n < animation->track_get_key_count(idx)) {
- click.click = ClickOver::CLICK_SELECT_KEYS;
- click.at = Point2(mb.x, mb.y);
- click.to = click.at;
- click.shift = mb.mod.shift;
- selected_track = idx;
- track_editor->update();
- //drag select region
- return;
- }
-
- SelectedKey sk;
- sk.track = idx;
- sk.key = key;
- KeyInfo ki;
- ki.pos = animation->track_get_key_time(idx, key);
- click.shift = mb.mod.shift;
- click.selk = sk;
+ float kpos = animation->track_get_key_time(idx, kidx_n);
+ if (ABS(pos - kpos) <= w_time) {
- if (!mb.mod.shift && !selection.has(sk))
- _clear_selection();
+ key = kidx_n;
+ }
+ }
- selection.insert(sk, ki);
+ if (key == -1) {
- click.click = ClickOver::CLICK_MOVE_KEYS;
- click.at = Point2(mb.x, mb.y);
+ click.click = ClickOver::CLICK_SELECT_KEYS;
+ click.at = mb->get_pos();
click.to = click.at;
- update();
+ click.shift = mb->get_shift();
selected_track = idx;
track_editor->update();
+ //drag select region
+ return;
+ }
- if (_edit_if_single_selection() && mb.mod.command) {
- edit_button->set_pressed(true);
- key_editor_tab->show();
- }
- } else {
- //button column
- int ofsx = size.width - mpos.x;
- if (ofsx < 0)
- break;
- /*
- if (ofsx < remove_icon->get_width()) {
-
- undo_redo->create_action("Remove Anim Track");
- undo_redo->add_do_method(animation.ptr(),"remove_track",idx);
- undo_redo->add_undo_method(animation.ptr(),"add_track",animation->track_get_type(idx),idx);
- undo_redo->add_undo_method(animation.ptr(),"track_set_path",idx,animation->track_get_path(idx));
- //todo interpolation
- for(int i=0;i<animation->track_get_key_count(idx);i++) {
+ SelectedKey sk;
+ sk.track = idx;
+ sk.key = key;
+ KeyInfo ki;
+ ki.pos = animation->track_get_key_time(idx, key);
+ click.shift = mb->get_shift();
+ click.selk = sk;
- Variant v = animation->track_get_key_value(idx,i);
- float time = animation->track_get_key_time(idx,i);
- float trans = animation->track_get_key_transition(idx,i);
+ if (!mb->get_shift() && !selection.has(sk))
+ _clear_selection();
- undo_redo->add_undo_method(animation.ptr(),"track_insert_key",idx,time,v);
- undo_redo->add_undo_method(animation.ptr(),"track_set_key_transition",idx,i,trans);
+ selection.insert(sk, ki);
- }
+ click.click = ClickOver::CLICK_MOVE_KEYS;
+ click.at = mb->get_pos();
+ click.to = click.at;
+ update();
+ selected_track = idx;
+ track_editor->update();
- undo_redo->add_undo_method(animation.ptr(),"track_set_interpolation_type",idx,animation->track_get_interpolation_type(idx));
- if (animation->track_get_type(idx)==Animation::TYPE_VALUE) {
- undo_redo->add_undo_method(animation.ptr(),"value_track_set_continuous",idx,animation->value_track_is_continuous(idx));
+ if (_edit_if_single_selection() && mb->get_command()) {
+ edit_button->set_pressed(true);
+ key_editor_tab->show();
+ }
+ } else {
+ //button column
+ int ofsx = size.width - mpos.x;
+ if (ofsx < 0)
+ return;
+ /*
+ if (ofsx < remove_icon->get_width()) {
- }
+ undo_redo->create_action("Remove Anim Track");
+ undo_redo->add_do_method(animation.ptr(),"remove_track",idx);
+ undo_redo->add_undo_method(animation.ptr(),"add_track",animation->track_get_type(idx),idx);
+ undo_redo->add_undo_method(animation.ptr(),"track_set_path",idx,animation->track_get_path(idx));
+ //todo interpolation
+ for(int i=0;i<animation->track_get_key_count(idx);i++) {
- undo_redo->commit_action();
+ Variant v = animation->track_get_key_value(idx,i);
+ float time = animation->track_get_key_time(idx,i);
+ float trans = animation->track_get_key_transition(idx,i);
+ undo_redo->add_undo_method(animation.ptr(),"track_insert_key",idx,time,v);
+ undo_redo->add_undo_method(animation.ptr(),"track_set_key_transition",idx,i,trans);
- return;
}
- ofsx-=hsep+remove_icon->get_width();
-
- if (ofsx < move_down_icon->get_width()) {
+ undo_redo->add_undo_method(animation.ptr(),"track_set_interpolation_type",idx,animation->track_get_interpolation_type(idx));
+ if (animation->track_get_type(idx)==Animation::TYPE_VALUE) {
+ undo_redo->add_undo_method(animation.ptr(),"value_track_set_continuous",idx,animation->value_track_is_continuous(idx));
- if (idx < animation->get_track_count() -1) {
- undo_redo->create_action("Move Anim Track Down");
- undo_redo->add_do_method(animation.ptr(),"track_move_up",idx);
- undo_redo->add_undo_method(animation.ptr(),"track_move_down",idx+1);
- undo_redo->commit_action();
- }
- return;
}
- ofsx-=hsep+move_down_icon->get_width();
+ undo_redo->commit_action();
- if (ofsx < move_up_icon->get_width()) {
- if (idx >0) {
- undo_redo->create_action("Move Anim Track Up");
- undo_redo->add_do_method(animation.ptr(),"track_move_down",idx);
- undo_redo->add_undo_method(animation.ptr(),"track_move_up",idx-1);
- undo_redo->commit_action();
- }
- return;
- }
+ return;
+ }
+ ofsx-=hsep+remove_icon->get_width();
- ofsx-=hsep*3+move_up_icon->get_width();
- */
+ if (ofsx < move_down_icon->get_width()) {
- if (ofsx < track_ofs[1]) {
+ if (idx < animation->get_track_count() -1) {
+ undo_redo->create_action("Move Anim Track Down");
+ undo_redo->add_do_method(animation.ptr(),"track_move_up",idx);
+ undo_redo->add_undo_method(animation.ptr(),"track_move_down",idx+1);
+ undo_redo->commit_action();
+ }
+ return;
+ }
- track_menu->clear();
- track_menu->set_size(Point2(1, 1));
- static const char *interp_name[2] = { "Clamp Loop Interp", "Wrap Loop Interp" };
- for (int i = 0; i < 2; i++) {
- track_menu->add_icon_item(wrap_icon[i], interp_name[i]);
- }
+ ofsx-=hsep+move_down_icon->get_width();
- int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
- int popup_x = size.width - track_ofs[1];
+ if (ofsx < move_up_icon->get_width()) {
- track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
+ if (idx >0) {
+ undo_redo->create_action("Move Anim Track Up");
+ undo_redo->add_do_method(animation.ptr(),"track_move_down",idx);
+ undo_redo->add_undo_method(animation.ptr(),"track_move_up",idx-1);
+ undo_redo->commit_action();
+ }
+ return;
+ }
- wrap_editing = idx;
- interp_editing = -1;
- cont_editing = -1;
- track_menu->popup();
+ ofsx-=hsep*3+move_up_icon->get_width();
+ */
- return;
+ if (ofsx < track_ofs[1]) {
+
+ track_menu->clear();
+ track_menu->set_size(Point2(1, 1));
+ static const char *interp_name[2] = { "Clamp Loop Interp", "Wrap Loop Interp" };
+ for (int i = 0; i < 2; i++) {
+ track_menu->add_icon_item(wrap_icon[i], interp_name[i]);
}
- if (ofsx < track_ofs[2]) {
+ int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
+ int popup_x = size.width - track_ofs[1];
- track_menu->clear();
- track_menu->set_size(Point2(1, 1));
- static const char *interp_name[3] = { "Nearest", "Linear", "Cubic" };
- for (int i = 0; i < 3; i++) {
- track_menu->add_icon_item(interp_icon[i], interp_name[i]);
- }
+ track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
- int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
- int popup_x = size.width - track_ofs[2];
+ wrap_editing = idx;
+ interp_editing = -1;
+ cont_editing = -1;
- track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
+ track_menu->popup();
- interp_editing = idx;
- cont_editing = -1;
- wrap_editing = -1;
+ return;
+ }
- track_menu->popup();
+ if (ofsx < track_ofs[2]) {
- return;
+ track_menu->clear();
+ track_menu->set_size(Point2(1, 1));
+ static const char *interp_name[3] = { "Nearest", "Linear", "Cubic" };
+ for (int i = 0; i < 3; i++) {
+ track_menu->add_icon_item(interp_icon[i], interp_name[i]);
}
- if (ofsx < track_ofs[3]) {
+ int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
+ int popup_x = size.width - track_ofs[2];
- track_menu->clear();
- track_menu->set_size(Point2(1, 1));
- String cont_name[3] = { TTR("Continuous"), TTR("Discrete"), TTR("Trigger") };
- for (int i = 0; i < 3; i++) {
- track_menu->add_icon_item(cont_icon[i], cont_name[i]);
- }
+ track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
- int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
- int popup_x = size.width - track_ofs[3];
+ interp_editing = idx;
+ cont_editing = -1;
+ wrap_editing = -1;
- track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
+ track_menu->popup();
- interp_editing = -1;
- wrap_editing = -1;
- cont_editing = idx;
+ return;
+ }
- track_menu->popup();
+ if (ofsx < track_ofs[3]) {
- return;
+ track_menu->clear();
+ track_menu->set_size(Point2(1, 1));
+ String cont_name[3] = { TTR("Continuous"), TTR("Discrete"), TTR("Trigger") };
+ for (int i = 0; i < 3; i++) {
+ track_menu->add_icon_item(cont_icon[i], cont_name[i]);
}
- if (ofsx < track_ofs[4]) {
+ int popup_y = ofs.y + ((int(mpos.y) / h) + 2) * h;
+ int popup_x = size.width - track_ofs[3];
- Animation::TrackType tt = animation->track_get_type(idx);
+ track_menu->set_position(te->get_global_position() + Point2(popup_x, popup_y));
- float pos = timeline_pos;
- int existing = animation->track_find_key(idx, pos, true);
+ interp_editing = -1;
+ wrap_editing = -1;
+ cont_editing = idx;
- Variant newval;
+ track_menu->popup();
- if (tt == Animation::TYPE_TRANSFORM) {
- Dictionary d;
- d["loc"] = Vector3();
- d["rot"] = Quat();
- d["scale"] = Vector3();
- newval = d;
+ return;
+ }
- } else if (tt == Animation::TYPE_METHOD) {
+ if (ofsx < track_ofs[4]) {
- Dictionary d;
- d["method"] = "";
- d["args"] = Vector<Variant>();
+ Animation::TrackType tt = animation->track_get_type(idx);
- newval = d;
- } else if (tt == Animation::TYPE_VALUE) {
+ float pos = timeline_pos;
+ int existing = animation->track_find_key(idx, pos, true);
- NodePath np;
- PropertyInfo inf = _find_hint_for_track(idx, np);
- if (inf.type != Variant::NIL) {
+ Variant newval;
- Variant::CallError err;
- newval = Variant::construct(inf.type, NULL, 0, err);
- }
+ if (tt == Animation::TYPE_TRANSFORM) {
+ Dictionary d;
+ d["loc"] = Vector3();
+ d["rot"] = Quat();
+ d["scale"] = Vector3();
+ newval = d;
- if (newval.get_type() == Variant::NIL) {
- //popup a new type
- cvi_track = idx;
- cvi_pos = pos;
+ } else if (tt == Animation::TYPE_METHOD) {
- type_menu->set_position(get_global_position() + mpos + ofs);
- type_menu->popup();
- return;
- }
- }
+ Dictionary d;
+ d["method"] = "";
+ d["args"] = Vector<Variant>();
- undo_redo->create_action(TTR("Anim Add Key"));
+ newval = d;
+ } else if (tt == Animation::TYPE_VALUE) {
- undo_redo->add_do_method(animation.ptr(), "track_insert_key", idx, pos, newval, 1);
- undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", idx, pos);
+ NodePath np;
+ PropertyInfo inf = _find_hint_for_track(idx, np);
+ if (inf.type != Variant::NIL) {
- if (existing != -1) {
- Variant v = animation->track_get_key_value(idx, existing);
- float trans = animation->track_get_key_transition(idx, existing);
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", idx, pos, v, trans);
+ Variant::CallError err;
+ newval = Variant::construct(inf.type, NULL, 0, err);
}
- undo_redo->commit_action();
+ if (newval.get_type() == Variant::NIL) {
+ //popup a new type
+ cvi_track = idx;
+ cvi_pos = pos;
- return;
+ type_menu->set_position(get_global_position() + mpos + ofs);
+ type_menu->popup();
+ return;
+ }
}
- }
- } else {
+ undo_redo->create_action(TTR("Anim Add Key"));
- switch (click.click) {
- case ClickOver::CLICK_SELECT_KEYS: {
+ undo_redo->add_do_method(animation.ptr(), "track_insert_key", idx, pos, newval, 1);
+ undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", idx, pos);
- float zoom_scale = _get_zoom_scale();
- float keys_from = h_scroll->get_value();
- float keys_to = keys_from + (settings_limit - name_limit) / zoom_scale;
+ if (existing != -1) {
+ Variant v = animation->track_get_key_value(idx, existing);
+ float trans = animation->track_get_key_transition(idx, existing);
+ undo_redo->add_undo_method(animation.ptr(), "track_insert_key", idx, pos, v, trans);
+ }
- float from_time = keys_from + (click.at.x - (name_limit + ofs.x)) / zoom_scale;
- float to_time = keys_from + (click.to.x - (name_limit + ofs.x)) / zoom_scale;
+ undo_redo->commit_action();
- if (to_time < from_time)
- SWAP(from_time, to_time);
+ return;
+ }
+ }
- if (from_time > keys_to || to_time < keys_from)
- break;
+ } else {
- if (from_time < keys_from)
- from_time = keys_from;
+ switch (click.click) {
+ case ClickOver::CLICK_SELECT_KEYS: {
- if (to_time >= keys_to)
- to_time = keys_to;
+ float zoom_scale = _get_zoom_scale();
+ float keys_from = h_scroll->get_value();
+ float keys_to = keys_from + (settings_limit - name_limit) / zoom_scale;
- int from_track = int(click.at.y - ofs.y - h - sep) / h + v_scroll->get_value();
- int to_track = int(click.to.y - ofs.y - h - sep) / h + v_scroll->get_value();
- int from_mod = int(click.at.y - ofs.y - sep) % h;
- int to_mod = int(click.to.y - ofs.y - sep) % h;
+ float from_time = keys_from + (click.at.x - (name_limit + ofs.x)) / zoom_scale;
+ float to_time = keys_from + (click.to.x - (name_limit + ofs.x)) / zoom_scale;
- if (to_track < from_track) {
+ if (to_time < from_time)
+ SWAP(from_time, to_time);
- SWAP(from_track, to_track);
- SWAP(from_mod, to_mod);
- }
+ if (from_time > keys_to || to_time < keys_from)
+ break;
- if ((from_mod > (h / 2)) && ((click.at.y - ofs.y) >= (h + sep))) {
- from_track++;
- }
+ if (from_time < keys_from)
+ from_time = keys_from;
- if (to_mod < h / 2) {
- to_track--;
- }
+ if (to_time >= keys_to)
+ to_time = keys_to;
- if (from_track > to_track) {
- if (!click.shift)
- _clear_selection();
- _edit_if_single_selection();
- break;
- }
+ int from_track = int(click.at.y - ofs.y - h - sep) / h + v_scroll->get_value();
+ int to_track = int(click.to.y - ofs.y - h - sep) / h + v_scroll->get_value();
+ int from_mod = int(click.at.y - ofs.y - sep) % h;
+ int to_mod = int(click.to.y - ofs.y - sep) % h;
+
+ if (to_track < from_track) {
- int tracks_from = v_scroll->get_value();
- int tracks_to = v_scroll->get_value() + fit - 1;
- if (tracks_to >= animation->get_track_count())
- tracks_to = animation->get_track_count() - 1;
+ SWAP(from_track, to_track);
+ SWAP(from_mod, to_mod);
+ }
+
+ if ((from_mod > (h / 2)) && ((click.at.y - ofs.y) >= (h + sep))) {
+ from_track++;
+ }
- tracks_from = 0;
+ if (to_mod < h / 2) {
+ to_track--;
+ }
+
+ if (from_track > to_track) {
+ if (!click.shift)
+ _clear_selection();
+ _edit_if_single_selection();
+ break;
+ }
+
+ int tracks_from = v_scroll->get_value();
+ int tracks_to = v_scroll->get_value() + fit - 1;
+ if (tracks_to >= animation->get_track_count())
tracks_to = animation->get_track_count() - 1;
- if (to_track > tracks_to)
- to_track = tracks_to;
- if (from_track < tracks_from)
- from_track = tracks_from;
-
- if (from_track > tracks_to || to_track < tracks_from) {
- if (!click.shift)
- _clear_selection();
- _edit_if_single_selection();
- break;
- }
+ tracks_from = 0;
+ tracks_to = animation->get_track_count() - 1;
+ if (to_track > tracks_to)
+ to_track = tracks_to;
+ if (from_track < tracks_from)
+ from_track = tracks_from;
+
+ if (from_track > tracks_to || to_track < tracks_from) {
if (!click.shift)
_clear_selection();
+ _edit_if_single_selection();
+ break;
+ }
- int higher_track = 0x7FFFFFFF;
- for (int i = from_track; i <= to_track; i++) {
+ if (!click.shift)
+ _clear_selection();
- int kc = animation->track_get_key_count(i);
- for (int j = 0; j < kc; j++) {
+ int higher_track = 0x7FFFFFFF;
+ for (int i = from_track; i <= to_track; i++) {
- float t = animation->track_get_key_time(i, j);
- if (t < from_time)
- continue;
- if (t > to_time)
- break;
+ int kc = animation->track_get_key_count(i);
+ for (int j = 0; j < kc; j++) {
- if (i < higher_track)
- higher_track = i;
+ float t = animation->track_get_key_time(i, j);
+ if (t < from_time)
+ continue;
+ if (t > to_time)
+ break;
- SelectedKey sk;
- sk.track = i;
- sk.key = j;
- KeyInfo ki;
- ki.pos = t;
- selection[sk] = ki;
- }
- }
+ if (i < higher_track)
+ higher_track = i;
- if (higher_track != 0x7FFFFFFF) {
- selected_track = higher_track;
- track_editor->update();
+ SelectedKey sk;
+ sk.track = i;
+ sk.key = j;
+ KeyInfo ki;
+ ki.pos = t;
+ selection[sk] = ki;
}
+ }
- _edit_if_single_selection();
+ if (higher_track != 0x7FFFFFFF) {
+ selected_track = higher_track;
+ track_editor->update();
+ }
- } break;
- case ClickOver::CLICK_MOVE_KEYS: {
+ _edit_if_single_selection();
- if (selection.empty())
- break;
- if (click.at == click.to) {
+ } break;
+ case ClickOver::CLICK_MOVE_KEYS: {
- if (!click.shift) {
+ if (selection.empty())
+ break;
+ if (click.at == click.to) {
- KeyInfo ki = selection[click.selk];
- _clear_selection();
- selection[click.selk] = ki;
- _edit_if_single_selection();
- }
+ if (!click.shift) {
- break;
+ KeyInfo ki = selection[click.selk];
+ _clear_selection();
+ selection[click.selk] = ki;
+ _edit_if_single_selection();
}
- float from_t = 1e20;
+ break;
+ }
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) {
- float t = animation->track_get_key_time(E->key().track, E->key().key);
- if (t < from_t)
- from_t = t;
- }
+ float from_t = 1e20;
- float motion = from_t + (click.to.x - click.at.x) / _get_zoom_scale();
- if (step->get_value())
- motion = Math::stepify(motion, step->get_value());
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) {
+ float t = animation->track_get_key_time(E->key().track, E->key().key);
+ if (t < from_t)
+ from_t = t;
+ }
- undo_redo->create_action(TTR("Anim Move Keys"));
+ float motion = from_t + (click.to.x - click.at.x) / _get_zoom_scale();
+ if (step->get_value())
+ motion = Math::stepify(motion, step->get_value());
- List<_AnimMoveRestore> to_restore;
+ undo_redo->create_action(TTR("Anim Move Keys"));
- // 1-remove the keys
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+ List<_AnimMoveRestore> to_restore;
- undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
- }
- // 2- remove overlapped keys
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+ // 1-remove the keys
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
- float newtime = E->get().pos - from_t + motion;
- int idx = animation->track_find_key(E->key().track, newtime, true);
- if (idx == -1)
- continue;
- SelectedKey sk;
- sk.key = idx;
- sk.track = E->key().track;
- if (selection.has(sk))
- continue; //already in selection, don't save
+ undo_redo->add_do_method(animation.ptr(), "track_remove_key", E->key().track, E->key().key);
+ }
+ // 2- remove overlapped keys
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+
+ float newtime = E->get().pos - from_t + motion;
+ int idx = animation->track_find_key(E->key().track, newtime, true);
+ if (idx == -1)
+ continue;
+ SelectedKey sk;
+ sk.key = idx;
+ sk.track = E->key().track;
+ if (selection.has(sk))
+ continue; //already in selection, don't save
+
+ undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newtime);
+ _AnimMoveRestore amr;
+
+ amr.key = animation->track_get_key_value(E->key().track, idx);
+ amr.track = E->key().track;
+ amr.time = newtime;
+ amr.transition = animation->track_get_key_transition(E->key().track, idx);
+
+ to_restore.push_back(amr);
+ }
- undo_redo->add_do_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newtime);
- _AnimMoveRestore amr;
+ // 3-move the keys (re insert them)
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
- amr.key = animation->track_get_key_value(E->key().track, idx);
- amr.track = E->key().track;
- amr.time = newtime;
- amr.transition = animation->track_get_key_transition(E->key().track, idx);
+ float newpos = E->get().pos - from_t + motion;
+ /*
+ if (newpos<0)
+ continue; //no add at the beginning
+ */
+ undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
+ }
- to_restore.push_back(amr);
- }
+ // 4-(undo) remove inserted keys
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
- // 3-move the keys (re insert them)
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+ float newpos = E->get().pos + -from_t + motion;
+ /*
+ if (newpos<0)
+ continue; //no remove what no inserted
+ */
+ undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newpos);
+ }
- float newpos = E->get().pos - from_t + motion;
- /*
- if (newpos<0)
- continue; //no add at the beginning
- */
- undo_redo->add_do_method(animation.ptr(), "track_insert_key", E->key().track, newpos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
- }
+ // 5-(undo) reinsert keys
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
- // 4-(undo) remove inserted keys
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+ undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
+ }
- float newpos = E->get().pos + -from_t + motion;
- /*
- if (newpos<0)
- continue; //no remove what no inserted
- */
- undo_redo->add_undo_method(animation.ptr(), "track_remove_key_at_pos", E->key().track, newpos);
- }
+ // 6-(undo) reinsert overlapped keys
+ for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
- // 5-(undo) reinsert keys
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+ _AnimMoveRestore &amr = E->get();
+ undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
+ }
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", E->key().track, E->get().pos, animation->track_get_key_value(E->key().track, E->key().key), animation->track_get_key_transition(E->key().track, E->key().key));
- }
+ // 6-(undo) reinsert overlapped keys
+ for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
- // 6-(undo) reinsert overlapped keys
- for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
+ _AnimMoveRestore &amr = E->get();
+ undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
+ }
- _AnimMoveRestore &amr = E->get();
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
- }
+ undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
+ undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation);
- // 6-(undo) reinsert overlapped keys
- for (List<_AnimMoveRestore>::Element *E = to_restore.front(); E; E = E->next()) {
+ // 7-reselect
- _AnimMoveRestore &amr = E->get();
- undo_redo->add_undo_method(animation.ptr(), "track_insert_key", amr.track, amr.time, amr.key, amr.transition);
- }
+ for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
- undo_redo->add_do_method(this, "_clear_selection_for_anim", animation);
- undo_redo->add_undo_method(this, "_clear_selection_for_anim", animation);
+ float oldpos = E->get().pos;
+ float newpos = oldpos - from_t + motion;
+ //if (newpos>=0)
+ undo_redo->add_do_method(this, "_select_at_anim", animation, E->key().track, newpos);
+ undo_redo->add_undo_method(this, "_select_at_anim", animation, E->key().track, oldpos);
+ }
- // 7-reselect
+ undo_redo->commit_action();
+ _edit_if_single_selection();
- for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
+ } break;
+ default: {}
+ }
- float oldpos = E->get().pos;
- float newpos = oldpos - from_t + motion;
- //if (newpos>=0)
- undo_redo->add_do_method(this, "_select_at_anim", animation, E->key().track, newpos);
- undo_redo->add_undo_method(this, "_select_at_anim", animation, E->key().track, oldpos);
- }
+ //button released
+ click.click = ClickOver::CLICK_NONE;
+ track_editor->update();
+ }
+ }
+ }
- undo_redo->commit_action();
- _edit_if_single_selection();
+ Ref<InputEventMouseMotion> mm = p_input;
- } break;
- default: {}
- }
+ if (mm.is_valid()) {
- //button released
- click.click = ClickOver::CLICK_NONE;
- track_editor->update();
- }
- }
+ mouse_over.over = MouseOver::OVER_NONE;
+ mouse_over.track = -1;
+ te->update();
+ track_editor->set_tooltip("");
- } break;
+ if (!track_editor->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
+ track_editor->call_deferred("grab_focus");
- case InputEvent::MOUSE_MOTION: {
+ if (click.click != ClickOver::CLICK_NONE) {
- const InputEventMouseMotion &mb = p_input.mouse_motion;
+ switch (click.click) {
+ case ClickOver::CLICK_RESIZE_NAMES: {
- mouse_over.over = MouseOver::OVER_NONE;
- mouse_over.track = -1;
- te->update();
- track_editor->set_tooltip("");
+ float base = click.at.y;
+ float clickp = click.at.x - ofs.x;
+ float dif = base - clickp;
- if (!track_editor->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
- track_editor->call_deferred("grab_focus");
+ float target = mb->get_pos().x + dif - ofs.x;
- if (click.click != ClickOver::CLICK_NONE) {
+ float ratio = target / settings_limit;
- switch (click.click) {
- case ClickOver::CLICK_RESIZE_NAMES: {
+ if (ratio > 0.9)
+ ratio = 0.9;
+ else if (ratio < 0.2)
+ ratio = 0.2;
- float base = click.at.y;
- float clickp = click.at.x - ofs.x;
- float dif = base - clickp;
+ name_column_ratio = ratio;
- float target = mb.x + dif - ofs.x;
+ } break;
+ case ClickOver::CLICK_DRAG_TIMELINE: {
- float ratio = target / settings_limit;
+ Point2 mpos = mb->get_pos() - ofs;
+ /*
+ if (mpos.x<name_limit)
+ mpos.x=name_limit;
+ if (mpos.x>settings_limit)
+ mpos.x=settings_limit;
+ */
- if (ratio > 0.9)
- ratio = 0.9;
- else if (ratio < 0.2)
- ratio = 0.2;
+ //int zoomw = settings_limit-name_limit;
+ float scale = _get_zoom_scale();
+ float pos = h_scroll->get_value() + (mpos.x - name_limit) / scale;
+ if (animation->get_step()) {
+ pos = Math::stepify(pos, animation->get_step());
+ }
+ if (pos < 0)
+ pos = 0;
+ if (pos >= animation->get_length())
+ pos = animation->get_length();
+
+ if (pos < h_scroll->get_value()) {
+ h_scroll->set_value(pos);
+ } else if (pos > h_scroll->get_value() + (settings_limit - name_limit) / scale) {
+ h_scroll->set_value(pos - (settings_limit - name_limit) / scale);
+ }
- name_column_ratio = ratio;
+ timeline_pos = pos;
+ emit_signal("timeline_changed", pos, true);
- } break;
- case ClickOver::CLICK_DRAG_TIMELINE: {
-
- Point2 mpos = Point2(mb.x, mb.y) - ofs;
- /*
- if (mpos.x<name_limit)
- mpos.x=name_limit;
- if (mpos.x>settings_limit)
- mpos.x=settings_limit;
- */
+ } break;
+ case ClickOver::CLICK_SELECT_KEYS: {
- //int zoomw = settings_limit-name_limit;
- float scale = _get_zoom_scale();
- float pos = h_scroll->get_value() + (mpos.x - name_limit) / scale;
- if (animation->get_step()) {
- pos = Math::stepify(pos, animation->get_step());
- }
- if (pos < 0)
- pos = 0;
- if (pos >= animation->get_length())
- pos = animation->get_length();
+ click.to = mb->get_pos();
+ if (click.to.y < h && click.at.y > h && mm->get_relative().y < 0) {
- if (pos < h_scroll->get_value()) {
- h_scroll->set_value(pos);
- } else if (pos > h_scroll->get_value() + (settings_limit - name_limit) / scale) {
- h_scroll->set_value(pos - (settings_limit - name_limit) / scale);
- }
+ float prev = v_scroll->get_value();
+ v_scroll->set_value(v_scroll->get_value() - 1);
+ if (prev != v_scroll->get_value())
+ click.at.y += h;
+ }
+ if (click.to.y > size.height && click.at.y < size.height && mm->get_relative().y > 0) {
- timeline_pos = pos;
- emit_signal("timeline_changed", pos, true);
+ float prev = v_scroll->get_value();
+ v_scroll->set_value(v_scroll->get_value() + 1);
+ if (prev != v_scroll->get_value())
+ click.at.y -= h;
+ }
- } break;
- case ClickOver::CLICK_SELECT_KEYS: {
+ } break;
+ case ClickOver::CLICK_MOVE_KEYS: {
- click.to = Point2(mb.x, mb.y);
- if (click.to.y < h && click.at.y > h && mb.relative_y < 0) {
+ click.to = mb->get_pos();
+ } break;
+ default: {}
+ }
- float prev = v_scroll->get_value();
- v_scroll->set_value(v_scroll->get_value() - 1);
- if (prev != v_scroll->get_value())
- click.at.y += h;
- }
- if (click.to.y > size.height && click.at.y < size.height && mb.relative_y > 0) {
+ return;
+ } else if (mb->get_button_mask() & BUTTON_MASK_MIDDLE) {
- float prev = v_scroll->get_value();
- v_scroll->set_value(v_scroll->get_value() + 1);
- if (prev != v_scroll->get_value())
- click.at.y -= h;
- }
+ int rel = mm->get_relative().x;
+ float relf = rel / _get_zoom_scale();
+ h_scroll->set_value(h_scroll->get_value() - relf);
+ }
- } break;
- case ClickOver::CLICK_MOVE_KEYS: {
+ if (mb->get_button_mask() == 0) {
- click.to = Point2(mb.x, mb.y);
- } break;
- default: {}
- }
+ Point2 mpos = mb->get_pos() - ofs;
+ if (mpos.y < h) {
+#if 0
+ //seek
+ //int zoomw = settings_limit-name_limit;
+ float scale = _get_zoom_scale();
+ float pos = h_scroll->get_val() + (mpos.y-name_limit) / scale;
+ if (pos<0 )
+ pos=0;
+ if (pos>=animation->get_length())
+ pos=animation->get_length();
+ timeline->set_val(pos);
+#endif
return;
- } else if (mb.button_mask & BUTTON_MASK_MIDDLE) {
-
- int rel = mb.relative_x;
- float relf = rel / _get_zoom_scale();
- h_scroll->set_value(h_scroll->get_value() - relf);
}
- if (mb.button_mask == 0) {
+ mpos.y -= h;
- Point2 mpos = Point2(mb.x, mb.y) - ofs;
+ int idx = mpos.y / h;
+ idx += v_scroll->get_value();
+ if (idx < 0 || idx >= animation->get_track_count())
+ return;
- if (mpos.y < h) {
-#if 0
- //seek
- //int zoomw = settings_limit-name_limit;
- float scale = _get_zoom_scale();
- float pos = h_scroll->get_val() + (mpos.y-name_limit) / scale;
- if (pos<0 )
- pos=0;
- if (pos>=animation->get_length())
- pos=animation->get_length();
- timeline->set_val(pos);
-#endif
- return;
- }
+ mouse_over.track = idx;
- mpos.y -= h;
+ if (mpos.x < name_limit) {
+ //name column
- int idx = mpos.y / h;
- idx += v_scroll->get_value();
- if (idx < 0 || idx >= animation->get_track_count())
- break;
+ mouse_over.over = MouseOver::OVER_NAME;
- mouse_over.track = idx;
+ } else if (mpos.x < settings_limit) {
- if (mpos.x < name_limit) {
- //name column
+ float pos = mpos.x - name_limit;
+ pos /= _get_zoom_scale();
+ pos += h_scroll->get_value();
+ float w_time = (type_icon[0]->get_width() / _get_zoom_scale()) / 2.0;
- mouse_over.over = MouseOver::OVER_NAME;
+ int kidx = animation->track_find_key(idx, pos);
+ int kidx_n = kidx + 1;
- } else if (mpos.x < settings_limit) {
+ bool found = false;
- float pos = mpos.x - name_limit;
- pos /= _get_zoom_scale();
- pos += h_scroll->get_value();
- float w_time = (type_icon[0]->get_width() / _get_zoom_scale()) / 2.0;
+ if (kidx >= 0 && kidx < animation->track_get_key_count(idx)) {
- int kidx = animation->track_find_key(idx, pos);
- int kidx_n = kidx + 1;
+ float kpos = animation->track_get_key_time(idx, kidx);
+ if (ABS(pos - kpos) <= w_time) {
- bool found = false;
+ mouse_over.over = MouseOver::OVER_KEY;
+ mouse_over.track = idx;
+ mouse_over.over_key = kidx;
+ found = true;
+ }
+ }
- if (kidx >= 0 && kidx < animation->track_get_key_count(idx)) {
+ if (!found && kidx_n >= 0 && kidx_n < animation->track_get_key_count(idx)) {
- float kpos = animation->track_get_key_time(idx, kidx);
- if (ABS(pos - kpos) <= w_time) {
+ float kpos = animation->track_get_key_time(idx, kidx_n);
+ if (ABS(pos - kpos) <= w_time) {
- mouse_over.over = MouseOver::OVER_KEY;
- mouse_over.track = idx;
- mouse_over.over_key = kidx;
- found = true;
- }
+ mouse_over.over = MouseOver::OVER_KEY;
+ mouse_over.track = idx;
+ mouse_over.over_key = kidx_n;
+ found = true;
}
+ }
- if (!found && kidx_n >= 0 && kidx_n < animation->track_get_key_count(idx)) {
+ if (found) {
- float kpos = animation->track_get_key_time(idx, kidx_n);
- if (ABS(pos - kpos) <= w_time) {
+ String text;
+ text = "time: " + rtos(animation->track_get_key_time(idx, mouse_over.over_key)) + "\n";
- mouse_over.over = MouseOver::OVER_KEY;
- mouse_over.track = idx;
- mouse_over.over_key = kidx_n;
- found = true;
- }
- }
+ switch (animation->track_get_type(idx)) {
- if (found) {
-
- String text;
- text = "time: " + rtos(animation->track_get_key_time(idx, mouse_over.over_key)) + "\n";
-
- switch (animation->track_get_type(idx)) {
-
- case Animation::TYPE_TRANSFORM: {
-
- Dictionary d = animation->track_get_key_value(idx, mouse_over.over_key);
- if (d.has("loc"))
- text += "loc: " + String(d["loc"]) + "\n";
- if (d.has("rot"))
- text += "rot: " + String(d["rot"]) + "\n";
- if (d.has("scale"))
- text += "scale: " + String(d["scale"]) + "\n";
- } break;
- case Animation::TYPE_VALUE: {
-
- Variant v = animation->track_get_key_value(idx, mouse_over.over_key);
- //text+="value: "+String(v)+"\n";
-
- bool prop_exists = false;
- Variant::Type valid_type = Variant::NIL;
- Object *obj = NULL;
-
- RES res;
- Node *node = root->get_node_and_resource(animation->track_get_path(idx), res);
-
- if (res.is_valid()) {
- obj = res.ptr();
- } else if (node) {
- obj = node;
- }
-
- if (obj) {
- valid_type = obj->get_static_property_type(animation->track_get_path(idx).get_property(), &prop_exists);
- }
-
- text += "type: " + Variant::get_type_name(v.get_type()) + "\n";
- if (prop_exists && !Variant::can_convert(v.get_type(), valid_type)) {
- text += "value: " + String(v) + " (Invalid, expected type: " + Variant::get_type_name(valid_type) + ")\n";
- } else {
- text += "value: " + String(v) + "\n";
- }
-
- } break;
- case Animation::TYPE_METHOD: {
-
- Dictionary d = animation->track_get_key_value(idx, mouse_over.over_key);
- if (d.has("method"))
- text += String(d["method"]);
- text += "(";
- Vector<Variant> args;
- if (d.has("args"))
- args = d["args"];
- for (int i = 0; i < args.size(); i++) {
-
- if (i > 0)
- text += ", ";
- text += String(args[i]);
- }
- text += ")\n";
-
- } break;
- }
- text += "easing: " + rtos(animation->track_get_key_transition(idx, mouse_over.over_key));
+ case Animation::TYPE_TRANSFORM: {
- track_editor->set_tooltip(text);
- return;
- }
+ Dictionary d = animation->track_get_key_value(idx, mouse_over.over_key);
+ if (d.has("loc"))
+ text += "loc: " + String(d["loc"]) + "\n";
+ if (d.has("rot"))
+ text += "rot: " + String(d["rot"]) + "\n";
+ if (d.has("scale"))
+ text += "scale: " + String(d["scale"]) + "\n";
+ } break;
+ case Animation::TYPE_VALUE: {
- } else {
- //button column
- int ofsx = size.width - mpos.x;
- if (ofsx < 0)
- break;
- /*
- if (ofsx < remove_icon->get_width()) {
+ Variant v = animation->track_get_key_value(idx, mouse_over.over_key);
+ //text+="value: "+String(v)+"\n";
- mouse_over.over=MouseOver::OVER_REMOVE;
+ bool prop_exists = false;
+ Variant::Type valid_type = Variant::NIL;
+ Object *obj = NULL;
- return;
- }
+ RES res;
+ Node *node = root->get_node_and_resource(animation->track_get_path(idx), res);
- ofsx-=hsep+remove_icon->get_width();
+ if (res.is_valid()) {
+ obj = res.ptr();
+ } else if (node) {
+ obj = node;
+ }
- if (ofsx < move_down_icon->get_width()) {
+ if (obj) {
+ valid_type = obj->get_static_property_type(animation->track_get_path(idx).get_property(), &prop_exists);
+ }
- mouse_over.over=MouseOver::OVER_DOWN;
- return;
+ text += "type: " + Variant::get_type_name(v.get_type()) + "\n";
+ if (prop_exists && !Variant::can_convert(v.get_type(), valid_type)) {
+ text += "value: " + String(v) + " (Invalid, expected type: " + Variant::get_type_name(valid_type) + ")\n";
+ } else {
+ text += "value: " + String(v) + "\n";
+ }
+
+ } break;
+ case Animation::TYPE_METHOD: {
+
+ Dictionary d = animation->track_get_key_value(idx, mouse_over.over_key);
+ if (d.has("method"))
+ text += String(d["method"]);
+ text += "(";
+ Vector<Variant> args;
+ if (d.has("args"))
+ args = d["args"];
+ for (int i = 0; i < args.size(); i++) {
+
+ if (i > 0)
+ text += ", ";
+ text += String(args[i]);
+ }
+ text += ")\n";
+
+ } break;
}
+ text += "easing: " + rtos(animation->track_get_key_transition(idx, mouse_over.over_key));
- ofsx-=hsep+move_down_icon->get_width();
+ track_editor->set_tooltip(text);
+ return;
+ }
- if (ofsx < move_up_icon->get_width()) {
+ } else {
+ //button column
+ int ofsx = size.width - mpos.x;
+ if (ofsx < 0)
+ return;
+ /*
+ if (ofsx < remove_icon->get_width()) {
- mouse_over.over=MouseOver::OVER_UP;
- return;
- }
+ mouse_over.over=MouseOver::OVER_REMOVE;
- ofsx-=hsep*3+move_up_icon->get_width();
+ return;
+ }
- */
+ ofsx-=hsep+remove_icon->get_width();
- if (ofsx < down_icon->get_width() + wrap_icon[0]->get_width() + hsep * 3) {
+ if (ofsx < move_down_icon->get_width()) {
- mouse_over.over = MouseOver::OVER_WRAP;
- return;
- }
+ mouse_over.over=MouseOver::OVER_DOWN;
+ return;
+ }
- ofsx -= hsep * 3 + wrap_icon[0]->get_width() + down_icon->get_width();
+ ofsx-=hsep+move_down_icon->get_width();
- if (ofsx < down_icon->get_width() + interp_icon[0]->get_width() + hsep * 3) {
+ if (ofsx < move_up_icon->get_width()) {
- mouse_over.over = MouseOver::OVER_INTERP;
- return;
- }
+ mouse_over.over=MouseOver::OVER_UP;
+ return;
+ }
- ofsx -= hsep * 2 + interp_icon[0]->get_width() + down_icon->get_width();
+ ofsx-=hsep*3+move_up_icon->get_width();
- if (ofsx < down_icon->get_width() + cont_icon[0]->get_width() + hsep * 3) {
+*/
- mouse_over.over = MouseOver::OVER_VALUE;
- return;
- }
+ if (ofsx < down_icon->get_width() + wrap_icon[0]->get_width() + hsep * 3) {
- ofsx -= hsep * 3 + cont_icon[0]->get_width() + down_icon->get_width();
+ mouse_over.over = MouseOver::OVER_WRAP;
+ return;
+ }
- if (ofsx < add_key_icon->get_width()) {
+ ofsx -= hsep * 3 + wrap_icon[0]->get_width() + down_icon->get_width();
- mouse_over.over = MouseOver::OVER_ADD_KEY;
- return;
- }
+ if (ofsx < down_icon->get_width() + interp_icon[0]->get_width() + hsep * 3) {
+
+ mouse_over.over = MouseOver::OVER_INTERP;
+ return;
}
- }
- } break;
+ ofsx -= hsep * 2 + interp_icon[0]->get_width() + down_icon->get_width();
+
+ if (ofsx < down_icon->get_width() + cont_icon[0]->get_width() + hsep * 3) {
+
+ mouse_over.over = MouseOver::OVER_VALUE;
+ return;
+ }
+
+ ofsx -= hsep * 3 + cont_icon[0]->get_width() + down_icon->get_width();
+
+ if (ofsx < add_key_icon->get_width()) {
+
+ mouse_over.over = MouseOver::OVER_ADD_KEY;
+ return;
+ }
+ }
+ }
}
}
@@ -2905,6 +2900,8 @@ void AnimationKeyEditor::_notification(int p_what) {
key_editor->edit(key_edit);
zoomicon->set_texture(get_icon("Zoom", "EditorIcons"));
+ zoomicon->set_custom_minimum_size(Size2(24 * EDSCALE, 0));
+ zoomicon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
menu_add_track->set_icon(get_icon("AddTrack", "EditorIcons"));
menu_add_track->get_popup()->add_icon_item(get_icon("KeyValue", "EditorIcons"), "Add Normal Track", ADD_TRACK_MENU_ADD_VALUE_TRACK);
@@ -3767,7 +3764,6 @@ AnimationKeyEditor::AnimationKeyEditor() {
//add_child(menu);
zoomicon = memnew(TextureRect);
- zoomicon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hb->add_child(zoomicon);
zoomicon->set_tooltip(TTR("Animation zoom."));
@@ -3943,6 +3939,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
v_scroll->set_value(0);
key_editor_tab = memnew(TabContainer);
+ key_editor_tab->set_tab_align(TabContainer::ALIGN_LEFT);
hb->add_child(key_editor_tab);
key_editor_tab->set_custom_minimum_size(Size2(200, 0));
diff --git a/editor/animation_editor.h b/editor/animation_editor.h
index 0f6cc95634..128481c837 100644
--- a/editor/animation_editor.h
+++ b/editor/animation_editor.h
@@ -273,7 +273,7 @@ class AnimationKeyEditor : public VBoxContainer {
float _get_zoom_scale() const;
void _track_editor_draw();
- void _track_editor_gui_input(const InputEvent &p_input);
+ void _track_editor_gui_input(const Ref<InputEvent> &p_input);
void _track_pos_draw();
void _track_name_changed(const String &p_name);
diff --git a/editor/asset_library_editor_plugin.cpp b/editor/asset_library_editor_plugin.cpp
index 971adb14cf..fcb92e13b4 100644
--- a/editor/asset_library_editor_plugin.cpp
+++ b/editor/asset_library_editor_plugin.cpp
@@ -683,17 +683,18 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt
int len = image_data.size();
PoolByteArray::Read r = image_data.read();
- Image image(r.ptr(), len);
- if (!image.empty()) {
+ Ref<Image> image = Ref<Image>(memnew(Image(r.ptr(), len)));
+
+ if (!image->empty()) {
float max_height = 10000;
switch (image_queue[p_queue_id].image_type) {
case IMAGE_QUEUE_ICON: max_height = 80; break;
case IMAGE_QUEUE_THUMBNAIL: max_height = 80; break;
case IMAGE_QUEUE_SCREENSHOT: max_height = 345; break;
}
- float scale_ratio = max_height / image.get_height();
+ float scale_ratio = max_height / image->get_height();
if (scale_ratio < 1) {
- image.resize(image.get_width() * scale_ratio, image.get_height() * scale_ratio, Image::INTERPOLATE_CUBIC);
+ image->resize(image->get_width() * scale_ratio, image->get_height() * scale_ratio, Image::INTERPOLATE_CUBIC);
}
Ref<ImageTexture> tex;
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index a84d65de0e..2e406fb23d 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -94,17 +94,16 @@ void FindReplaceBar::_notification(int p_what) {
}
}
-void FindReplaceBar::_unhandled_input(const InputEvent &p_event) {
+void FindReplaceBar::_unhandled_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid()) {
- const InputEventKey &k = p_event.key;
-
- if (k.pressed && (text_edit->has_focus() || text_vbc->is_a_parent_of(get_focus_owner()))) {
+ if (k->is_pressed() && (text_edit->has_focus() || text_vbc->is_a_parent_of(get_focus_owner()))) {
bool accepted = true;
- switch (k.scancode) {
+ switch (k->get_scancode()) {
case KEY_ESCAPE: {
@@ -957,23 +956,27 @@ FindReplaceDialog::FindReplaceDialog() {
/*** CODE EDITOR ****/
-void CodeTextEditor::_text_editor_gui_input(const InputEvent &p_event) {
+void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb = p_event;
- const InputEventMouseButton &mb = p_event.mouse_button;
+ if (mb.is_valid()) {
- if (mb.pressed && mb.mod.command) {
+ if (mb->is_pressed() && mb->get_command()) {
- if (mb.button_index == BUTTON_WHEEL_UP) {
+ if (mb->get_button_index() == BUTTON_WHEEL_UP) {
_zoom_in();
- } else if (mb.button_index == BUTTON_WHEEL_DOWN) {
+ } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN) {
_zoom_out();
}
}
- } else if (p_event.type == InputEvent::KEY) {
+ }
+
+ Ref<InputEventKey> k = p_event;
+
+ if (k.is_valid()) {
- if (p_event.key.pressed) {
+ if (k->is_pressed()) {
if (ED_IS_SHORTCUT("script_editor/zoom_in", p_event)) {
_zoom_in();
}
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 44d526fda9..8d48c56503 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -100,7 +100,7 @@ class FindReplaceBar : public HBoxContainer {
protected:
void _notification(int p_what);
- void _unhandled_input(const InputEvent &p_event);
+ void _unhandled_input(const Ref<InputEvent> &p_event);
bool _search(uint32_t p_flags, int p_from_line, int p_from_col);
@@ -213,7 +213,7 @@ class CodeTextEditor : public VBoxContainer {
void _complete_request();
void _font_resize_timeout();
- void _text_editor_gui_input(const InputEvent &p_event);
+ void _text_editor_gui_input(const Ref<InputEvent> &p_event);
void _zoom_in();
void _zoom_out();
void _reset_zoom();
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 93c2b7493c..9762bd2000 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -239,7 +239,6 @@ void ConnectDialog::_add_bind() {
case Variant::BASIS: value = Basis(); break;
case Variant::TRANSFORM: value = Transform(); break;
case Variant::COLOR: value = Color(); break;
- case Variant::IMAGE: value = Image(); break;
default: { ERR_FAIL(); } break;
}
@@ -327,7 +326,6 @@ ConnectDialog::ConnectDialog() {
type_list->add_item("Transform", Variant::TRANSFORM);
//type_list->add_separator();
type_list->add_item("Color", Variant::COLOR);
- type_list->add_item("Image", Variant::IMAGE);
type_list->select(0);
Button *add_bind = memnew(Button);
@@ -419,6 +417,10 @@ void ConnectionsDock::_notification(int p_what) {
//RID ci = get_canvas_item();
//get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
}
+
+ if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+ update_tree();
+ }
}
void ConnectionsDock::_close() {
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 7c9dae1e3f..c5cfea0b95 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -109,14 +109,15 @@ void CreateDialog::_text_changed(const String &p_newtext) {
_update_search();
}
-void CreateDialog::_sbox_input(const InputEvent &p_ie) {
+void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
- if (p_ie.type == InputEvent::KEY && (p_ie.key.scancode == KEY_UP ||
- p_ie.key.scancode == KEY_DOWN ||
- p_ie.key.scancode == KEY_PAGEUP ||
- p_ie.key.scancode == KEY_PAGEDOWN)) {
+ Ref<InputEventKey> k = p_ie;
+ if (k.is_valid() && (k->get_scancode() == KEY_UP ||
+ k->get_scancode() == KEY_DOWN ||
+ k->get_scancode() == KEY_PAGEUP ||
+ k->get_scancode() == KEY_PAGEDOWN)) {
- search_options->call("_gui_input", p_ie);
+ search_options->call("_gui_input", k);
search_box->accept_event();
}
}
@@ -622,7 +623,6 @@ CreateDialog::CreateDialog() {
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
search_hb->add_child(search_box);
favorite = memnew(Button);
- favorite->set_flat(true);
favorite->set_toggle_mode(true);
search_hb->add_child(favorite);
favorite->connect("pressed", this, "_favorite_toggled");
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index 6170149c6b..02ce762726 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -69,7 +69,7 @@ class CreateDialog : public ConfirmationDialog {
void _history_activated();
void _favorite_activated();
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _confirmed();
void _text_changed(const String &p_newtext);
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index af95f8d919..6a79f99354 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -295,8 +295,8 @@ void DocData::generate(bool p_basic_types) {
case Variant::REAL:
//keep it
break;
- case Variant::STRING: // 15
- case Variant::NODE_PATH: // 15
+ case Variant::STRING:
+ case Variant::NODE_PATH:
default_arg_text = "\"" + default_arg_text + "\"";
break;
case Variant::TRANSFORM:
@@ -307,19 +307,19 @@ void DocData::generate(bool p_basic_types) {
default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
break;
- case Variant::RECT3: //sorry naming convention fail :( not like it's used often // 10
+ case Variant::RECT3:
case Variant::COLOR:
case Variant::PLANE:
case Variant::POOL_BYTE_ARRAY:
case Variant::POOL_INT_ARRAY:
case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY: //25
+ case Variant::POOL_STRING_ARRAY:
case Variant::POOL_VECTOR2_ARRAY:
case Variant::POOL_VECTOR3_ARRAY:
case Variant::POOL_COLOR_ARRAY:
default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
break;
- case Variant::VECTOR2: // 5
+ case Variant::VECTOR2:
case Variant::RECT2:
case Variant::VECTOR3:
case Variant::QUAT:
@@ -331,15 +331,10 @@ void DocData::generate(bool p_basic_types) {
default_arg_text = "NULL";
break;
}
- case Variant::INPUT_EVENT:
case Variant::DICTIONARY: // 20
case Variant::ARRAY:
case Variant::_RID:
- case Variant::IMAGE:
- //case Variant::RESOURCE:
- default_arg_text = Variant::get_type_name(default_arg.get_type()) + "()";
- break;
default: {}
}
@@ -481,97 +476,78 @@ void DocData::generate(bool p_basic_types) {
if (i == Variant::OBJECT)
continue; //use the core type instead
- int loops = 1;
-
- if (i == Variant::INPUT_EVENT)
- loops = InputEvent::TYPE_MAX;
-
- for (int j = 0; j < loops; j++) {
-
- String cname = Variant::get_type_name(Variant::Type(i));
-
- if (i == Variant::INPUT_EVENT) {
- static const char *ie_type[InputEvent::TYPE_MAX] = {
- "", "Key", "MouseMotion", "MouseButton", "JoypadMotion", "JoypadButton", "ScreenTouch", "ScreenDrag", "Action"
- };
- cname += ie_type[j];
- }
-
- class_list[cname] = ClassDoc();
- ClassDoc &c = class_list[cname];
- c.name = cname;
- c.category = "Built-In Types";
+ String cname = Variant::get_type_name(Variant::Type(i));
- Variant::CallError cerror;
- Variant v = Variant::construct(Variant::Type(i), NULL, 0, cerror);
-
- if (i == Variant::INPUT_EVENT) {
- v.set("type", j);
- }
+ class_list[cname] = ClassDoc();
+ ClassDoc &c = class_list[cname];
+ c.name = cname;
+ c.category = "Built-In Types";
- List<MethodInfo> method_list;
- v.get_method_list(&method_list);
- method_list.sort();
- Variant::get_constructor_list(Variant::Type(i), &method_list);
+ Variant::CallError cerror;
+ Variant v = Variant::construct(Variant::Type(i), NULL, 0, cerror);
- for (List<MethodInfo>::Element *E = method_list.front(); E; E = E->next()) {
+ List<MethodInfo> method_list;
+ v.get_method_list(&method_list);
+ method_list.sort();
+ Variant::get_constructor_list(Variant::Type(i), &method_list);
- MethodInfo &mi = E->get();
- MethodDoc method;
+ for (List<MethodInfo>::Element *E = method_list.front(); E; E = E->next()) {
- method.name = mi.name;
+ MethodInfo &mi = E->get();
+ MethodDoc method;
- for (int i = 0; i < mi.arguments.size(); i++) {
+ method.name = mi.name;
- ArgumentDoc arg;
- PropertyInfo pi = mi.arguments[i];
+ for (int i = 0; i < mi.arguments.size(); i++) {
- arg.name = pi.name;
- //print_line("arg name: "+arg.name);
- if (pi.type == Variant::NIL)
- arg.type = "var";
- else
- arg.type = Variant::get_type_name(pi.type);
- int defarg = mi.default_arguments.size() - mi.arguments.size() + i;
- if (defarg >= 0)
- arg.default_value = mi.default_arguments[defarg];
+ ArgumentDoc arg;
+ PropertyInfo pi = mi.arguments[i];
- method.arguments.push_back(arg);
- }
+ arg.name = pi.name;
+ //print_line("arg name: "+arg.name);
+ if (pi.type == Variant::NIL)
+ arg.type = "var";
+ else
+ arg.type = Variant::get_type_name(pi.type);
+ int defarg = mi.default_arguments.size() - mi.arguments.size() + i;
+ if (defarg >= 0)
+ arg.default_value = mi.default_arguments[defarg];
- if (mi.return_val.type == Variant::NIL) {
- if (mi.return_val.name != "")
- method.return_type = "var";
+ method.arguments.push_back(arg);
+ }
- } else {
- method.return_type = Variant::get_type_name(mi.return_val.type);
- }
+ if (mi.return_val.type == Variant::NIL) {
+ if (mi.return_val.name != "")
+ method.return_type = "var";
- c.methods.push_back(method);
+ } else {
+ method.return_type = Variant::get_type_name(mi.return_val.type);
}
- List<PropertyInfo> properties;
- v.get_property_list(&properties);
- for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
+ c.methods.push_back(method);
+ }
- PropertyInfo pi = E->get();
- PropertyDoc property;
- property.name = pi.name;
- property.type = Variant::get_type_name(pi.type);
+ List<PropertyInfo> properties;
+ v.get_property_list(&properties);
+ for (List<PropertyInfo>::Element *E = properties.front(); E; E = E->next()) {
- c.properties.push_back(property);
- }
+ PropertyInfo pi = E->get();
+ PropertyDoc property;
+ property.name = pi.name;
+ property.type = Variant::get_type_name(pi.type);
+
+ c.properties.push_back(property);
+ }
- List<StringName> constants;
- Variant::get_numeric_constants_for_type(Variant::Type(i), &constants);
+ List<StringName> constants;
+ Variant::get_numeric_constants_for_type(Variant::Type(i), &constants);
- for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
+ for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
- ConstantDoc constant;
- constant.name = E->get();
- constant.value = itos(Variant::get_numeric_constant_value(Variant::Type(i), E->get()));
- c.constants.push_back(constant);
- }
+ ConstantDoc constant;
+ constant.name = E->get();
+ constant.value = itos(Variant::get_numeric_constant_value(Variant::Type(i), E->get()));
+ c.constants.push_back(constant);
}
}
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index bda4d80f4d..79a8f79a7c 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -165,8 +165,8 @@ void DocDump::dump(const String &p_file) {
case Variant::REAL:
//keep it
break;
- case Variant::STRING: // 15
- case Variant::NODE_PATH: // 15
+ case Variant::STRING:
+ case Variant::NODE_PATH:
default_arg_text = "\"" + default_arg_text + "\"";
break;
case Variant::TRANSFORM:
@@ -177,32 +177,27 @@ void DocDump::dump(const String &p_file) {
default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
break;
- case Variant::VECTOR2: // 5
+ case Variant::VECTOR2:
case Variant::RECT2:
case Variant::VECTOR3:
case Variant::PLANE:
case Variant::QUAT:
- case Variant::RECT3: //sorry naming convention fail :( not like it's used often // 10
+ case Variant::RECT3:
case Variant::BASIS:
case Variant::COLOR:
case Variant::POOL_BYTE_ARRAY:
case Variant::POOL_INT_ARRAY:
case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY: //25
+ case Variant::POOL_STRING_ARRAY:
case Variant::POOL_VECTOR3_ARRAY:
case Variant::POOL_COLOR_ARRAY:
default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
break;
case Variant::OBJECT:
- case Variant::INPUT_EVENT:
case Variant::DICTIONARY: // 20
case Variant::ARRAY:
case Variant::_RID:
- case Variant::IMAGE:
- //case Variant::RESOURCE:
- default_arg_text = Variant::get_type_name(default_arg.get_type()) + "()";
- break;
default: {}
}
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 1129a7d633..26029261b2 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -45,10 +45,6 @@ void EditorAudioBus::_notification(int p_what) {
vu_r->set_progress_texture(get_icon("BusVuFull", "EditorIcons"));
scale->set_texture(get_icon("BusVuDb", "EditorIcons"));
- solo->set_icon(get_icon("AudioBusSolo", "EditorIcons"));
- mute->set_icon(get_icon("AudioBusMute", "EditorIcons"));
- bypass->set_icon(get_icon("AudioBusBypass", "EditorIcons"));
-
disabled_vu = get_icon("BusVuFrozen", "EditorIcons");
prev_active = true;
@@ -389,15 +385,18 @@ void EditorAudioBus::_effect_add(int p_which) {
ur->commit_action();
}
-void EditorAudioBus::_gui_input(const InputEvent &p_event) {
+void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode == KEY_DELETE && !p_event.key.echo) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && !k->is_echo()) {
accept_event();
emit_signal("delete_request");
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 2 && p_event.mouse_button.pressed) {
- Vector2 pos = Vector2(p_event.mouse_button.x, p_event.mouse_button.y);
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) {
+
+ Vector2 pos = Vector2(mb->get_pos().x, mb->get_pos().y);
delete_popup->set_position(get_global_position() + pos);
delete_popup->popup();
}
@@ -631,23 +630,23 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) {
vb->add_child(hbc);
hbc->add_spacer();
solo = memnew(ToolButton);
- solo->set_tooltip(TTR("Toggle Solo"));
+ solo->set_text("S");
solo->set_toggle_mode(true);
- // solo->set_modulate(Color(0.8, 1.2, 0.8));
+ solo->set_modulate(Color(0.8, 1.2, 0.8));
solo->set_focus_mode(FOCUS_NONE);
solo->connect("pressed", this, "_solo_toggled");
hbc->add_child(solo);
mute = memnew(ToolButton);
- mute->connect("pressed", this, "_mute_toggled");
+ mute->set_text("M");
mute->set_toggle_mode(true);
- // mute->set_modulate(Color(1.2, 0.8, 0.8));
+ mute->set_modulate(Color(1.2, 0.8, 0.8));
mute->set_focus_mode(FOCUS_NONE);
- mute->set_tooltip(TTR("Toggle Mute"));
+ mute->connect("pressed", this, "_mute_toggled");
hbc->add_child(mute);
bypass = memnew(ToolButton);
- bypass->set_tooltip(TTR("Toggle Bypass"));
+ bypass->set_text("B");
bypass->set_toggle_mode(true);
- // bypass->set_modulate(Color(1.1, 1.1, 0.8));
+ bypass->set_modulate(Color(1.1, 1.1, 0.8));
bypass->set_focus_mode(FOCUS_NONE);
bypass->connect("pressed", this, "_bypass_toggled");
hbc->add_child(bypass);
@@ -767,7 +766,7 @@ void EditorAudioBuses::_update_buses() {
EditorAudioBus *audio_bus = memnew(EditorAudioBus(this));
if (i == 0) {
- audio_bus->set_self_modulate(Color(0.7, 0.7, 0.7));
+ audio_bus->set_self_modulate(Color(1, 0.9, 0.9));
}
bus_hb->add_child(audio_bus);
audio_bus->connect("delete_request", this, "_delete_bus", varray(audio_bus), CONNECT_DEFERRED);
@@ -1109,9 +1108,9 @@ EditorAudioBuses::EditorAudioBuses() {
file_dialog = memnew(EditorFileDialog);
List<String> ext;
- ResourceLoader::get_recognized_extensions_for_type("AudioServerState", &ext);
+ ResourceLoader::get_recognized_extensions_for_type("AudioBusLayout", &ext);
for (List<String>::Element *E = ext.front(); E; E = E->next()) {
- file_dialog->add_filter("*." + E->get() + "; Audio Bus State");
+ file_dialog->add_filter("*." + E->get() + "; Audio Bus Layout");
}
add_child(file_dialog);
file_dialog->connect("file_selected", this, "_file_dialog_callback");
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index 4a3d784796..f5bf464fd0 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -75,7 +75,7 @@ class EditorAudioBus : public PanelContainer {
bool updating_bus;
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _delete_pressed(int p_option);
void _name_changed(const String &p_new_name);
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index c2e829e312..25fade46d6 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -95,11 +95,13 @@ void EditorFileDialog::_notification(int p_what) {
}
}
-void EditorFileDialog::_unhandled_input(const InputEvent &p_event) {
+void EditorFileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && is_window_modal_on_top()) {
+ Ref<InputEventKey> k = p_event;
- if (p_event.key.pressed) {
+ if (k.is_valid() && is_window_modal_on_top()) {
+
+ if (k->is_pressed()) {
bool handled = false;
@@ -488,8 +490,9 @@ void EditorFileDialog::update_file_list() {
if (!has_icon("ResizedFolder", "EditorIcons")) {
Ref<ImageTexture> folder = get_icon("FolderBig", "EditorIcons");
- Image img = folder->get_data();
- img.resize(thumbnail_size, thumbnail_size);
+ Ref<Image> img = folder->get_data();
+ img = img->duplicate();
+ img->resize(thumbnail_size, thumbnail_size);
Ref<ImageTexture> resized_folder = Ref<ImageTexture>(memnew(ImageTexture));
resized_folder->create_from_image(img, 0);
Theme::get_default()->set_icon("ResizedFolder", "EditorIcons", resized_folder);
@@ -499,8 +502,9 @@ void EditorFileDialog::update_file_list() {
if (!has_icon("ResizedFile", "EditorIcons")) {
Ref<ImageTexture> file = get_icon("FileBig", "EditorIcons");
- Image img = file->get_data();
- img.resize(thumbnail_size, thumbnail_size);
+ Ref<Image> img = file->get_data();
+ img = img->duplicate();
+ img->resize(thumbnail_size, thumbnail_size);
Ref<ImageTexture> resized_file = Ref<ImageTexture>(memnew(ImageTexture));
resized_file->create_from_image(img, 0);
Theme::get_default()->set_icon("ResizedFile", "EditorIcons", resized_file);
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index f8c85c4ad1..f44193c70b 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -169,7 +169,7 @@ private:
void _thumbnail_done(const String &p_path, const Ref<Texture> &p_preview, const Variant &p_udata);
void _request_single_thumbnail(const String &p_path);
- void _unhandled_input(const InputEvent &p_event);
+ void _unhandled_input(const Ref<InputEvent> &p_event);
protected:
void _notification(int p_what);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 11fa9396a0..5c5fc7c3d4 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -61,14 +61,16 @@ void EditorHelpSearch::_text_changed(const String &p_newtext) {
_update_search();
}
-void EditorHelpSearch::_sbox_input(const InputEvent &p_ie) {
+void EditorHelpSearch::_sbox_input(const Ref<InputEvent> &p_ie) {
- if (p_ie.type == InputEvent::KEY && (p_ie.key.scancode == KEY_UP ||
- p_ie.key.scancode == KEY_DOWN ||
- p_ie.key.scancode == KEY_PAGEUP ||
- p_ie.key.scancode == KEY_PAGEDOWN)) {
+ Ref<InputEventKey> k = p_ie;
- search_options->call("_gui_input", p_ie);
+ if (k.is_valid() && (k->get_scancode() == KEY_UP ||
+ k->get_scancode() == KEY_DOWN ||
+ k->get_scancode() == KEY_PAGEUP ||
+ k->get_scancode() == KEY_PAGEDOWN)) {
+
+ search_options->call("_gui_input", k);
search_box->accept_event();
}
}
@@ -448,14 +450,16 @@ void EditorHelpIndex::_update_class_list() {
}
}
-void EditorHelpIndex::_sbox_input(const InputEvent &p_ie) {
+void EditorHelpIndex::_sbox_input(const Ref<InputEvent> &p_ie) {
+
+ Ref<InputEventKey> k = p_ie;
- if (p_ie.type == InputEvent::KEY && (p_ie.key.scancode == KEY_UP ||
- p_ie.key.scancode == KEY_DOWN ||
- p_ie.key.scancode == KEY_PAGEUP ||
- p_ie.key.scancode == KEY_PAGEDOWN)) {
+ if (k.is_valid() && (k->get_scancode() == KEY_UP ||
+ k->get_scancode() == KEY_DOWN ||
+ k->get_scancode() == KEY_PAGEUP ||
+ k->get_scancode() == KEY_PAGEDOWN)) {
- class_list->call("_gui_input", p_ie);
+ class_list->call("_gui_input", k);
search_box->accept_event();
}
}
@@ -499,11 +503,14 @@ EditorHelpIndex::EditorHelpIndex() {
/// /////////////////////////////////
DocData *EditorHelp::doc = NULL;
-void EditorHelp::_unhandled_key_input(const InputEvent &p_ev) {
+void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
if (!is_visible_in_tree())
return;
- if (p_ev.key.mod.control && p_ev.key.scancode == KEY_F) {
+
+ Ref<InputEventKey> k = p_ev;
+
+ if (k.is_valid() && k->get_control() && k->get_scancode() == KEY_F) {
search->grab_focus();
search->select_all();
@@ -598,8 +605,11 @@ void EditorHelp::_class_desc_select(const String &p_select) {
}
}
-void EditorHelp::_class_desc_input(const InputEvent &p_input) {
- if (p_input.type == InputEvent::MOUSE_BUTTON && p_input.mouse_button.pressed && p_input.mouse_button.button_index == 1) {
+void EditorHelp::_class_desc_input(const Ref<InputEvent> &p_input) {
+
+ Ref<InputEventMouseButton> mb = p_input;
+
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == 1) {
class_desc->set_selection_enabled(false);
class_desc->set_selection_enabled(true);
}
@@ -1776,7 +1786,7 @@ void EditorHelpBit::_bind_methods() {
void EditorHelpBit::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- add_style_override("panel", get_stylebox("normal", "TextEdit"));
+ add_style_override("panel", get_stylebox("ScriptPanel", "EditorStyles"));
}
}
diff --git a/editor/editor_help.h b/editor/editor_help.h
index d22d61b91d..d6fc0e3bf2 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -56,7 +56,7 @@ class EditorHelpSearch : public ConfirmationDialog {
void _update_search();
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _confirmed();
void _text_changed(const String &p_newtext);
@@ -81,7 +81,7 @@ class EditorHelpIndex : public ConfirmationDialog {
void _tree_item_selected();
void _text_changed(const String &p_text);
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _update_class_list();
@@ -147,7 +147,7 @@ class EditorHelp : public VBoxContainer {
void _scroll_changed(double p_scroll);
void _class_list_select(const String &p_select);
void _class_desc_select(const String &p_select);
- void _class_desc_input(const InputEvent &p_input);
+ void _class_desc_input(const Ref<InputEvent> &p_input);
Error _goto_desc(const String &p_class, int p_vscr = -1);
//void _update_history_buttons();
@@ -157,7 +157,7 @@ class EditorHelp : public VBoxContainer {
void _search(const String &p_str);
void _search_cbk();
- void _unhandled_key_input(const InputEvent &p_ev);
+ void _unhandled_key_input(const Ref<InputEvent> &p_ev);
protected:
void _notification(int p_what);
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index c15eac67fb..5d13c7c254 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -87,6 +87,9 @@ void EditorLog::_notification(int p_what) {
log->add_color_override("default_color", get_color("font_color", "Tree"));
//button->set_icon(get_icon("Console","EditorIcons"));
}
+ if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+ _override_logger_styles();
+ }
/*if (p_what==NOTIFICATION_DRAW) {
diff --git a/editor/editor_name_dialog.cpp b/editor/editor_name_dialog.cpp
index 29d5dda658..d4c418bfc9 100644
--- a/editor/editor_name_dialog.cpp
+++ b/editor/editor_name_dialog.cpp
@@ -32,14 +32,16 @@
#include "class_db.h"
#include "os/keyboard.h"
-void EditorNameDialog::_line_gui_input(const InputEvent &p_event) {
+void EditorNameDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY) {
+ Ref<InputEventKey> k = p_event;
- if (!p_event.key.pressed)
+ if (k.is_valid()) {
+
+ if (!k->is_pressed())
return;
- switch (p_event.key.scancode) {
+ switch (k->get_scancode()) {
case KEY_ENTER:
case KEY_RETURN: {
diff --git a/editor/editor_name_dialog.h b/editor/editor_name_dialog.h
index eeeee34d7e..57586951d1 100644
--- a/editor/editor_name_dialog.h
+++ b/editor/editor_name_dialog.h
@@ -41,7 +41,7 @@ class EditorNameDialog : public ConfirmationDialog {
VBoxContainer *makevb;
LineEdit *name;
- void _line_gui_input(const InputEvent &p_event);
+ void _line_gui_input(const Ref<InputEvent> &p_event);
protected:
static void _bind_methods();
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 698066f188..70ace76243 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -173,12 +173,13 @@ void EditorNode::_update_title() {
OS::get_singleton()->set_window_title(title);
}
-void EditorNode::_unhandled_input(const InputEvent &p_event) {
+void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
if (Node::get_viewport()->get_modal_stack_top())
return; //ignore because of modal window
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && !p_event.key.echo && !gui_base->get_viewport()->gui_has_modal_stack()) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && k->is_pressed() && !k->is_echo() && !gui_base->get_viewport()->gui_has_modal_stack()) {
if (ED_IS_SHORTCUT("editor/next_tab", p_event)) {
int next_tab = editor_data.get_edited_scene() + 1;
@@ -194,28 +195,20 @@ void EditorNode::_unhandled_input(const InputEvent &p_event) {
filesystem_dock->focus_on_filter();
}
- switch (p_event.key.scancode) {
-
- /*case KEY_F1:
- if (!p_event.key.mod.shift && !p_event.key.mod.command)
- _editor_select(EDITOR_SCRIPT);
- break;*/
- case KEY_F1:
- if (!p_event.key.mod.shift && !p_event.key.mod.command)
- _editor_select(EDITOR_2D);
- break;
- case KEY_F2:
- if (!p_event.key.mod.shift && !p_event.key.mod.command)
- _editor_select(EDITOR_3D);
- break;
- case KEY_F3:
- if (!p_event.key.mod.shift && !p_event.key.mod.command)
- _editor_select(EDITOR_SCRIPT);
- break;
- /* case KEY_F5: _menu_option_confirm((p_event.key.mod.control&&p_event.key.mod.shift)?RUN_PLAY_CUSTOM_SCENE:RUN_PLAY,true); break;
- case KEY_F6: _menu_option_confirm(RUN_PLAY_SCENE,true); break;
- //case KEY_F7: _menu_option_confirm(RUN_PAUSE,true); break;
- case KEY_F8: _menu_option_confirm(RUN_STOP,true); break;*/
+ if (ED_IS_SHORTCUT("editor/editor_2d", p_event)) {
+ _editor_select(EDITOR_2D);
+ } else if (ED_IS_SHORTCUT("editor/editor_3d", p_event)) {
+ _editor_select(EDITOR_3D);
+ } else if (ED_IS_SHORTCUT("editor/editor_script", p_event)) {
+ _editor_select(EDITOR_SCRIPT);
+ } else if (ED_IS_SHORTCUT("editor/editor_help", p_event)) {
+ emit_signal("request_help_search", "");
+ } else if (ED_IS_SHORTCUT("editor/editor_assetlib", p_event)) {
+ _editor_select(EDITOR_ASSETLIB);
+ } else if (ED_IS_SHORTCUT("editor/editor_next", p_event)) {
+ _editor_select_next();
+ } else if (ED_IS_SHORTCUT("editor/editor_prev", p_event)) {
+ _editor_select_prev();
}
}
}
@@ -276,29 +269,8 @@ void EditorNode::_notification(int p_what) {
update_menu->set_icon(gui_base->get_icon("Progress" + itos(circle_step + 1), "EditorIcons"));
}
}
-
editor_selection->update();
- {
- uint32_t p32 = 0; //AudioServer::get_singleton()->read_output_peak()>>8;
-
- float peak = p32 == 0 ? -80 : Math::linear2db(p32 / 65535.0);
-
- if (peak < -80)
- peak = -80;
- float vu = audio_vu->get_value();
-
- if (peak > vu) {
- audio_vu->set_value(peak);
- } else {
- float new_vu = vu - get_process_delta_time() * 70.0;
- if (new_vu < -80)
- new_vu = -80;
- if (new_vu != -80 && vu != -80)
- audio_vu->set_value(new_vu);
- }
- }
-
ResourceImporterTexture::get_singleton()->update_imports();
}
if (p_what == NOTIFICATION_ENTER_TREE) {
@@ -356,11 +328,17 @@ void EditorNode::_notification(int p_what) {
if (p_what == MainLoop::NOTIFICATION_WM_QUIT_REQUEST) {
_menu_option_confirm(FILE_QUIT, false);
- };
+ }
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
scene_tabs->set_tab_close_display_policy((bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY));
property_editor->set_enable_capitalize_paths(bool(EDITOR_DEF("interface/capitalize_properties", true)));
+ Ref<Theme> theme = create_editor_theme();
+ theme_base->set_theme(theme);
+ gui_base->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
+ play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
+ scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
+ bottom_panel->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
}
}
@@ -454,6 +432,30 @@ void EditorNode::_node_renamed() {
property_editor->update_tree();
}
+void EditorNode::_editor_select_next() {
+
+ int editor = _get_current_main_editor();
+
+ if (editor == editor_table.size() - 1) {
+ editor = 0;
+ } else {
+ editor++;
+ }
+ _editor_select(editor);
+}
+
+void EditorNode::_editor_select_prev() {
+
+ int editor = _get_current_main_editor();
+
+ if (editor == 0) {
+ editor = editor_table.size() - 1;
+ } else {
+ editor--;
+ }
+ _editor_select(editor);
+}
+
Error EditorNode::load_resource(const String &p_scene) {
RES res = ResourceLoader::load(p_scene);
@@ -2434,28 +2436,28 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case RUN_FILE_SERVER: {
//file_server
- bool ischecked = debug_button->get_popup()->is_item_checked(debug_button->get_popup()->get_item_index(RUN_FILE_SERVER));
+ bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER));
if (ischecked) {
file_server->stop();
run_native->set_deploy_dumb(false);
- //debug_button->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
- //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
+ //debug_menu->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
+ //debug_menu->get_popup()->set_item_text( debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
} else {
file_server->start();
run_native->set_deploy_dumb(true);
- //debug_button->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
- //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
+ //debug_menu->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
+ //debug_menu->get_popup()->set_item_text( debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
}
- debug_button->get_popup()->set_item_checked(debug_button->get_popup()->get_item_index(RUN_FILE_SERVER), !ischecked);
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER), !ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_file_server", !ischecked);
} break;
case RUN_LIVE_DEBUG: {
- bool ischecked = debug_button->get_popup()->is_item_checked(debug_button->get_popup()->get_item_index(RUN_LIVE_DEBUG));
+ bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG));
- debug_button->get_popup()->set_item_checked(debug_button->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked);
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked);
ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked);
@@ -2463,23 +2465,23 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
/*case RUN_DEPLOY_DUMB_CLIENTS: {
- bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS));
- debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),!ischecked);
+ bool ischecked = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS));
+ debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),!ischecked);
run_native->set_deploy_dumb(!ischecked);
} break;*/
case RUN_DEPLOY_REMOTE_DEBUG: {
- bool ischecked = debug_button->get_popup()->is_item_checked(debug_button->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG));
- debug_button->get_popup()->set_item_checked(debug_button->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG), !ischecked);
+ bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG));
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG), !ischecked);
run_native->set_deploy_debug_remote(!ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_deploy_remote_debug", !ischecked);
} break;
case RUN_DEBUG_COLLISONS: {
- bool ischecked = debug_button->get_popup()->is_item_checked(debug_button->get_popup()->get_item_index(RUN_DEBUG_COLLISONS));
- debug_button->get_popup()->set_item_checked(debug_button->get_popup()->get_item_index(RUN_DEBUG_COLLISONS), !ischecked);
+ bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_COLLISONS));
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_COLLISONS), !ischecked);
run_native->set_debug_collisions(!ischecked);
editor_run.set_debug_collisions(!ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisons", !ischecked);
@@ -2487,8 +2489,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case RUN_DEBUG_NAVIGATION: {
- bool ischecked = debug_button->get_popup()->is_item_checked(debug_button->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION));
- debug_button->get_popup()->set_item_checked(debug_button->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION), !ischecked);
+ bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION));
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEBUG_NAVIGATION), !ischecked);
run_native->set_debug_navigation(!ischecked);
editor_run.set_debug_navigation(!ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_navigation", !ischecked);
@@ -2496,8 +2498,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case RUN_RELOAD_SCRIPTS: {
- bool ischecked = debug_button->get_popup()->is_item_checked(debug_button->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS));
- debug_button->get_popup()->set_item_checked(debug_button->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked);
+ bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS));
+ debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked);
ScriptEditor::get_singleton()->set_live_auto_reload_running_scripts(!ischecked);
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_reload_scripts", !ischecked);
@@ -2706,7 +2708,9 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor) {
ToolButton *tb = memnew(ToolButton);
tb->set_toggle_mode(true);
tb->connect("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size()));
- tb->set_icon(singleton->gui_base->get_icon(p_editor->get_name(), "EditorIcons"));
+ tb->set_text(p_editor->get_name());
+ tb->set_icon(p_editor->get_base_control()->get_icon(p_editor->get_name(), "EditorIcons"));
+ tb->set_name(p_editor->get_name());
singleton->main_editor_buttons.push_back(tb);
singleton->main_editor_button_vb->add_child(tb);
singleton->editor_table.push_back(p_editor);
@@ -3566,7 +3570,7 @@ bool EditorNode::is_scene_in_use(const String &p_path) {
void EditorNode::register_editor_types() {
ClassDB::register_class<EditorPlugin>();
- // ClassDB::register_class<EditorImportPlugin>();
+ ClassDB::register_class<EditorImportPlugin>();
// ClassDB::register_class<EditorExportPlugin>();
// ClassDB::register_class<EditorScenePostImport>();
ClassDB::register_class<EditorScript>();
@@ -3686,11 +3690,13 @@ void EditorNode::show_warning(const String &p_text, const String &p_title) {
warning->popup_centered_minsize();
}
-void EditorNode::_dock_select_input(const InputEvent &p_input) {
+void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
+
+ Ref<InputEventMouse> me = p_input;
- if (p_input.type == InputEvent::MOUSE_BUTTON || p_input.type == InputEvent::MOUSE_MOTION) {
+ if (me.is_valid()) {
- Vector2 point(p_input.mouse_motion.x, p_input.mouse_motion.y);
+ Vector2 point = me->get_pos();
int nrect = -1;
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
@@ -3708,7 +3714,9 @@ void EditorNode::_dock_select_input(const InputEvent &p_input) {
if (nrect == -1)
return;
- if (p_input.type == InputEvent::MOUSE_BUTTON && p_input.mouse_button.button_index == 1 && p_input.mouse_button.pressed && dock_popup_selected != nrect) {
+ Ref<InputEventMouseButton> mb = me;
+
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed() && dock_popup_selected != nrect) {
Control *dock = dock_slot[dock_popup_selected]->get_current_tab_control();
if (dock) {
dock_slot[dock_popup_selected]->remove_child(dock);
@@ -4463,8 +4471,9 @@ Variant EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from) {
{
//todo make proper previews
Ref<ImageTexture> pic = gui_base->get_icon("FileBig", "EditorIcons");
- Image img = pic->get_data();
- img.resize(48, 48); //meh
+ Ref<Image> img = pic->get_data();
+ img = img->duplicate();
+ img->resize(48, 48); //meh
Ref<ImageTexture> resized_pic = Ref<ImageTexture>(memnew(ImageTexture));
resized_pic->create_from_image(img);
preview = resized_pic;
@@ -4708,6 +4717,23 @@ void EditorNode::_dim_timeout() {
}
}
+void EditorNode::_check_gui_base_size() {
+ print_line(itos(int(gui_base->get_size().width)));
+ if (gui_base->get_size().width > 1200 * EDSCALE) {
+ for (int i = 0; i < singleton->main_editor_button_vb->get_child_count(); i++) {
+ ToolButton *btn = singleton->main_editor_button_vb->get_child(i)->cast_to<ToolButton>();
+ if (btn == singleton->distraction_free) continue;
+ btn->set_text(btn->get_name());
+ }
+ } else {
+ for (int i = 0; i < singleton->main_editor_button_vb->get_child_count(); i++) {
+ ToolButton *btn = singleton->main_editor_button_vb->get_child(i)->cast_to<ToolButton>();
+ if (btn == singleton->distraction_free) continue;
+ btn->set_text("");
+ }
+ }
+}
+
void EditorNode::open_export_template_manager() {
export_template_manager->popup_manager();
@@ -4790,11 +4816,13 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("_open_imported"), &EditorNode::_open_imported);
ClassDB::bind_method(D_METHOD("_inherit_imported"), &EditorNode::_inherit_imported);
ClassDB::bind_method(D_METHOD("_dim_timeout"), &EditorNode::_dim_timeout);
+ ClassDB::bind_method(D_METHOD("_check_gui_base_size"), &EditorNode::_check_gui_base_size);
ADD_SIGNAL(MethodInfo("play_pressed"));
ADD_SIGNAL(MethodInfo("pause_pressed"));
ADD_SIGNAL(MethodInfo("stop_pressed"));
ADD_SIGNAL(MethodInfo("request_help"));
+ ADD_SIGNAL(MethodInfo("request_help_search"));
ADD_SIGNAL(MethodInfo("script_add_function_request", PropertyInfo(Variant::OBJECT, "obj"), PropertyInfo(Variant::STRING, "function"), PropertyInfo(Variant::POOL_STRING_ARRAY, "args")));
ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "obj")));
}
@@ -4922,17 +4950,19 @@ EditorNode::EditorNode() {
ClassDB::set_class_enabled("CollisionShape2D", true);
ClassDB::set_class_enabled("CollisionPolygon2D", true);
- Control *theme_base = memnew(Control);
+ theme_base = memnew(Control);
add_child(theme_base);
theme_base->set_area_as_parent_rect();
gui_base = memnew(Panel);
theme_base->add_child(gui_base);
gui_base->set_area_as_parent_rect();
+ gui_base->connect("item_rect_changed", this, "_check_gui_base_size");
Ref<Theme> theme = create_editor_theme();
theme_base->set_theme(theme);
gui_base->set_theme(create_custom_theme());
+ gui_base->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
resource_preview = memnew(EditorResourcePreview);
add_child(resource_preview);
@@ -4947,6 +4977,7 @@ EditorNode::EditorNode() {
main_vbox = memnew(VBoxContainer);
gui_base->add_child(main_vbox);
main_vbox->set_area_as_parent_rect(8);
+ main_vbox->set_margin(MARGIN_TOP, 5);
#if 0
PanelContainer *top_dark_panel = memnew( PanelContainer );
@@ -5083,7 +5114,7 @@ EditorNode::EditorNode() {
dock_slot[i]->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_slot[i]->set_popup(dock_select_popoup);
dock_slot[i]->connect("pre_popup_pressed", this, "_dock_pre_popup", varray(i));
- //dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT);
+ dock_slot[i]->set_tab_align(TabContainer::ALIGN_LEFT);
}
dock_drag_timer = memnew(Timer);
@@ -5114,16 +5145,24 @@ EditorNode::EditorNode() {
scene_tabs->connect("right_button_pressed", this, "_scene_tab_script_edited");
scene_tabs->connect("tab_close", this, "_scene_tab_closed");
- // MarginContainer *st_mc = memnew( MarginContainer );
- // st_mc->add_child(scene_tabs);
- srt->add_child(scene_tabs);
+ HBoxContainer *tabbar_container = memnew(HBoxContainer);
+ scene_tabs->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+
+ srt->add_child(tabbar_container);
+ tabbar_container->add_child(scene_tabs);
+ distraction_free = memnew(ToolButton);
+ tabbar_container->add_child(distraction_free);
+ distraction_free->set_shortcut(ED_SHORTCUT("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11));
+ distraction_free->connect("pressed", this, "_toggle_distraction_free_mode");
+ distraction_free->set_icon(gui_base->get_icon("DistractionFree", "EditorIcons"));
+ distraction_free->set_toggle_mode(true);
scene_root_parent = memnew(PanelContainer);
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
- scene_root_parent->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles"));
+ scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
- // Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel_full","PanelContainer");
- // scene_root_parent->add_style_override("panel",sp);
+ //Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel","TabContainer");
+ //scene_root_parent->add_style_override("panel",sp);
/*scene_root_parent->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END );
scene_root_parent->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_END );
@@ -5153,17 +5192,45 @@ EditorNode::EditorNode() {
scene_root_parent->add_child(viewport);
PanelContainer *top_region = memnew(PanelContainer);
- top_region->add_style_override("panel", memnew(StyleBoxEmpty));
+ top_region->add_style_override("panel", gui_base->get_stylebox("MenuPanel", "EditorStyles"));
HBoxContainer *left_menu_hb = memnew(HBoxContainer);
top_region->add_child(left_menu_hb);
menu_hb->add_child(top_region);
PopupMenu *p;
+ project_menu = memnew(MenuButton);
+ project_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools."));
+ project_menu->set_text(TTR("Project"));
+ project_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
+ left_menu_hb->add_child(project_menu);
+
+ p = project_menu->get_popup();
+ p->connect("id_pressed", this, "_menu_option");
+ p->add_item(TTR("Run Script"), FILE_RUN_SCRIPT, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_R);
+ p->add_item(TTR("Export"), FILE_EXPORT_PROJECT);
+
+ PopupMenu *tool_menu = memnew(PopupMenu);
+ tool_menu->set_name("Tools");
+ tool_menu->connect("id_pressed", this, "_menu_option");
+ p->add_child(tool_menu);
+ p->add_submenu_item(TTR("Tools"), "Tools");
+ tool_menu->add_item(TTR("Orphan Resource Explorer"), TOOLS_ORPHAN_RESOURCES);
+ p->add_separator();
+ p->add_item(TTR("Project Settings"), RUN_SETTINGS);
+ p->add_separator();
+#ifdef OSX_ENABLED
+ p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q);
+#else
+ p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_CTRL + KEY_Q);
+#endif
+ p->add_item(TTR("Quit"), FILE_QUIT, KEY_MASK_CMD + KEY_Q);
+
file_menu = memnew(MenuButton);
file_menu->set_text(TTR("Scene"));
//file_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
left_menu_hb->add_child(file_menu);
+ file_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
prev_scene = memnew(ToolButton);
prev_scene->set_icon(gui_base->get_icon("PrevScene", "EditorIcons"));
@@ -5211,18 +5278,7 @@ EditorNode::EditorNode() {
p->add_shortcut(ED_SHORTCUT("editor/undo", TTR("Undo"), KEY_MASK_CMD + KEY_Z), EDIT_UNDO, true);
p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"), KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_Z), EDIT_REDO, true);
p->add_separator();
- p->add_item(TTR("Run Script"), FILE_RUN_SCRIPT, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_R);
- p->add_separator();
- p->add_item(TTR("Project Settings"), RUN_SETTINGS);
- p->add_separator();
p->add_item(TTR("Revert Scene"), EDIT_REVERT);
- p->add_separator();
-#ifdef OSX_ENABLED
- p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_ALT + KEY_Q);
-#else
- p->add_item(TTR("Quit to Project List"), RUN_PROJECT_MANAGER, KEY_MASK_SHIFT + KEY_MASK_CTRL + KEY_Q);
-#endif
- p->add_item(TTR("Quit"), FILE_QUIT, KEY_MASK_CMD + KEY_Q);
recent_scenes = memnew(PopupMenu);
recent_scenes->set_name("RecentScenes");
@@ -5236,17 +5292,11 @@ EditorNode::EditorNode() {
}
PanelContainer *editor_region = memnew(PanelContainer);
- editor_region->add_style_override("panel", memnew(StyleBoxEmpty));
main_editor_button_vb = memnew(HBoxContainer);
editor_region->add_child(main_editor_button_vb);
- menu_hb->add_child(editor_region);
- distraction_free = memnew(ToolButton);
- main_editor_button_vb->add_child(distraction_free);
- distraction_free->set_shortcut(ED_SHORTCUT("editor/distraction_free_mode", TTR("Distraction Free Mode"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F11));
- distraction_free->connect("pressed", this, "_toggle_distraction_free_mode");
- distraction_free->set_icon(gui_base->get_icon("DistractionFree", "EditorIcons"));
- distraction_free->set_toggle_mode(true);
+ menu_hb->add_spacer();
+ menu_hb->add_child(editor_region);
//menu_hb->add_spacer();
#if 0
@@ -5277,25 +5327,54 @@ EditorNode::EditorNode() {
menu_panel->add_child( resource_menu );
#endif
- tool_menu = memnew(MenuButton);
- tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools."));
- tool_menu->set_text(TTR("Tools"));
+ debug_menu = memnew(MenuButton);
+ debug_menu->set_text(TTR("Debug"));
+ debug_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
+ left_menu_hb->add_child(debug_menu);
+ p = debug_menu->get_popup();
+ p->set_hide_on_item_selection(false);
+ p->add_check_item(TTR("Deploy with Remote Debug"), RUN_DEPLOY_REMOTE_DEBUG);
+ p->set_item_tooltip(p->get_item_count() - 1, TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged."));
+ p->add_check_item(TTR("Small Deploy with Network FS"), RUN_FILE_SERVER);
+ p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is enabled, export or deploy will produce a minimal executable.\nThe filesystem will be provided from the project by the editor over the network.\nOn Android, deploy will use the USB cable for faster performance. This option speeds up testing for games with a large footprint."));
+ p->add_separator();
+ p->add_check_item(TTR("Visible Collision Shapes"), RUN_DEBUG_COLLISONS);
+ p->set_item_tooltip(p->get_item_count() - 1, TTR("Collision shapes and raycast nodes (for 2D and 3D) will be visible on the running game if this option is turned on."));
+ p->add_check_item(TTR("Visible Navigation"), RUN_DEBUG_NAVIGATION);
+ p->set_item_tooltip(p->get_item_count() - 1, TTR("Navigation meshes and polygons will be visible on the running game if this option is turned on."));
+ p->add_separator();
+ p->add_check_item(TTR("Sync Scene Changes"), RUN_LIVE_DEBUG);
+ p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
+ p->add_check_item(TTR("Sync Script Changes"), RUN_RELOAD_SCRIPTS);
+ p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
+ p->connect("id_pressed", this, "_menu_option");
- //tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
- left_menu_hb->add_child(tool_menu);
+ menu_hb->add_spacer();
- p = tool_menu->get_popup();
- p->connect("id_pressed", this, "_menu_option");
- p->add_item(TTR("Orphan Resource Explorer"), TOOLS_ORPHAN_RESOURCES);
+ settings_menu = memnew(MenuButton);
+ left_menu_hb->add_child(settings_menu);
+ settings_menu->set_text(TTR("Editor"));
+ settings_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
+ settings_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
+ //settings_menu->set_anchor(MARGIN_RIGHT,ANCHOR_END);
+ p = settings_menu->get_popup();
+
+ //p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES);
+ p->add_item(TTR("Editor Settings"), SETTINGS_PREFERENCES);
+ //p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS);
+ p->add_separator();
+ editor_layouts = memnew(PopupMenu);
+ editor_layouts->set_name("Layouts");
+ p->add_child(editor_layouts);
+ editor_layouts->connect("id_pressed", this, "_layout_menu_option");
+ p->add_submenu_item(TTR("Editor Layout"), "Layouts");
- export_button = memnew(ToolButton);
- export_button->set_tooltip(TTR("Export the project to many platforms."));
- export_button->set_text(TTR("Export"));
- export_button->connect("pressed", this, "_menu_option", varray(FILE_EXPORT_PROJECT));
- export_button->set_focus_mode(Control::FOCUS_NONE);
- left_menu_hb->add_child(export_button);
+ p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11), SETTINGS_TOGGLE_FULLSCREN);
- menu_hb->add_spacer();
+ p->add_separator();
+ p->add_item(TTR("Manage Export Templates"), SETTINGS_MANAGE_EXPORT_TEMPLATES);
+ p->add_separator();
+ p->add_item(TTR("About"), SETTINGS_ABOUT);
//Separator *s1 = memnew( VSeparator );
//menu_panel->add_child(s1);
@@ -5303,20 +5382,18 @@ EditorNode::EditorNode() {
//s1->set_size(Point2(10,15));
play_cc = memnew(CenterContainer);
- // play_cc->add_style_override("bg",gui_base->get_stylebox("panel","PanelContainer"));
-
play_cc->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
- gui_base->add_child(play_cc);
+ menu_hb->add_child(play_cc);
play_cc->set_area_as_parent_rect();
play_cc->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_BEGIN, 10);
play_cc->set_margin(MARGIN_TOP, 5);
- top_region = memnew(PanelContainer);
- top_region->add_style_override("panel", gui_base->get_stylebox("panel", "ButtonGroup"));
- play_cc->add_child(top_region);
+ play_button_panel = memnew(PanelContainer);
+ play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
+ play_cc->add_child(play_button_panel);
HBoxContainer *play_hb = memnew(HBoxContainer);
- top_region->add_child(play_hb);
+ play_button_panel->add_child(play_hb);
play_button = memnew(ToolButton);
play_hb->add_child(play_button);
@@ -5377,33 +5454,6 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_tooltip(TTR("Play custom scene"));
play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5));
- debug_button = memnew(MenuButton);
- debug_button->set_flat(true);
- play_hb->add_child(debug_button);
- //debug_button->set_toggle_mode(true);
- debug_button->set_focus_mode(Control::FOCUS_NONE);
- debug_button->set_icon(gui_base->get_icon("Remote", "EditorIcons"));
- //debug_button->connect("pressed", this,"_menu_option",make_binds(RUN_LIVE_DEBUG));
- debug_button->set_tooltip(TTR("Debug options"));
-
- p = debug_button->get_popup();
- p->set_hide_on_item_selection(false);
- p->add_check_item(TTR("Deploy with Remote Debug"), RUN_DEPLOY_REMOTE_DEBUG);
- p->set_item_tooltip(p->get_item_count() - 1, TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged."));
- p->add_check_item(TTR("Small Deploy with Network FS"), RUN_FILE_SERVER);
- p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is enabled, export or deploy will produce a minimal executable.\nThe filesystem will be provided from the project by the editor over the network.\nOn Android, deploy will use the USB cable for faster performance. This option speeds up testing for games with a large footprint."));
- p->add_separator();
- p->add_check_item(TTR("Visible Collision Shapes"), RUN_DEBUG_COLLISONS);
- p->set_item_tooltip(p->get_item_count() - 1, TTR("Collision shapes and raycast nodes (for 2D and 3D) will be visible on the running game if this option is turned on."));
- p->add_check_item(TTR("Visible Navigation"), RUN_DEBUG_NAVIGATION);
- p->set_item_tooltip(p->get_item_count() - 1, TTR("Navigation meshes and polygons will be visible on the running game if this option is turned on."));
- p->add_separator();
- p->add_check_item(TTR("Sync Scene Changes"), RUN_LIVE_DEBUG);
- p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
- p->add_check_item(TTR("Sync Script Changes"), RUN_RELOAD_SCRIPTS);
- p->set_item_tooltip(p->get_item_count() - 1, TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
- p->connect("id_pressed", this, "_menu_option");
-
/*
run_settings_button = memnew( ToolButton );
//menu_hb->add_child(run_settings_button);
@@ -5423,65 +5473,24 @@ EditorNode::EditorNode() {
*/
progress_hb = memnew(BackgroundProgress);
- menu_hb->add_child(progress_hb);
+ //menu_hb->add_child(progress_hb);
{
Control *sp = memnew(Control);
sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- menu_hb->add_child(sp);
+ //menu_hb->add_child(sp);
}
- PanelContainer *vu_cont = memnew(PanelContainer);
- vu_cont->add_style_override("panel", memnew(StyleBoxEmpty));
-
- // CenterContainer *vu_cont = memnew( CenterContainer );
- menu_hb->add_child(vu_cont);
-
- audio_vu = memnew(TextureProgress);
- CenterContainer *vu_cc = memnew(CenterContainer);
- vu_cc->add_child(audio_vu);
- vu_cont->add_child(vu_cc);
- audio_vu->set_under_texture(gui_base->get_icon("VuEmpty", "EditorIcons"));
- audio_vu->set_progress_texture(gui_base->get_icon("VuFull", "EditorIcons"));
- audio_vu->set_max(24);
- audio_vu->set_min(-80);
- audio_vu->set_step(0.01);
- audio_vu->set_value(0);
-
{
Control *sp = memnew(Control);
sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- menu_hb->add_child(sp);
+ //menu_hb->add_child(sp);
}
top_region = memnew(PanelContainer);
- top_region->add_style_override("panel", memnew(StyleBoxEmpty));
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
- top_region->add_child(right_menu_hb);
- menu_hb->add_child(top_region);
-
- settings_menu = memnew(MenuButton);
- settings_menu->set_text(TTR("Settings"));
- //settings_menu->set_anchor(MARGIN_RIGHT,ANCHOR_END);
- right_menu_hb->add_child(settings_menu);
- p = settings_menu->get_popup();
-
- //p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES);
- p->add_item(TTR("Editor Settings"), SETTINGS_PREFERENCES);
- //p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS);
- p->add_separator();
- editor_layouts = memnew(PopupMenu);
- editor_layouts->set_name("Layouts");
- p->add_child(editor_layouts);
- editor_layouts->connect("id_pressed", this, "_layout_menu_option");
- p->add_submenu_item(TTR("Editor Layout"), "Layouts");
-
- p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode", TTR("Toggle Fullscreen"), KEY_MASK_SHIFT | KEY_F11), SETTINGS_TOGGLE_FULLSCREN);
-
- p->add_separator();
- p->add_item(TTR("Manage Export Templates"), SETTINGS_MANAGE_EXPORT_TEMPLATES);
- p->add_separator();
- p->add_item(TTR("About"), SETTINGS_ABOUT);
+ //top_region->add_child(right_menu_hb);
+ menu_hb->add_child(right_menu_hb);
layout_dialog = memnew(EditorNameDialog);
gui_base->add_child(layout_dialog);
@@ -5489,16 +5498,11 @@ EditorNode::EditorNode() {
layout_dialog->set_size(Size2(175, 70) * EDSCALE);
layout_dialog->connect("name_confirmed", this, "_dialog_action");
- sources_button = memnew(ToolButton);
- right_menu_hb->add_child(sources_button);
- sources_button->set_icon(gui_base->get_icon("DependencyOk", "EditorIcons"));
- sources_button->connect("pressed", this, "_menu_option", varray(SOURCES_REIMPORT));
- sources_button->set_tooltip(TTR("Alerts when an external resource has changed."));
-
update_menu = memnew(MenuButton);
update_menu->set_tooltip(TTR("Spins when the editor window repaints!"));
right_menu_hb->add_child(update_menu);
update_menu->set_icon(gui_base->get_icon("Progress1", "EditorIcons"));
+ update_menu->get_popup()->connect("id_pressed", this, "_menu_option");
p = update_menu->get_popup();
p->add_check_item(TTR("Update Always"), SETTINGS_UPDATE_ALWAYS);
p->add_check_item(TTR("Update Changes"), SETTINGS_UPDATE_CHANGES);
@@ -5621,7 +5625,7 @@ EditorNode::EditorNode() {
search_button = memnew(ToolButton);
search_button->set_toggle_mode(true);
search_button->set_pressed(false);
- search_button->set_icon(gui_base->get_icon("Search", "EditorIcons"));
+ search_button->set_icon(gui_base->get_icon("Zoom", "EditorIcons"));
prop_editor_hb->add_child(search_button);
search_button->connect("toggled", this, "_toggle_search_bar");
@@ -5711,7 +5715,7 @@ EditorNode::EditorNode() {
_update_layouts_menu();
bottom_panel = memnew(PanelContainer);
- bottom_panel->add_style_override("panel", gui_base->get_stylebox("EditorPanel", "EditorStyles"));
+ bottom_panel->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
center_split->add_child(bottom_panel);
center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
@@ -5883,7 +5887,6 @@ EditorNode::EditorNode() {
file_menu->get_popup()->connect("id_pressed", this, "_menu_option");
object_menu->get_popup()->connect("id_pressed", this, "_menu_option");
- update_menu->get_popup()->connect("id_pressed", this, "_menu_option");
settings_menu->get_popup()->connect("id_pressed", this, "_menu_option");
file->connect("file_selected", this, "_dialog_action");
@@ -6111,6 +6114,14 @@ EditorNode::EditorNode() {
_dim_timer->set_wait_time(0.01666f);
_dim_timer->connect("timeout", this, "_dim_timeout");
add_child(_dim_timer);
+
+ ED_SHORTCUT("editor/editor_2d", TTR("Open 2D Editor"), KEY_F2);
+ ED_SHORTCUT("editor/editor_3d", TTR("Open 3D Editor"), KEY_F3);
+ ED_SHORTCUT("editor/editor_script", TTR("Open Script Editor"), KEY_F4);
+ ED_SHORTCUT("editor/editor_help", TTR("Search Help"), KEY_F1);
+ ED_SHORTCUT("editor/editor_assetlib", TTR("Open Asset Library"));
+ ED_SHORTCUT("editor/editor_next", TTR("Open the next Editor"));
+ ED_SHORTCUT("editor/editor_prev", TTR("Open the previous Editor"));
}
EditorNode::~EditorNode() {
@@ -6140,7 +6151,7 @@ void EditorPluginList::edit(Object *p_object) {
}
}
-bool EditorPluginList::forward_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) {
+bool EditorPluginList::forward_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) {
bool discard = false;
@@ -6153,7 +6164,7 @@ bool EditorPluginList::forward_gui_input(const Transform2D &p_canvas_xform, cons
return discard;
}
-bool EditorPluginList::forward_spatial_gui_input(Camera *p_camera, const InputEvent &p_event) {
+bool EditorPluginList::forward_spatial_gui_input(Camera *p_camera, const Ref<InputEvent> &p_event) {
bool discard = false;
for (int i = 0; i < plugins_list.size(); i++) {
diff --git a/editor/editor_node.h b/editor/editor_node.h
index fc107bb505..b996505016 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -205,8 +205,10 @@ private:
//Ref<ResourceImportMetadata> scene_import_metadata;
PanelContainer *scene_root_parent;
+ Control *theme_base;
Control *gui_base;
VBoxContainer *main_vbox;
+ PanelContainer *play_button_panel;
//split
@@ -242,7 +244,9 @@ private:
HBoxContainer *menu_hb;
Control *viewport;
MenuButton *file_menu;
- MenuButton *tool_menu;
+ MenuButton *project_menu;
+ MenuButton *debug_menu;
+ PopupMenu *tool_menu;
ToolButton *export_button;
ToolButton *prev_scene;
MenuButton *object_menu;
@@ -254,7 +258,6 @@ private:
ToolButton *run_settings_button;
ToolButton *play_scene_button;
ToolButton *play_custom_scene_button;
- MenuButton *debug_button;
ToolButton *search_button;
TextureProgress *audio_vu;
//MenuButton *fileserver_menu;
@@ -310,7 +313,7 @@ private:
LineEdit *file_export_password;
String current_path;
MenuButton *update_menu;
- ToolButton *sources_button;
+
//TabContainer *prop_pallete;
//TabContainer *top_pallete;
String defer_load_scene;
@@ -440,6 +443,8 @@ private:
void _imported(Node *p_node);
void _node_renamed();
+ void _editor_select_next();
+ void _editor_select_prev();
void _editor_select(int p_which);
void _set_scene_metadata(const String &p_file, int p_idx = -1);
void _get_scene_metadata(const String &p_file);
@@ -478,7 +483,7 @@ private:
bool convert_old;
- void _unhandled_input(const InputEvent &p_event);
+ void _unhandled_input(const Ref<InputEvent> &p_event);
static void _load_error_notify(void *p_ud, const String &p_text);
@@ -535,7 +540,7 @@ private:
bool _find_scene_in_use(Node *p_node, const String &p_path) const;
- void _dock_select_input(const InputEvent &p_input);
+ void _dock_select_input(const Ref<InputEvent> &p_input);
void _dock_move_left();
void _dock_move_right();
void _dock_select_draw();
@@ -607,6 +612,7 @@ private:
void _start_dimming(bool p_dimming);
void _dim_timeout();
+ void _check_gui_base_size();
protected:
void _notification(int p_what);
@@ -618,7 +624,8 @@ public:
enum EditorTable {
EDITOR_2D = 0,
EDITOR_3D,
- EDITOR_SCRIPT
+ EDITOR_SCRIPT,
+ EDITOR_ASSETLIB
};
void set_visible_editor(EditorTable p_table) { _editor_select(p_table); }
@@ -801,8 +808,8 @@ public:
void make_visible(bool p_visible);
void edit(Object *p_object);
- bool forward_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event);
- bool forward_spatial_gui_input(Camera *p_camera, const InputEvent &p_event);
+ bool forward_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event);
+ bool forward_spatial_gui_input(Camera *p_camera, const Ref<InputEvent> &p_event);
void forward_draw_over_canvas(const Transform2D &p_canvas_xform, Control *p_canvas);
void clear();
bool empty();
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 98e0808ba5..8ce4f88590 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -69,9 +69,10 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
}
}
-void EditorPath::_gui_input(const InputEvent &p_event) {
+void EditorPath::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_LEFT && p_event.mouse_button.pressed) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
Object *obj = ObjectDB::get_instance(history->get_path_object(history->get_path_size() - 1));
if (!obj)
diff --git a/editor/editor_path.h b/editor/editor_path.h
index a142cba44c..7b73e7ebb6 100644
--- a/editor/editor_path.h
+++ b/editor/editor_path.h
@@ -46,7 +46,7 @@ class EditorPath : public Control {
EditorPath();
void _popup_select(int p_idx);
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _add_children_to_popup(Object *p_obj, int p_depth = 0);
protected:
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 405784a7e2..1b8d1b1677 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -156,7 +156,7 @@ Ref<SpatialEditorGizmo> EditorPlugin::create_spatial_gizmo(Spatial *p_spatial) {
return Ref<SpatialEditorGizmo>();
}
-bool EditorPlugin::forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) {
+bool EditorPlugin::forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) {
if (get_script_instance() && get_script_instance()->has_method("forward_canvas_gui_input")) {
return get_script_instance()->call("forward_canvas_gui_input", p_canvas_xform, p_event);
@@ -175,7 +175,7 @@ void EditorPlugin::update_canvas() {
CanvasItemEditor::get_singleton()->get_viewport_control()->update();
}
-bool EditorPlugin::forward_spatial_gui_input(Camera *p_camera, const InputEvent &p_event) {
+bool EditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<InputEvent> &p_event) {
if (get_script_instance() && get_script_instance()->has_method("forward_spatial_gui_input")) {
return get_script_instance()->call("forward_spatial_gui_input", p_camera, p_event);
@@ -276,6 +276,11 @@ bool EditorPlugin::get_remove_list(List<Node *> *p_list) {
void EditorPlugin::restore_global_state() {}
void EditorPlugin::save_global_state() {}
+void EditorPlugin::add_import_plugin(const Ref<EditorImportPlugin> &p_importer) {
+ ResourceFormatImporter::get_singleton()->add_importer(p_importer);
+ EditorFileSystem::get_singleton()->scan_changes();
+}
+
void EditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
if (get_script_instance() && get_script_instance()->has_method("set_window_layout")) {
@@ -360,10 +365,10 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_editor_settings:EditorSettings"), &EditorPlugin::get_editor_settings);
ClassDB::bind_method(D_METHOD("queue_save_layout"), &EditorPlugin::queue_save_layout);
ClassDB::bind_method(D_METHOD("edit_resource"), &EditorPlugin::edit_resource);
-
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::INPUT_EVENT, "event")));
+ ClassDB::bind_method(D_METHOD("add_import_plugin"), &EditorPlugin::add_import_plugin);
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_canvas", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "canvas:Control")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::INPUT_EVENT, "event")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
MethodInfo gizmo = MethodInfo(Variant::OBJECT, "create_spatial_gizmo", PropertyInfo(Variant::OBJECT, "for_spatial:Spatial"));
gizmo.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE;
gizmo.return_val.hint_string = "EditorSpatialGizmo";
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 5df1f63fbe..1ef447a6b8 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -30,6 +30,7 @@
#ifndef EDITOR_PLUGIN_H
#define EDITOR_PLUGIN_H
+#include "editor/import/editor_import_plugin.h"
#include "io/config_file.h"
#include "scene/gui/tool_button.h"
#include "scene/main/node.h"
@@ -106,9 +107,9 @@ public:
void remove_tool_menu_item(const String &p_name);
virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial *p_spatial);
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event);
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event);
virtual void forward_draw_over_canvas(const Transform2D &p_canvas_xform, Control *p_canvas);
- virtual bool forward_spatial_gui_input(Camera *p_camera, const InputEvent &p_event);
+ virtual bool forward_spatial_gui_input(Camera *p_camera, const Ref<InputEvent> &p_event);
virtual String get_name() const;
virtual bool has_main_screen() const;
virtual void make_visible(bool p_visible);
@@ -146,6 +147,8 @@ public:
virtual void restore_global_state();
virtual void save_global_state();
+ void add_import_plugin(const Ref<EditorImportPlugin> &p_importer);
+
EditorPlugin();
virtual ~EditorPlugin();
};
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 8f4312111a..d427126734 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -344,14 +344,16 @@ void EditorProfiler::_update_plot() {
wr = PoolVector<uint8_t>::Write();
- Image img(w, h, 0, Image::FORMAT_RGBA8, graph_image);
+ Ref<Image> img;
+ img.instance();
+ img->create(w, h, 0, Image::FORMAT_RGBA8, graph_image);
if (reset_texture) {
if (graph_texture.is_null()) {
graph_texture.instance();
}
- graph_texture->create(img.get_width(), img.get_height(), img.get_format(), Texture::FLAG_VIDEO_SURFACE);
+ graph_texture->create(img->get_width(), img->get_height(), img->get_format(), Texture::FLAG_VIDEO_SURFACE);
}
graph_texture->set_data(img);
@@ -481,16 +483,20 @@ void EditorProfiler::_cursor_metric_changed(double) {
_update_frame();
}
-void EditorProfiler::_graph_tex_input(const InputEvent &p_ev) {
+void EditorProfiler::_graph_tex_input(const Ref<InputEvent> &p_ev) {
if (last_metric < 0)
return;
+ Ref<InputEventMouse> me = p_ev;
+ Ref<InputEventMouseButton> mb = p_ev;
+ Ref<InputEventMouseMotion> mm = p_ev;
+
if (
- (p_ev.type == InputEvent::MOUSE_BUTTON && p_ev.mouse_button.button_index == BUTTON_LEFT && p_ev.mouse_button.pressed) ||
- (p_ev.type == InputEvent::MOUSE_MOTION)) {
+ (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) ||
+ (mm.is_valid())) {
- int x = p_ev.mouse_button.x;
+ int x = me->get_pos().x;
x = x * frame_metrics.size() / graph->get_size().width;
bool show_hover = x >= 0 && x < frame_metrics.size();
@@ -517,7 +523,7 @@ void EditorProfiler::_graph_tex_input(const InputEvent &p_ev) {
hover_metric = -1;
}
- if (p_ev.type == InputEvent::MOUSE_BUTTON || p_ev.mouse_motion.button_mask & BUTTON_MASK_LEFT) {
+ if (mb.is_valid() || mb->get_button_mask() & BUTTON_MASK_LEFT) {
//cursor_metric=x;
updating_frame = true;
diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h
index 35b5ae366c..4998d45a89 100644
--- a/editor/editor_profiler.h
+++ b/editor/editor_profiler.h
@@ -143,7 +143,7 @@ private:
void _graph_tex_mouse_exit();
void _graph_tex_draw();
- void _graph_tex_input(const InputEvent &p_ev);
+ void _graph_tex_input(const Ref<InputEvent> &p_ev);
int _get_cursor_index() const;
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 5a519a1dbd..4a767621ef 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -43,11 +43,12 @@ void EditorRunNative::_notification(int p_what) {
continue;
Ref<ImageTexture> icon = eep->get_logo();
if (!icon.is_null()) {
- Image im = icon->get_data();
- im.clear_mipmaps();
- if (!im.empty()) {
+ Ref<Image> im = icon->get_data();
+ im = im->duplicate();
+ im->clear_mipmaps();
+ if (!im->empty()) {
- im.resize(16, 16);
+ im->resize(16, 16);
Ref<ImageTexture> small_icon;
small_icon.instance();
small_icon->create_from_image(im, 0);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 0a46acddb2..858c38c796 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -65,7 +65,7 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
for (int i = 0; i < arr.size(); i += 2) {
String name = arr[i];
- InputEvent shortcut = arr[i + 1];
+ Ref<InputEvent> shortcut = arr[i + 1];
Ref<ShortCut> sc;
sc.instance();
@@ -109,8 +109,8 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
continue; //this came from settings but is not any longer used
}
- InputEvent original = sc->get_meta("original");
- if (sc->is_shortcut(original) || (original.type == InputEvent::NONE && sc->get_shortcut().type == InputEvent::NONE))
+ Ref<InputEvent> original = sc->get_meta("original");
+ if (sc->is_shortcut(original) || (original.is_null() && sc->get_shortcut().is_null()))
continue; //not changed from default, don't save
}
@@ -503,8 +503,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["interface/source_font_size"] = PropertyInfo(Variant::INT, "interface/source_font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/custom_font", "");
hints["interface/custom_font"] = PropertyInfo(Variant::STRING, "interface/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.fnt", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("interface/custom_theme", "");
- hints["interface/custom_theme"] = PropertyInfo(Variant::STRING, "interface/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/dim_editor_on_dialog_popup", true);
set("interface/dim_amount", 0.6f);
hints["interface/dim_amount"] = PropertyInfo(Variant::REAL, "interface/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
@@ -513,6 +511,15 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("interface/separate_distraction_mode", false);
+ set("interface/theme/base_color", Color(0.3, 0.3, 0.3, 1));
+ hints["interface/theme/highlight_color"] = PropertyInfo(Variant::COLOR, "interface/theme/highlight_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/theme/highlight_color", Color(0.5, 0.5, 0.6, 1));
+ hints["interface/theme/base_color"] = PropertyInfo(Variant::COLOR, "interface/theme/base_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/theme/contrast", 0.2);
+ hints["interface/theme/contrast"] = PropertyInfo(Variant::REAL, "interface/theme/contrast", PROPERTY_HINT_RANGE, "0.01, 1, 0.01");
+ set("interface/theme/custom_theme", "");
+ hints["interface/theme/custom_theme"] = PropertyInfo(Variant::STRING, "interface/theme/custom_theme", PROPERTY_HINT_GLOBAL_FILE, "*.res,*.tres,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+
set("filesystem/directories/autoscan_project_path", "");
hints["filesystem/directories/autoscan_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/autoscan_project_path", PROPERTY_HINT_GLOBAL_DIR);
set("filesystem/directories/default_project_path", "");
@@ -572,7 +579,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("editors/grid_map/pick_distance", 5000.0);
- set("editors/3d/grid_color", Color(1, 1, 1, 0.2));
+ set("editors/3d/grid_color", Color(0, 1, 0, 0.2));
hints["editors/3d/grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("editors/3d/default_fov", 45.0);
@@ -979,7 +986,7 @@ void EditorSettings::add_shortcut(const String &p_name, Ref<ShortCut> &p_shortcu
shortcuts[p_name] = p_shortcut;
}
-bool EditorSettings::is_shortcut(const String &p_name, const InputEvent &p_event) const {
+bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const {
const Map<String, Ref<ShortCut> >::Element *E = shortcuts.find(p_name);
if (!E) {
@@ -1096,15 +1103,16 @@ Ref<ShortCut> ED_GET_SHORTCUT(const String &p_path) {
Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p_keycode) {
- InputEvent ie;
+ Ref<InputEventKey> ie;
if (p_keycode) {
- ie.type = InputEvent::KEY;
- ie.key.unicode = p_keycode & KEY_CODE_MASK;
- ie.key.scancode = p_keycode & KEY_CODE_MASK;
- ie.key.mod.shift = bool(p_keycode & KEY_MASK_SHIFT);
- ie.key.mod.alt = bool(p_keycode & KEY_MASK_ALT);
- ie.key.mod.control = bool(p_keycode & KEY_MASK_CTRL);
- ie.key.mod.meta = bool(p_keycode & KEY_MASK_META);
+ ie.instance();
+
+ ie->set_unicode(p_keycode & KEY_CODE_MASK);
+ ie->set_scancode(p_keycode & KEY_CODE_MASK);
+ ie->set_shift(bool(p_keycode & KEY_MASK_SHIFT));
+ ie->set_alt(bool(p_keycode & KEY_MASK_ALT));
+ ie->set_control(bool(p_keycode & KEY_MASK_CTRL));
+ ie->set_metakey(bool(p_keycode & KEY_MASK_META));
}
Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(p_path);
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index a876f23134..7b45e28350 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -160,7 +160,7 @@ public:
bool save_text_editor_theme_as(String p_file);
void add_shortcut(const String &p_name, Ref<ShortCut> &p_shortcut);
- bool is_shortcut(const String &p_name, const InputEvent &p_event) const;
+ bool is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const;
Ref<ShortCut> get_shortcut(const String &p_name) const;
void get_shortcut_list(List<String> *r_shortcuts);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 1457f6b421..9968b73044 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -35,99 +35,389 @@
#include "editor_scale.h"
#include "editor_settings.h"
+static Ref<StyleBoxTexture> make_stylebox(Ref<Texture> texture, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) {
+ Ref<StyleBoxTexture> style(memnew(StyleBoxTexture));
+ style->set_texture(texture);
+ style->set_margin_size(MARGIN_LEFT, p_left * EDSCALE);
+ style->set_margin_size(MARGIN_RIGHT, p_right * EDSCALE);
+ style->set_margin_size(MARGIN_BOTTOM, p_botton * EDSCALE);
+ style->set_margin_size(MARGIN_TOP, p_top * EDSCALE);
+ style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
+ style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
+ style->set_default_margin(MARGIN_BOTTOM, p_margin_botton * EDSCALE);
+ style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
+ style->set_draw_center(p_draw_center);
+ return style;
+}
+
+static Ref<StyleBoxEmpty> make_empty_stylebox(float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
+ Ref<StyleBoxEmpty> style(memnew(StyleBoxEmpty));
+ style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
+ style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
+ style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * EDSCALE);
+ style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
+ return style;
+}
+
+static Ref<StyleBoxFlat> make_flat_stylebox(Color color, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_bottom = -1) {
+ Ref<StyleBoxFlat> style(memnew(StyleBoxFlat));
+ style->set_bg_color(color);
+ style->set_default_margin(MARGIN_LEFT, p_margin_left * EDSCALE);
+ style->set_default_margin(MARGIN_RIGHT, p_margin_right * EDSCALE);
+ style->set_default_margin(MARGIN_BOTTOM, p_margin_bottom * EDSCALE);
+ style->set_default_margin(MARGIN_TOP, p_margin_top * EDSCALE);
+ return style;
+}
+
+static Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat> p_style, Color p_color) {
+ Ref<StyleBoxFlat> style = p_style->duplicate();
+ style->set_light_color(p_color);
+ style->set_dark_color(p_color);
+ return style;
+}
+
+static Ref<StyleBoxFlat> add_additional_border(Ref<StyleBoxFlat> p_style, int p_left, int p_top, int p_right, int p_bottom) {
+ Ref<StyleBoxFlat> style = p_style->duplicate();
+ style->_set_additional_border_size(MARGIN_LEFT, p_left * EDSCALE);
+ style->_set_additional_border_size(MARGIN_RIGHT, p_right * EDSCALE);
+ style->_set_additional_border_size(MARGIN_TOP, p_top * EDSCALE);
+ style->_set_additional_border_size(MARGIN_BOTTOM, p_bottom * EDSCALE);
+ return style;
+}
+
+#define HIGHLIGHT_COLOR_LIGHT highlight_color.linear_interpolate(Color(1, 1, 1, 1), 0.3)
+#define HIGHLIGHT_COLOR_DARK highlight_color.linear_interpolate(Color(0, 0, 0, 1), 0.5)
+
Ref<Theme> create_editor_theme() {
Ref<Theme> theme = Ref<Theme>(memnew(Theme));
editor_register_fonts(theme);
editor_register_icons(theme);
- Ref<StyleBoxTexture> focus_sbt = memnew(StyleBoxTexture);
- focus_sbt->set_texture(theme->get_icon("EditorFocus", "EditorIcons"));
- for (int i = 0; i < 4; i++) {
- focus_sbt->set_margin_size(Margin(i), 16 * EDSCALE);
- focus_sbt->set_default_margin(Margin(i), 16 * EDSCALE);
- }
+ // Define colors
+ Color highlight_color = EDITOR_DEF("interface/theme/highlight_color", Color::html("#b79047"));
+ Color base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#213d4c"));
+ float contrast = EDITOR_DEF("interface/theme/contrast", 0.25);
+
+ Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
+ Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5);
+ Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2);
+
+ Color light_color_1 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast);
+ Color light_color_2 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast * 1.5);
+
+ theme->set_color("highlight_color", "Editor", highlight_color);
+ theme->set_color("base_color", "Editor", base_color);
+ theme->set_color("dark_color_1", "Editor", dark_color_1);
+ theme->set_color("dark_color_2", "Editor", dark_color_2);
+ theme->set_color("dark_color_3", "Editor", dark_color_3);
+ theme->set_color("light_color_1", "Editor", light_color_1);
+ theme->set_color("light_color_2", "Editor", light_color_2);
+
+ // Checkbox icon
+ theme->set_icon("checked", "CheckBox", theme->get_icon("Checked", "EditorIcons"));
+ theme->set_icon("unchecked", "CheckBox", theme->get_icon("Unchecked", "EditorIcons"));
+ theme->set_icon("checked", "PopupMenu", theme->get_icon("Checked", "EditorIcons"));
+ theme->set_icon("unchecked", "PopupMenu", theme->get_icon("Unchecked", "EditorIcons"));
+
+ // Editor background
+ Ref<StyleBoxFlat> style_background = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
+ theme->set_stylebox("Background", "EditorStyles", style_background);
+
+ // Focus
+ Ref<StyleBoxFlat> focus_sbt = make_flat_stylebox(light_color_1, 4, 4, 4, 4);
focus_sbt->set_draw_center(false);
- theme->set_stylebox("EditorFocus", "EditorStyles", focus_sbt);
-
- Ref<StyleBoxFlat> style_panel(memnew(StyleBoxFlat));
- style_panel->set_bg_color(Color::html("#36424e"));
- style_panel->set_default_margin(MARGIN_LEFT, 1);
- style_panel->set_default_margin(MARGIN_RIGHT, 1);
- style_panel->set_default_margin(MARGIN_BOTTOM, 1);
- style_panel->set_default_margin(MARGIN_TOP, 4 * EDSCALE);
+ focus_sbt->set_border_size(1 * EDSCALE);
+ focus_sbt = change_border_color(focus_sbt, light_color_2);
+ theme->set_stylebox("Focus", "EditorStyles", focus_sbt);
+
+ // Menu
+ Ref<StyleBoxEmpty> style_menu = make_empty_stylebox(4, 4, 4, 4);
+ theme->set_stylebox("panel", "PanelContainer", style_menu);
+ theme->set_stylebox("MenuPanel", "EditorStyles", style_menu);
+
+ // Play button group
+ theme->set_stylebox("PlayButtonPanel", "EditorStyles", make_stylebox(theme->get_icon("PlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
+
+ Ref<StyleBoxFlat> style_menu_hover_border = make_flat_stylebox(highlight_color, 4, 4, 4, 4);
+ Ref<StyleBoxFlat> style_menu_hover_bg = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
+
+ style_menu_hover_border->set_draw_center(false);
+ style_menu_hover_border->_set_additional_border_size(MARGIN_BOTTOM, 1 * EDSCALE);
+ theme->set_stylebox("normal", "MenuButton", style_menu);
+ theme->set_stylebox("hover", "MenuButton", style_menu);
+ theme->set_stylebox("pressed", "MenuButton", style_menu);
+ theme->set_stylebox("focus", "MenuButton", style_menu);
+ theme->set_stylebox("disabled", "MenuButton", style_menu);
+
+ theme->set_stylebox("normal", "PopupMenu", style_menu);
+ theme->set_stylebox("hover", "PopupMenu", style_menu_hover_bg);
+ theme->set_stylebox("pressed", "PopupMenu", style_menu);
+ theme->set_stylebox("focus", "PopupMenu", style_menu);
+ theme->set_stylebox("disabled", "PopupMenu", style_menu);
+
+ theme->set_stylebox("normal", "ToolButton", style_menu);
+ theme->set_stylebox("hover", "ToolButton", style_menu);
+ theme->set_stylebox("pressed", "ToolButton", style_menu);
+ theme->set_stylebox("focus", "ToolButton", style_menu);
+ theme->set_stylebox("disabled", "ToolButton", style_menu);
+
+ theme->set_color("font_color_hover", "MenuButton", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_hover", "ToolButton", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_pressed", "ToolButton", highlight_color);
+
+ theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border);
+
+ // Content of each tab
+ Ref<StyleBoxFlat> style_panel = make_flat_stylebox(base_color, 1, 4, 1, 1);
theme->set_stylebox("panel", "TabContainer", style_panel);
- theme->set_stylebox("EditorPanel", "EditorStyles", style_panel);
-
- Ref<StyleBoxFlat> style_bg(memnew(StyleBoxFlat));
- style_bg->set_bg_color(Color::html("#2b353f"));
- style_bg->set_default_margin(MARGIN_LEFT, 0);
- style_bg->set_default_margin(MARGIN_RIGHT, 0);
- style_bg->set_default_margin(MARGIN_BOTTOM, 0);
- style_bg->set_default_margin(MARGIN_TOP, 0);
+ theme->set_stylebox("Content", "EditorStyles", style_panel);
+
+ // Button
+ Ref<StyleBoxFlat> style_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
+ style_button->set_draw_center(true);
+ style_button->set_border_size(2 * EDSCALE);
+ style_button->set_light_color(light_color_1);
+ style_button->set_dark_color(light_color_1);
+ style_button->set_border_blend(false);
+ theme->set_stylebox("normal", "Button", style_button);
+ theme->set_stylebox("hover", "Button", style_button);
+ theme->set_stylebox("pressed", "Button", style_button);
+ theme->set_stylebox("focus", "Button", style_button);
+ theme->set_stylebox("disabled", "Button", style_button);
+ theme->set_color("font_color_hover", "Button", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_pressed", "Button", highlight_color);
+ theme->set_color("icon_color_hover", "Button", HIGHLIGHT_COLOR_LIGHT);
+ // make icon color value bigger because icon image is not complete white
+ theme->set_color("icon_color_pressed", "Button", Color(highlight_color.r * 1.15, highlight_color.g * 1.15, highlight_color.b * 1.15, highlight_color.a));
+
+ // OptionButton
+ Ref<StyleBoxFlat> style_option_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
+ style_option_button->set_border_size(1 * EDSCALE);
+ style_option_button->set_light_color(light_color_1);
+ style_option_button->set_dark_color(light_color_1);
+ style_option_button->_set_additional_border_size(MARGIN_RIGHT, -16 * EDSCALE);
+ theme->set_stylebox("hover", "OptionButton", change_border_color(style_option_button, HIGHLIGHT_COLOR_LIGHT));
+ theme->set_stylebox("pressed", "OptionButton", change_border_color(style_option_button, highlight_color));
+ theme->set_stylebox("focus", "OptionButton", change_border_color(style_option_button, highlight_color));
+ theme->set_stylebox("disabled", "OptionButton", style_option_button);
+ theme->set_stylebox("normal", "OptionButton", style_option_button);
+ theme->set_icon("arrow", "OptionButton", theme->get_icon("OptionArrow", "EditorIcons"));
+
+ // PopupMenu
+ Ref<StyleBoxFlat> style_popup_menu = make_flat_stylebox(dark_color_1, 8, 8, 8, 8);
+ style_popup_menu->set_border_size(2 * EDSCALE);
+ style_popup_menu->set_light_color(light_color_1);
+ style_popup_menu->set_dark_color(light_color_1);
+ theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
+
+ // Tree & script background
+ Ref<StyleBoxFlat> style_bg = make_flat_stylebox(dark_color_1, 0, 0, 0, 0);
theme->set_stylebox("bg", "Tree", style_bg);
- theme->set_stylebox("bg", "ItemList", style_bg);
- theme->set_stylebox("EditorBG", "EditorStyles", style_bg);
+ theme->set_stylebox("ScriptPanel", "EditorStyles", style_bg);
- Ref<StyleBox> style_tree_btn = theme->get_stylebox("button_pressed", "Tree");
- style_tree_btn->set_default_margin(MARGIN_LEFT, 3 * EDSCALE);
- style_tree_btn->set_default_margin(MARGIN_RIGHT, 3 * EDSCALE);
+ // Tree
+ theme->set_icon("checked", "Tree", theme->get_icon("Checked", "EditorIcons"));
+ theme->set_icon("unchecked", "Tree", theme->get_icon("Unchecked", "EditorIcons"));
+ theme->set_icon("arrow", "Tree", theme->get_icon("TreeArrowDown", "EditorIcons"));
+ theme->set_icon("arrow_collapsed", "Tree", theme->get_icon("TreeArrowRight", "EditorIcons"));
+ theme->set_icon("select_arrow", "Tree", theme->get_icon("Dropdown", "EditorIcons"));
+ theme->set_stylebox("bg_focus", "Tree", focus_sbt);
+
+ Ref<StyleBox> style_tree_btn = make_flat_stylebox(light_color_1, 2, 4, 2, 4);
theme->set_stylebox("button_pressed", "Tree", style_tree_btn);
- Ref<StyleBoxFlat> style_tab(memnew(StyleBoxFlat));
- style_tab->set_default_margin(MARGIN_LEFT, 15 * EDSCALE);
- style_tab->set_default_margin(MARGIN_RIGHT, 15 * EDSCALE);
- style_tab->set_default_margin(MARGIN_BOTTOM, 5 * EDSCALE);
- style_tab->set_default_margin(MARGIN_TOP, 5 * EDSCALE);
+ Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
+ theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
+
+ Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(light_color_1, 4, 4, 4, 4);
+ theme->set_stylebox("selected", "Tree", style_tree_selected);
+
+ Ref<StyleBoxFlat> style_tree_cursor = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
+ style_tree_cursor->set_draw_center(false);
+ style_tree_cursor->set_border_size(1 * EDSCALE);
+ style_tree_cursor->set_light_color(light_color_1);
+ style_tree_cursor->set_dark_color(light_color_1);
+ Ref<StyleBoxFlat> style_tree_title = make_flat_stylebox(dark_color_3, 4, 4, 4, 4);
+ theme->set_stylebox("cursor", "Tree", style_tree_cursor);
+ theme->set_stylebox("cursor_unfocused", "Tree", style_tree_cursor);
+ theme->set_stylebox("title_button_normal", "Tree", style_tree_title);
+ theme->set_stylebox("title_button_hover", "Tree", style_tree_title);
+ theme->set_stylebox("title_button_pressed", "Tree", style_tree_title);
- Ref<StyleBoxFlat> style_tab_fg = style_tab->duplicate();
- style_tab_fg->set_bg_color(Color::html("#36424e"));
+ theme->set_color("prop_category", "Editor", dark_color_3);
+ theme->set_color("prop_section", "Editor", dark_color_1);
+ theme->set_color("prop_subsection", "Editor", dark_color_2);
+ theme->set_color("fg_selected", "Editor", Color::html("ffbd8e8e"));
+ theme->set_color("fg_error", "Editor", Color::html("ffbd8e8e"));
+ theme->set_color("drop_position_color", "Tree", highlight_color);
- Ref<StyleBoxFlat> style_tab_bg = style_tab->duplicate();
+ // ItemList
+ Ref<StyleBoxFlat> style_itemlist_cursor = make_flat_stylebox(highlight_color, 8, 8, 8, 8);
+ style_itemlist_cursor->set_draw_center(false);
+ style_itemlist_cursor->set_border_size(1 * EDSCALE);
+ style_itemlist_cursor->set_light_color(light_color_1);
+ style_itemlist_cursor->set_dark_color(light_color_1);
+ theme->set_stylebox("cursor", "ItemList", style_itemlist_cursor);
+ theme->set_stylebox("cursor_unfocused", "ItemList", style_itemlist_cursor);
+ theme->set_stylebox("selected_focus", "ItemList", style_tree_focus);
+ theme->set_stylebox("selected", "ItemList", style_tree_selected);
+ theme->set_stylebox("bg_focus", "ItemList", focus_sbt);
+ theme->set_stylebox("bg", "ItemList", style_bg);
+
+ Ref<StyleBoxFlat> style_tab_fg = make_flat_stylebox(base_color, 15, 5, 15, 5);
+ Ref<StyleBoxFlat> style_tab_bg = make_flat_stylebox(base_color, 15, 5, 15, 5);
style_tab_bg->set_draw_center(false);
+ // Tabs & TabContainer
theme->set_stylebox("tab_fg", "TabContainer", style_tab_fg);
theme->set_stylebox("tab_bg", "TabContainer", style_tab_bg);
theme->set_stylebox("tab_fg", "Tabs", style_tab_fg);
theme->set_stylebox("tab_bg", "Tabs", style_tab_bg);
+ theme->set_color("font_color_fg", "TabContainer", Color(1, 1, 1, 1));
+ theme->set_color("font_color_bg", "TabContainer", light_color_2);
+ theme->set_icon("menu", "TabContainer", theme->get_icon("TabMenu", "EditorIcons"));
+ theme->set_icon("menu_hl", "TabContainer", theme->get_icon("TabMenu", "EditorIcons"));
- Ref<StyleBoxFlat> style_panel_debugger(memnew(StyleBoxFlat));
- style_panel_debugger->set_bg_color(Color::html("#3e4c5a"));
- style_panel_debugger->set_default_margin(MARGIN_LEFT, 0);
- style_panel_debugger->set_default_margin(MARGIN_RIGHT, 0);
- style_panel_debugger->set_default_margin(MARGIN_BOTTOM, 0);
- style_panel_debugger->set_default_margin(MARGIN_TOP, 4 * EDSCALE);
- theme->set_stylebox("EditorPanelDebugger", "EditorStyles", style_panel_debugger);
-
- Ref<StyleBoxFlat> style_tab_fg_debugger = style_tab->duplicate();
- style_tab_fg_debugger->set_bg_color(Color::html("#3e4c5a"));
- style_tab_fg_debugger->set_default_margin(MARGIN_LEFT, 10 * EDSCALE);
- style_tab_fg_debugger->set_default_margin(MARGIN_RIGHT, 10 * EDSCALE);
- Ref<StyleBoxFlat> style_tab_bg_debugger = style_tab->duplicate();
+ // Debugger
+ Ref<StyleBoxFlat> style_panel_debugger = make_flat_stylebox(dark_color_2, 0, 4, 0, 0);
+ theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger);
+
+ Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
+ Ref<StyleBoxFlat> style_tab_bg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
style_tab_bg_debugger->set_draw_center(false);
- style_tab_bg_debugger->set_default_margin(MARGIN_LEFT, 10 * EDSCALE);
- style_tab_bg_debugger->set_default_margin(MARGIN_RIGHT, 10 * EDSCALE);
- theme->set_stylebox("EditorTabFGDebugger", "EditorStyles", style_tab_fg_debugger);
- theme->set_stylebox("EditorTabBGDebugger", "EditorStyles", style_tab_bg_debugger);
+ theme->set_stylebox("DebuggerTabFG", "EditorStyles", style_tab_fg_debugger);
+ theme->set_stylebox("DebuggerTabBG", "EditorStyles", style_tab_bg_debugger);
+
+ // LineEdit
+ Ref<StyleBoxFlat> style_lineedit = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
+ style_lineedit->set_border_size(1 * EDSCALE);
+ style_lineedit = change_border_color(style_lineedit, light_color_1);
+ Ref<StyleBoxFlat> style_lineedit_disabled = style_lineedit->duplicate();
+ style_lineedit_disabled->set_bg_color(light_color_1);
+ Ref<StyleBoxFlat> style_lineedit_focus = change_border_color(style_lineedit, highlight_color);
+ style_lineedit_focus->set_draw_center(false);
+ theme->set_stylebox("normal", "LineEdit", style_lineedit);
+ theme->set_stylebox("focus", "LineEdit", style_lineedit_focus);
+ theme->set_stylebox("read_only", "LineEdit", style_lineedit_disabled);
+ // TextEdit
Ref<StyleBoxFlat> style_textedit_normal(memnew(StyleBoxFlat));
- style_textedit_normal->set_bg_color(Color::html("#29343d"));
+ style_textedit_normal->set_bg_color(dark_color_2);
style_textedit_normal->set_default_margin(MARGIN_LEFT, 0);
style_textedit_normal->set_default_margin(MARGIN_RIGHT, 0);
style_textedit_normal->set_default_margin(MARGIN_BOTTOM, 0);
style_textedit_normal->set_default_margin(MARGIN_TOP, 0);
theme->set_stylebox("normal", "TextEdit", style_textedit_normal);
+ theme->set_stylebox("focus", "TextEdit", focus_sbt);
+ theme->set_constant("side_margin", "TabContainer", 0);
+
+ // H/VSplitContainer
+ theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("VsplitBg", "EditorIcons"), 1, 1, 1, 1));
+ theme->set_stylebox("bg", "HSplitContainer", make_stylebox(theme->get_icon("HsplitBg", "EditorIcons"), 1, 1, 1, 1));
+
+ theme->set_icon("grabber", "VSplitContainer", theme->get_icon("Vsplitter", "EditorIcons"));
+ theme->set_icon("grabber", "HSplitContainer", theme->get_icon("Hsplitter", "EditorIcons"));
theme->set_constant("separation", "HSplitContainer", 8 * EDSCALE);
theme->set_constant("separation", "VSplitContainer", 8 * EDSCALE);
- theme->set_constant("side_margin", "TabContainer", 0);
- // theme->set_color("prop_category","Editor",Color::hex(0x3f3a44ff));
- // theme->set_color("prop_section","Editor",Color::hex(0x35313aff));
- // theme->set_color("prop_subsection","Editor",Color::hex(0x312e37ff));
- // theme->set_color("fg_selected","Editor",Color::html("ffbd8e8e"));
- // theme->set_color("fg_error","Editor",Color::html("ffbd8e8e"));
+ // WindowDialog
+ Ref<StyleBoxFlat> style_window = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
+ style_window->set_border_size(2 * EDSCALE);
+ style_window->set_border_blend(false);
+ style_window->set_light_color(light_color_2);
+ style_window->set_dark_color(light_color_2);
+ style_window->_set_additional_border_size(MARGIN_TOP, 24 * EDSCALE);
+ theme->set_stylebox("panel", "WindowDialog", style_window);
+
+ // HScrollBar
+ Ref<Texture> empty_icon = memnew(ImageTexture);
+
+ theme->set_stylebox("scroll", "HScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
+ theme->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
+ theme->set_stylebox("grabber", "HScrollBar", make_stylebox(theme->get_icon("ScrollGrabber", "EditorIcons"), 6, 6, 6, 6, 2, 2, 2, 2));
+ theme->set_stylebox("grabber_highlight", "HScrollBar", make_stylebox(theme->get_icon("ScrollGrabberHl", "EditorIcons"), 5, 5, 5, 5, 2, 2, 2, 2));
+
+ theme->set_icon("increment", "HScrollBar", empty_icon);
+ theme->set_icon("increment_highlight", "HScrollBar", empty_icon);
+ theme->set_icon("decrement", "HScrollBar", empty_icon);
+ theme->set_icon("decrement_highlight", "HScrollBar", empty_icon);
+
+ // VScrollBar
+ theme->set_stylebox("scroll", "VScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
+ theme->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(theme->get_icon("ScrollBg", "EditorIcons"), 5, 5, 5, 5, 0, 0, 0, 0));
+ theme->set_stylebox("grabber", "VScrollBar", make_stylebox(theme->get_icon("ScrollGrabber", "EditorIcons"), 6, 6, 6, 6, 2, 2, 2, 2));
+ theme->set_stylebox("grabber_highlight", "VScrollBar", make_stylebox(theme->get_icon("ScrollGrabberHl", "EditorIcons"), 5, 5, 5, 5, 2, 2, 2, 2));
+
+ theme->set_icon("increment", "VScrollBar", empty_icon);
+ theme->set_icon("increment_highlight", "VScrollBar", empty_icon);
+ theme->set_icon("decrement", "VScrollBar", empty_icon);
+ theme->set_icon("decrement_highlight", "VScrollBar", empty_icon);
+
+ // HSlider
+ theme->set_stylebox("slider", "HSlider", make_stylebox(theme->get_icon("HsliderBg", "EditorIcons"), 4, 4, 4, 4));
+ theme->set_icon("grabber", "HSlider", theme->get_icon("SliderGrabber", "EditorIcons"));
+ theme->set_icon("grabber_highlight", "HSlider", theme->get_icon("SliderGrabberHl", "EditorIcons"));
+
+ // VSlider
+ theme->set_stylebox("slider", "VSlider", make_stylebox(theme->get_icon("VsliderBg", "EditorIcons"), 4, 4, 4, 4));
+ theme->set_icon("grabber", "VSlider", theme->get_icon("SliderGrabber", "EditorIcons"));
+ theme->set_icon("grabber_highlight", "VSlider", theme->get_icon("SliderGrabberHl", "EditorIcons"));
+
+ // TooltipPanel
+ Ref<StyleBoxFlat> style_tooltip = make_flat_stylebox(Color(1, 1, 1, 0.8), 8, 8, 8, 8);
+ style_tooltip->set_border_size(2 * EDSCALE);
+ style_tooltip->set_border_blend(false);
+ style_tooltip->set_light_color(Color(1, 1, 1, 0.9));
+ style_tooltip->set_dark_color(Color(1, 1, 1, 0.9));
+ theme->set_stylebox("panel", "TooltipPanel", style_tooltip);
+
+ // PopupPanel
+ Ref<StyleBoxFlat> style_dock_select = make_flat_stylebox(base_color);
+ style_dock_select->set_light_color(light_color_1);
+ style_dock_select->set_dark_color(light_color_1);
+ style_dock_select = add_additional_border(style_dock_select, 2, 2, 2, 2);
+ theme->set_stylebox("panel", "PopupPanel", style_dock_select);
+
+ // SpinBox
+ theme->set_icon("updown", "SpinBox", theme->get_icon("SpinboxUpdown", "EditorIcons"));
+
+ // GraphNode
+ Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
+ graphsb->set_border_blend(false);
+ graphsb->set_border_size(2);
+ graphsb->set_light_color(Color(1, 1, 1, 0.6));
+ graphsb->set_dark_color(Color(1, 1, 1, 0.6));
+ graphsb = add_additional_border(graphsb, 0, -22, 0, 0);
+ Ref<StyleBoxFlat> graphsbselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
+ graphsbselected->set_border_blend(false);
+ graphsbselected->set_border_size(2);
+ graphsbselected->set_light_color(Color(1, 1, 1, 0.9));
+ graphsbselected->set_dark_color(Color(1, 1, 1, 0.9));
+ graphsbselected = add_additional_border(graphsbselected, 0, -22, 0, 0);
+ Ref<StyleBoxFlat> graphsbcomment = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
+ graphsbcomment->set_border_blend(false);
+ graphsbcomment->set_border_size(1);
+ graphsbcomment->set_light_color(Color(1, 1, 1, 0.6));
+ graphsbcomment->set_dark_color(Color(1, 1, 1, 0.6));
+ graphsbcomment = add_additional_border(graphsbcomment, 0, -22, 0, 0);
+ Ref<StyleBoxFlat> graphsbcommentselected = make_flat_stylebox(Color(0, 0, 0, 0.4), 16, 24, 16, 5);
+ graphsbcommentselected->set_border_blend(false);
+ graphsbcommentselected->set_border_size(1);
+ graphsbcommentselected->set_light_color(Color(1, 1, 1, 0.9));
+ graphsbcommentselected->set_dark_color(Color(1, 1, 1, 0.9));
+ graphsbcommentselected = add_additional_border(graphsbcommentselected, 0, -22, 0, 0);
+ theme->set_stylebox("frame", "GraphNode", graphsb);
+ theme->set_stylebox("selectedframe", "GraphNode", graphsbselected);
+ theme->set_stylebox("comment", "GraphNode", graphsbcomment);
+ theme->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected);
+
+ // FileDialog
+ Color disable_color = light_color_2;
+ disable_color.a = 0.7;
+ theme->set_color("files_disabled", "FileDialog", disable_color);
return theme;
}
@@ -135,7 +425,7 @@ Ref<Theme> create_editor_theme() {
Ref<Theme> create_custom_theme() {
Ref<Theme> theme;
- String custom_theme = EditorSettings::get_singleton()->get("interface/custom_theme");
+ String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme");
if (custom_theme != "") {
theme = ResourceLoader::load(custom_theme);
}
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index c324f474bb..62fb241ade 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -150,11 +150,10 @@ void FileSystemDock::_notification(int p_what) {
}
button_display_mode->connect("pressed", this, "_change_file_display");
//file_options->set_icon( get_icon("Tools","EditorIcons"));
-
files->connect("item_activated", this, "_select_file");
button_hist_next->connect("pressed", this, "_fw_history");
button_hist_prev->connect("pressed", this, "_bw_history");
- search_icon->set_texture(get_icon("Search", "EditorIcons"));
+ search_icon->set_texture(get_icon("Zoom", "EditorIcons"));
button_hist_next->set_icon(get_icon("Forward", "EditorIcons"));
button_hist_prev->set_icon(get_icon("Back", "EditorIcons"));
@@ -416,8 +415,9 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
if (!has_icon("ResizedFolder", "EditorIcons")) {
Ref<ImageTexture> folder = get_icon("FolderBig", "EditorIcons");
- Image img = folder->get_data();
- img.resize(thumbnail_size, thumbnail_size);
+ Ref<Image> img = folder->get_data();
+ img = img->duplicate();
+ img->resize(thumbnail_size, thumbnail_size);
Ref<ImageTexture> resized_folder = Ref<ImageTexture>(memnew(ImageTexture));
resized_folder->create_from_image(img, 0);
Theme::get_default()->set_icon("ResizedFolder", "EditorIcons", resized_folder);
@@ -427,8 +427,8 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
if (!has_icon("ResizedFile", "EditorIcons")) {
Ref<ImageTexture> file = get_icon("FileBig", "EditorIcons");
- Image img = file->get_data();
- img.resize(thumbnail_size, thumbnail_size);
+ Ref<Image> img = file->get_data();
+ img->resize(thumbnail_size, thumbnail_size);
Ref<ImageTexture> resized_file = Ref<ImageTexture>(memnew(ImageTexture));
resized_file->create_from_image(img, 0);
Theme::get_default()->set_icon("ResizedFile", "EditorIcons", resized_file);
@@ -1668,6 +1668,8 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
button_reload->set_tooltip(TTR("Re-Scan Filesystem"));
button_reload->hide();
+ //toolbar_hbc->add_spacer();
+
button_favorite = memnew(Button);
button_favorite->set_flat(true);
button_favorite->set_toggle_mode(true);
@@ -1722,7 +1724,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree->connect("item_rmb_selected", this, "_dir_rmb_pressed");
files = memnew(ItemList);
- files->add_style_override("bg", editor->get_gui_base()->get_stylebox("EditorBG", "EditorStyles"));
files->set_v_size_flags(SIZE_EXPAND_FILL);
files->set_select_mode(ItemList::SELECT_MULTI);
files->set_drag_forwarding(this);
diff --git a/editor/icons/2x/icon_checked.png b/editor/icons/2x/icon_checked.png
new file mode 100644
index 0000000000..6083540ffe
--- /dev/null
+++ b/editor/icons/2x/icon_checked.png
Binary files differ
diff --git a/editor/icons/2x/icon_dropdown.png b/editor/icons/2x/icon_dropdown.png
new file mode 100644
index 0000000000..626dba79ec
--- /dev/null
+++ b/editor/icons/2x/icon_dropdown.png
Binary files differ
diff --git a/editor/icons/2x/icon_godot.png b/editor/icons/2x/icon_godot.png
deleted file mode 100644
index 94d87e23cc..0000000000
--- a/editor/icons/2x/icon_godot.png
+++ /dev/null
Binary files differ
diff --git a/editor/icons/2x/icon_godot_docs.png b/editor/icons/2x/icon_godot_docs.png
new file mode 100644
index 0000000000..be30f092ef
--- /dev/null
+++ b/editor/icons/2x/icon_godot_docs.png
Binary files differ
diff --git a/editor/icons/2x/icon_hslider_bg.png b/editor/icons/2x/icon_hslider_bg.png
new file mode 100644
index 0000000000..e3c61f25e0
--- /dev/null
+++ b/editor/icons/2x/icon_hslider_bg.png
Binary files differ
diff --git a/editor/icons/2x/icon_option_arrow.png b/editor/icons/2x/icon_option_arrow.png
new file mode 100644
index 0000000000..ed177a4451
--- /dev/null
+++ b/editor/icons/2x/icon_option_arrow.png
Binary files differ
diff --git a/editor/icons/2x/icon_play_button_group.png b/editor/icons/2x/icon_play_button_group.png
new file mode 100644
index 0000000000..e28cb52e64
--- /dev/null
+++ b/editor/icons/2x/icon_play_button_group.png
Binary files differ
diff --git a/editor/icons/2x/icon_slider_grabber.png b/editor/icons/2x/icon_slider_grabber.png
new file mode 100644
index 0000000000..64cf83270a
--- /dev/null
+++ b/editor/icons/2x/icon_slider_grabber.png
Binary files differ
diff --git a/editor/icons/2x/icon_slider_grabber_hl.png b/editor/icons/2x/icon_slider_grabber_hl.png
new file mode 100644
index 0000000000..d68da0d12a
--- /dev/null
+++ b/editor/icons/2x/icon_slider_grabber_hl.png
Binary files differ
diff --git a/editor/icons/2x/icon_spinbox_updown.png b/editor/icons/2x/icon_spinbox_updown.png
new file mode 100644
index 0000000000..e711fbf08b
--- /dev/null
+++ b/editor/icons/2x/icon_spinbox_updown.png
Binary files differ
diff --git a/editor/icons/2x/icon_tab_menu.png b/editor/icons/2x/icon_tab_menu.png
new file mode 100644
index 0000000000..becad9db76
--- /dev/null
+++ b/editor/icons/2x/icon_tab_menu.png
Binary files differ
diff --git a/editor/icons/2x/icon_texture.png b/editor/icons/2x/icon_texture.png
new file mode 100644
index 0000000000..ad5d04dfee
--- /dev/null
+++ b/editor/icons/2x/icon_texture.png
Binary files differ
diff --git a/editor/icons/2x/icon_tree_arrow_down.png b/editor/icons/2x/icon_tree_arrow_down.png
new file mode 100644
index 0000000000..00012dea39
--- /dev/null
+++ b/editor/icons/2x/icon_tree_arrow_down.png
Binary files differ
diff --git a/editor/icons/2x/icon_tree_arrow_right.png b/editor/icons/2x/icon_tree_arrow_right.png
new file mode 100644
index 0000000000..baaf016784
--- /dev/null
+++ b/editor/icons/2x/icon_tree_arrow_right.png
Binary files differ
diff --git a/editor/icons/2x/icon_unchecked.png b/editor/icons/2x/icon_unchecked.png
new file mode 100644
index 0000000000..cd8b781000
--- /dev/null
+++ b/editor/icons/2x/icon_unchecked.png
Binary files differ
diff --git a/editor/icons/2x/icon_vslider_bg.png b/editor/icons/2x/icon_vslider_bg.png
new file mode 100644
index 0000000000..a7e0e78564
--- /dev/null
+++ b/editor/icons/2x/icon_vslider_bg.png
Binary files differ
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index 3fc8e5461f..20a381cc78 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -62,9 +62,9 @@ def make_editor_icons_action(target, source, env):
s.write("static Ref<ImageTexture> make_icon(const uint8_t* p_png,const uint8_t* p_hidpi_png) {\n")
s.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
s.write("\tbool use_hidpi_image=(editor_get_scale()>1.0&&p_hidpi_png);\n")
- s.write("\tImage img(use_hidpi_image?p_hidpi_png:p_png);\n")
- s.write("\tif (editor_get_scale()>1.0 && !p_hidpi_png) { img.convert(Image::FORMAT_RGBA8); img.expand_x2_hq2x(); use_hidpi_image=true;}\n")
- s.write("\timg.resize(img.get_width()*EDSCALE/(use_hidpi_image?2:1),img.get_height()*EDSCALE/(use_hidpi_image?2:1));\n")
+ s.write("\tRef<Image> img = memnew(Image(use_hidpi_image?p_hidpi_png:p_png));\n")
+ s.write("\tif (editor_get_scale()>1.0 && !p_hidpi_png) { img->convert(Image::FORMAT_RGBA8); img->expand_x2_hq2x(); use_hidpi_image=true;}\n")
+ s.write("\timg->resize(img->get_width()*EDSCALE/(use_hidpi_image?2:1),img->get_height()*EDSCALE/(use_hidpi_image?2:1));\n")
s.write("\ttexture->create_from_image( img,ImageTexture::FLAG_FILTER );\n")
s.write("\treturn texture;\n")
s.write("}\n\n")
diff --git a/editor/icons/icon_checked.png b/editor/icons/icon_checked.png
new file mode 100644
index 0000000000..d3442930bb
--- /dev/null
+++ b/editor/icons/icon_checked.png
Binary files differ
diff --git a/editor/icons/icon_default_project_icon.png b/editor/icons/icon_default_project_icon.png
index e87a49bd28..4c31fe5cb2 100644
--- a/editor/icons/icon_default_project_icon.png
+++ b/editor/icons/icon_default_project_icon.png
Binary files differ
diff --git a/editor/icons/icon_dropdown.png b/editor/icons/icon_dropdown.png
new file mode 100644
index 0000000000..b9a324be7c
--- /dev/null
+++ b/editor/icons/icon_dropdown.png
Binary files differ
diff --git a/editor/icons/icon_godot.png b/editor/icons/icon_godot.png
deleted file mode 100644
index 0b72e6ecc7..0000000000
--- a/editor/icons/icon_godot.png
+++ /dev/null
Binary files differ
diff --git a/editor/icons/icon_godot_docs.png b/editor/icons/icon_godot_docs.png
new file mode 100644
index 0000000000..554280c5b4
--- /dev/null
+++ b/editor/icons/icon_godot_docs.png
Binary files differ
diff --git a/editor/icons/icon_hslider_bg.png b/editor/icons/icon_hslider_bg.png
new file mode 100644
index 0000000000..e3c61f25e0
--- /dev/null
+++ b/editor/icons/icon_hslider_bg.png
Binary files differ
diff --git a/editor/icons/icon_hsplit_bg.png b/editor/icons/icon_hsplit_bg.png
new file mode 100644
index 0000000000..cfb76f7dc7
--- /dev/null
+++ b/editor/icons/icon_hsplit_bg.png
Binary files differ
diff --git a/editor/icons/icon_hsplitter.png b/editor/icons/icon_hsplitter.png
new file mode 100644
index 0000000000..3ac1dddf90
--- /dev/null
+++ b/editor/icons/icon_hsplitter.png
Binary files differ
diff --git a/editor/icons/icon_logo.png b/editor/icons/icon_logo.png
index 9bbd7dc619..aed94cb87a 100644
--- a/editor/icons/icon_logo.png
+++ b/editor/icons/icon_logo.png
Binary files differ
diff --git a/editor/icons/icon_logo_small.png b/editor/icons/icon_logo_small.png
index 9c7c7fe365..809cf18541 100644
--- a/editor/icons/icon_logo_small.png
+++ b/editor/icons/icon_logo_small.png
Binary files differ
diff --git a/editor/icons/icon_option_arrow.png b/editor/icons/icon_option_arrow.png
new file mode 100644
index 0000000000..b7bc38e03f
--- /dev/null
+++ b/editor/icons/icon_option_arrow.png
Binary files differ
diff --git a/scene/resources/default_theme/button_group.png b/editor/icons/icon_play_button_group.png
index 83820c8e0c..83820c8e0c 100644
--- a/scene/resources/default_theme/button_group.png
+++ b/editor/icons/icon_play_button_group.png
Binary files differ
diff --git a/editor/icons/icon_scroll_bg.png b/editor/icons/icon_scroll_bg.png
new file mode 100644
index 0000000000..1908fd8aee
--- /dev/null
+++ b/editor/icons/icon_scroll_bg.png
Binary files differ
diff --git a/editor/icons/icon_scroll_grabber.png b/editor/icons/icon_scroll_grabber.png
new file mode 100644
index 0000000000..4be7f4e6cc
--- /dev/null
+++ b/editor/icons/icon_scroll_grabber.png
Binary files differ
diff --git a/editor/icons/icon_scroll_grabber_hl.png b/editor/icons/icon_scroll_grabber_hl.png
new file mode 100644
index 0000000000..a81239b84b
--- /dev/null
+++ b/editor/icons/icon_scroll_grabber_hl.png
Binary files differ
diff --git a/editor/icons/icon_slider_grabber.png b/editor/icons/icon_slider_grabber.png
new file mode 100644
index 0000000000..6b6982e26c
--- /dev/null
+++ b/editor/icons/icon_slider_grabber.png
Binary files differ
diff --git a/editor/icons/icon_slider_grabber_hl.png b/editor/icons/icon_slider_grabber_hl.png
new file mode 100644
index 0000000000..03d4b2bb99
--- /dev/null
+++ b/editor/icons/icon_slider_grabber_hl.png
Binary files differ
diff --git a/editor/icons/icon_spinbox_updown.png b/editor/icons/icon_spinbox_updown.png
new file mode 100644
index 0000000000..ff65df801b
--- /dev/null
+++ b/editor/icons/icon_spinbox_updown.png
Binary files differ
diff --git a/editor/icons/icon_tab_menu.png b/editor/icons/icon_tab_menu.png
index 29edd02f01..ffc63f2d41 100644
--- a/editor/icons/icon_tab_menu.png
+++ b/editor/icons/icon_tab_menu.png
Binary files differ
diff --git a/editor/icons/icon_texture.png b/editor/icons/icon_texture.png
new file mode 100644
index 0000000000..7c4493395e
--- /dev/null
+++ b/editor/icons/icon_texture.png
Binary files differ
diff --git a/editor/icons/icon_tree_arrow_down.png b/editor/icons/icon_tree_arrow_down.png
new file mode 100644
index 0000000000..4ef7b41de6
--- /dev/null
+++ b/editor/icons/icon_tree_arrow_down.png
Binary files differ
diff --git a/editor/icons/icon_tree_arrow_right.png b/editor/icons/icon_tree_arrow_right.png
new file mode 100644
index 0000000000..13a42f730d
--- /dev/null
+++ b/editor/icons/icon_tree_arrow_right.png
Binary files differ
diff --git a/editor/icons/icon_unchecked.png b/editor/icons/icon_unchecked.png
new file mode 100644
index 0000000000..9d7d55aa46
--- /dev/null
+++ b/editor/icons/icon_unchecked.png
Binary files differ
diff --git a/editor/icons/icon_vslider_bg.png b/editor/icons/icon_vslider_bg.png
new file mode 100644
index 0000000000..a7e0e78564
--- /dev/null
+++ b/editor/icons/icon_vslider_bg.png
Binary files differ
diff --git a/editor/icons/icon_vsplit_bg.png b/editor/icons/icon_vsplit_bg.png
new file mode 100644
index 0000000000..0c29b1e35c
--- /dev/null
+++ b/editor/icons/icon_vsplit_bg.png
Binary files differ
diff --git a/editor/icons/icon_vsplitter.png b/editor/icons/icon_vsplitter.png
new file mode 100644
index 0000000000..56fb20bc3f
--- /dev/null
+++ b/editor/icons/icon_vsplitter.png
Binary files differ
diff --git a/editor/icons/source/icon_3_d.svg b/editor/icons/source/icon_3_d.svg
deleted file mode 100644
index 3147d14dc1..0000000000
--- a/editor/icons/source/icon_3_d.svg
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 16"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
- inkscape:export-xdpi="45"
- inkscape:export-ydpi="45"
- sodipodi:docname="icon_3_d.svg">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32.000001"
- inkscape:cx="7.1007207"
- inkscape:cy="6.155123"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:snap-bbox-midpoints="false"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-midpoints="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid3336" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3622)">
- <path
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2.0050708,1040.3622 2,-2 2,2"
- id="path4485"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc" />
- <path
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 4.0050708,1039.3622 v 9 h 9.0000002"
- id="path4487"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc" />
- <path
- sodipodi:nodetypes="ccc"
- inkscape:connector-curvature="0"
- id="path4489"
- d="m 12.005071,1046.3622 2,2 -2,2"
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <path
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 4.0050708,1048.3622 8.0000002,-8"
- id="path4496"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cc" />
- <path
- sodipodi:nodetypes="ccc"
- inkscape:connector-curvature="0"
- id="path4498"
- d="m 10.176644,1039.3622 h 2.828427 v 2.8284"
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/checked.svg b/editor/icons/source/icon_checked.svg
index 6d2c03f4c5..6d2c03f4c5 100644
--- a/scene/resources/default_theme/source/checked.svg
+++ b/editor/icons/source/icon_checked.svg
diff --git a/scene/resources/default_theme/source/dropdown.svg b/editor/icons/source/icon_dropdown.svg
index 5963e74007..5963e74007 100644
--- a/scene/resources/default_theme/source/dropdown.svg
+++ b/editor/icons/source/icon_dropdown.svg
diff --git a/editor/icons/source/icon_godot.svg b/editor/icons/source/icon_godot.svg
deleted file mode 100644
index 419f23125b..0000000000
--- a/editor/icons/source/icon_godot.svg
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 16"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape_2d.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90"
- sodipodi:docname="icon_godot.svg">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="9.8470361"
- inkscape:cy="9.8599985"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- units="px"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:snap-bbox-midpoints="true"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-center="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid3336" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3622)">
- <g
- transform="matrix(0.01724138,0,0,0.01724138,-0.82758647,1035.0456)"
- id="layer1-5"
- inkscape:label="Layer 1">
- <g
- transform="matrix(1.0688992,0,0,1.1334985,-45.061194,-81.689066)"
- id="g4149">
- <path
- style="fill:#ffffff;fill-opacity:1;stroke:none"
- d="m 116.99388,715.36604 43.13957,-74.51381 75.99672,-171.42666 271.088,-13.63746 282.06373,14.1696 138.45065,255.56931 -25.0756,66.96734 -376.12685,53.39482 -367.70391,-40.32222 z"
- id="path3239"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccccccc" />
- <g
- id="g3412"
- transform="matrix(12.995388,0,0,-12.995388,898.37246,704.73082)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 0,-3.942 c 0,-0.39 -0.25,-0.734 -0.621,-0.852 L -6.835,-6.8 c -0.273,-0.091 -0.57,-0.042 -0.8,0.128 -0.232,0.168 -0.37,0.437 -0.37,0.721 l 0,4.305 -5.818,-1.108 0,-4.381 c 0,-0.447 -0.332,-0.824 -0.775,-0.885 l -8.41,-1.152 c -0.039,-0.003 -0.081,-0.008 -0.121,-0.008 -0.214,0 -0.424,0.078 -0.588,0.22 -0.195,0.172 -0.306,0.416 -0.306,0.676 l 0,4.638 -4.341,-0.018 0,-10e-4 -0.318,10e-4 -0.319,-10e-4 0,10e-4 -4.34,0.018 0,-4.638 c 0,-0.26 -0.112,-0.504 -0.307,-0.676 -0.164,-0.142 -0.374,-0.22 -0.587,-0.22 -0.041,0 -0.082,0.005 -0.123,0.008 l -8.41,1.152 c -0.442,0.061 -0.774,0.438 -0.774,0.885 l 0,4.381 -5.819,1.108 0,-4.305 c 0,-0.284 -0.137,-0.553 -0.368,-0.721 -0.232,-0.17 -0.529,-0.219 -0.802,-0.128 l -6.215,2.006 c -0.369,0.118 -0.619,0.462 -0.619,0.852 l 0,3.942 -3.837,1.29 c -0.19,-0.811 -0.295,-1.642 -0.295,-2.481 0,-10.301 14.512,-18.252 32.448,-18.309 l 0.022,0 0.023,0 c 17.936,0.057 32.448,8.008 32.448,18.309 0,0.766 -0.088,1.521 -0.247,2.266 L 0,0 Z"
- style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3414" />
- </g>
- <g
- id="g3416"
- transform="matrix(12.995388,0,0,-12.995388,140.10982,467.34929)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 0,-16.047 2.163,-0.729 c 0.364,-0.122 0.61,-0.462 0.61,-0.847 l 0,-3.936 4.426,-1.428 0,4.154 c 0,0.27 0.118,0.52 0.323,0.689 0.206,0.172 0.474,0.241 0.739,0.192 l 7.608,-1.452 c 0.422,-0.079 0.728,-0.448 0.728,-0.877 l 0,-4.338 6.62,-0.904 0,4.509 c 0,0.241 0.096,0.467 0.264,0.635 0.167,0.166 0.394,0.259 0.633,0.259 l 0.002,0 5.551,-0.022 5.549,0.022 c 0.245,-10e-4 0.468,-0.093 0.635,-0.259 0.169,-0.168 0.264,-0.394 0.264,-0.635 l 0,-4.509 6.621,0.904 0,4.338 c 0,0.429 0.304,0.798 0.726,0.877 l 7.609,1.452 c 0.262,0.049 0.533,-0.02 0.738,-0.192 0.205,-0.169 0.325,-0.419 0.325,-0.689 l 0,-4.154 4.425,1.428 0,3.936 c 0,0.385 0.245,0.725 0.609,0.847 l 1.475,0.497 0,16.279 0.04,0 c 1.437,1.834 2.767,3.767 4.042,5.828 -1.694,2.883 -3.768,5.459 -5.986,7.846 -2.057,-1.035 -4.055,-2.208 -5.942,-3.456 -0.944,0.938 -2.008,1.706 -3.052,2.509 -1.027,0.824 -2.183,1.428 -3.281,2.132 0.327,2.433 0.489,4.828 0.554,7.327 -2.831,1.424 -5.85,2.369 -8.903,3.047 -1.219,-2.048 -2.334,-4.267 -3.304,-6.436 -1.152,0.192 -2.309,0.264 -3.467,0.277 l 0,0.002 c -0.008,0 -0.015,-0.002 -0.022,-0.002 -0.008,0 -0.015,0.002 -0.022,0.002 l 0,-0.002 c -1.16,-0.013 -2.316,-0.085 -3.468,-0.277 -0.97,2.169 -2.084,4.388 -3.305,6.436 C 19.475,24.555 16.456,23.61 13.626,22.186 13.69,19.687 13.852,17.292 14.18,14.859 13.081,14.155 11.925,13.551 10.898,12.727 9.855,11.924 8.79,11.156 7.846,10.218 5.958,11.466 3.961,12.639 1.904,13.674 -0.314,11.287 -2.388,8.711 -4.082,5.828 -2.807,3.767 -1.477,1.834 -0.04,0 L 0,0 Z"
- style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3418" />
- </g>
- <g
- id="g3420"
- transform="matrix(12.995388,0,0,-12.995388,411.4457,567.42812)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 c 0,-3.611 -2.926,-6.537 -6.537,-6.537 -3.608,0 -6.535,2.926 -6.535,6.537 0,3.609 2.927,6.533 6.535,6.533 C -2.926,6.533 0,3.609 0,0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3422" />
- </g>
- <g
- id="g3424"
- transform="matrix(12.995388,0,0,-12.995388,391.00655,572.46636)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 c 0,-2.396 -1.941,-4.337 -4.339,-4.337 -2.396,0 -4.339,1.941 -4.339,4.337 0,2.396 1.943,4.339 4.339,4.339 C -1.941,4.339 0,2.396 0,0"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3426" />
- </g>
- <g
- id="g3428"
- transform="matrix(12.995388,0,0,-12.995388,526.30933,660.10985)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 c -1.162,0 -2.104,0.856 -2.104,1.912 l 0,6.018 c 0,1.054 0.942,1.912 2.104,1.912 1.162,0 2.106,-0.858 2.106,-1.912 l 0,-6.018 C 2.106,0.856 1.162,0 0,0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3430" />
- </g>
- <g
- id="g3432"
- transform="matrix(12.995388,0,0,-12.995388,641.18731,567.42812)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 c 0,-3.611 2.926,-6.537 6.537,-6.537 3.609,0 6.535,2.926 6.535,6.537 0,3.609 -2.926,6.533 -6.535,6.533 C 2.926,6.533 0,3.609 0,0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3434" />
- </g>
- <g
- id="g3436"
- transform="matrix(12.995388,0,0,-12.995388,661.63165,572.46636)">
- <path
- inkscape:connector-curvature="0"
- d="m 0,0 c 0,-2.396 1.941,-4.337 4.336,-4.337 2.398,0 4.339,1.941 4.339,4.337 0,2.396 -1.941,4.339 -4.339,4.339 C 1.941,4.339 0,2.396 0,0"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3438" />
- </g>
- </g>
- </g>
- <path
- style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.44162436"
- d="m 4,1041.3622 a 3,3 0 0 0 -3,3 3,3 0 0 0 3,3 3,3 0 0 0 3,-3 3,3 0 0 0 -3,-3 z m 0,1 a 2.0000174,2.0000174 0 0 1 2,2 2.0000174,2.0000174 0 0 1 -2,2 2.0000174,2.0000174 0 0 1 -2,-2 2.0000174,2.0000174 0 0 1 2,-2 z"
- id="path4151"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- id="path4156"
- d="m 12,1041.3622 a 3,3 0 0 0 -3,3 3,3 0 0 0 3,3 3,3 0 0 0 3,-3 3,3 0 0 0 -3,-3 z m 0,1 a 2.0000174,2.0000174 0 0 1 2,2 2.0000174,2.0000174 0 0 1 -2,2 2.0000174,2.0000174 0 0 1 -2,-2 2.0000174,2.0000174 0 0 1 2,-2 z"
- style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.44162436" />
- <rect
- style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.44162436"
- id="rect4160"
- width="4"
- height="1"
- x="6"
- y="1043.3622"
- ry="0" />
- </g>
-</svg>
diff --git a/editor/icons/source/icon_godot_docs.svg b/editor/icons/source/icon_godot_docs.svg
new file mode 100644
index 0000000000..77aa92b31f
--- /dev/null
+++ b/editor/icons/source/icon_godot_docs.svg
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 15 15"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92.1 r15371"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_godot_docs.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="-14.305844"
+ inkscape:cy="5.1981046"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ originx="0"
+ originy="0"
+ spacingx="1"
+ spacingy="1" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1037.3622)">
+ <g
+ id="g78"
+ transform="matrix(0.06307836,0,0,-0.06307664,13.671143,1047.293)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 c 0,0 -0.325,1.994 -0.515,1.976 l -36.182,-3.491 c -2.879,-0.278 -5.115,-2.574 -5.317,-5.459 l -0.994,-14.247 -27.992,-1.997 -1.904,12.912 c -0.424,2.872 -2.932,5.037 -5.835,5.037 h -38.188 c -2.902,0 -5.41,-2.165 -5.834,-5.037 l -1.905,-12.912 -27.992,1.997 -0.994,14.247 c -0.202,2.886 -2.438,5.182 -5.317,5.46 l -36.2,3.49 c -0.187,0.018 -0.324,-1.978 -0.511,-1.978 l -0.049,-7.83 30.658,-4.944 1.004,-14.374 c 0.203,-2.91 2.551,-5.263 5.463,-5.472 l 38.551,-2.75 c 0.146,-0.01 0.29,-0.016 0.434,-0.016 2.897,0 5.401,2.166 5.825,5.038 l 1.959,13.286 h 28.005 l 1.959,-13.286 c 0.423,-2.871 2.93,-5.037 5.831,-5.037 0.142,0 0.284,0.005 0.423,0.015 l 38.556,2.75 c 2.911,0.209 5.26,2.562 5.463,5.472 l 1.003,14.374 30.645,4.966 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path80"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g82-3"
+ transform="matrix(0.06307836,0,0,-0.06307664,1.3279404,1043.5689)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 v -47.514 -6.035 -5.492 c 0.108,-0.001 0.216,-0.005 0.323,-0.015 l 36.196,-3.49 c 1.896,-0.183 3.382,-1.709 3.514,-3.609 l 1.116,-15.978 31.574,-2.253 2.175,14.747 c 0.282,1.912 1.922,3.329 3.856,3.329 h 38.188 c 1.933,0 3.573,-1.417 3.855,-3.329 l 2.175,-14.747 31.575,2.253 1.115,15.978 c 0.133,1.9 1.618,3.425 3.514,3.609 l 36.182,3.49 c 0.107,0.01 0.214,0.014 0.322,0.015 v 4.711 l 0.015,0.005 V 0 h 0.134 c 4.795,6.12 9.232,12.569 13.487,19.449 -5.651,9.62 -12.575,18.217 -19.976,26.182 -6.864,-3.455 -13.531,-7.369 -19.828,-11.534 -3.151,3.132 -6.7,5.694 -10.186,8.372 -3.425,2.751 -7.285,4.768 -10.946,7.118 1.09,8.117 1.629,16.108 1.846,24.448 -9.446,4.754 -19.519,7.906 -29.708,10.17 -4.068,-6.837 -7.788,-14.241 -11.028,-21.479 -3.842,0.642 -7.702,0.88 -11.567,0.926 v 0.006 c -0.027,0 -0.052,-0.006 -0.075,-0.006 -0.024,0 -0.049,0.006 -0.073,0.006 V 63.652 C 93.903,63.606 90.046,63.368 86.203,62.726 82.965,69.964 79.247,77.368 75.173,84.205 64.989,81.941 54.915,78.789 45.47,74.035 45.686,65.695 46.225,57.704 47.318,49.587 43.65,47.237 39.795,45.22 36.369,42.469 32.888,39.791 29.333,37.229 26.181,34.097 19.884,38.262 13.219,42.176 6.353,45.631 -1.048,37.666 -7.968,29.069 -13.621,19.449 -9.368,12.569 -4.928,6.12 -0.134,0 Z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path84-6"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g86-7"
+ transform="matrix(0.06307836,0,0,-0.06307664,11.62285,1047.9836)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 -1.121,-16.063 c -0.135,-1.936 -1.675,-3.477 -3.611,-3.616 l -38.555,-2.751 c -0.094,-0.007 -0.188,-0.01 -0.281,-0.01 -1.916,0 -3.569,1.406 -3.852,3.33 l -2.211,14.994 H -81.09 l -2.211,-14.994 c -0.297,-2.018 -2.101,-3.469 -4.133,-3.32 l -38.555,2.751 c -1.936,0.139 -3.476,1.68 -3.611,3.616 L -130.721,0 -163.268,3.138 c 0.015,-3.498 0.06,-7.33 0.06,-8.093 0,-34.374 43.605,-50.896 97.781,-51.086 h 0.066 0.067 c 54.176,0.19 97.766,16.712 97.766,51.086 0,0.777 0.047,4.593 0.063,8.093 z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path88-5"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g90-3"
+ transform="matrix(0.06307836,0,0,-0.06307664,5.6393685,1045.0806)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 c 0,-12.052 -9.765,-21.815 -21.813,-21.815 -12.042,0 -21.81,9.763 -21.81,21.815 0,12.044 9.768,21.802 21.81,21.802 C -9.765,21.802 0,12.044 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path92-5"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g94-6"
+ transform="matrix(0.06307836,0,0,-0.06307664,5.3082938,1045.1623)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 c 0,-7.994 -6.479,-14.473 -14.479,-14.473 -7.996,0 -14.479,6.479 -14.479,14.473 0,7.994 6.483,14.479 14.479,14.479 C -6.479,14.479 0,7.994 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path96-2"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g98-9"
+ transform="matrix(0.06307836,0,0,-0.06307664,7.4998997,1046.5818)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 c -3.878,0 -7.021,2.858 -7.021,6.381 v 20.081 c 0,3.52 3.143,6.381 7.021,6.381 3.878,0 7.028,-2.861 7.028,-6.381 V 6.381 C 7.028,2.858 3.878,0 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path100-1"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g102-2"
+ transform="matrix(0.06307836,0,0,-0.06307664,9.3606615,1045.0806)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 c 0,-12.052 9.765,-21.815 21.815,-21.815 12.041,0 21.808,9.763 21.808,21.815 0,12.044 -9.767,21.802 -21.808,21.802 C 9.765,21.802 0,12.044 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path104-7"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g106-0"
+ transform="matrix(0.06307836,0,0,-0.06307664,9.6918191,1045.1623)"
+ style="stroke-width:19.8168869">
+ <path
+ d="m 0,0 c 0,-7.994 6.477,-14.473 14.471,-14.473 8.002,0 14.479,6.479 14.479,14.473 0,7.994 -6.477,14.479 -14.479,14.479 C 6.477,14.479 0,7.994 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:19.8168869"
+ id="path108-9"
+ inkscape:connector-curvature="0" />
+ </g>
+ <path
+ inkscape:connector-curvature="0"
+ id="path4392"
+ d="m 4.3227149,1042.5597 a 2.5297459,2.5296773 0 0 0 -2.5297461,2.5297 2.5297459,2.5296773 0 0 0 2.5297461,2.5297 2.5297459,2.5296773 0 0 0 2.5297463,-2.5297 2.5297459,2.5296773 0 0 0 -2.5297463,-2.5297 z m 0,0.5084 a 2.0213759,2.021321 0 0 1 2.0213758,2.0213 2.0213759,2.021321 0 0 1 -2.0213758,2.0213 2.0213759,2.021321 0 0 1 -2.0213757,-2.0213 2.0213759,2.021321 0 0 1 2.0213757,-2.0213 z"
+ style="opacity:1;fill:#414042;fill-opacity:1;stroke:none;stroke-width:1.94780529;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4200);enable-background:new" />
+ <path
+ style="opacity:1;fill:#414042;fill-opacity:1;stroke:none;stroke-width:1.94780529;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4200);enable-background:new"
+ d="m 10.679126,1042.5597 a 2.5297459,2.5296773 0 0 0 -2.5297472,2.5297 2.5297459,2.5296773 0 0 0 2.5297472,2.5297 2.5297459,2.5296773 0 0 0 2.529744,-2.5297 2.5297459,2.5296773 0 0 0 -2.529744,-2.5297 z m 0,0.5084 a 2.0213759,2.021321 0 0 1 2.021373,2.0213 2.0213759,2.021321 0 0 1 -2.021373,2.0213 2.0213759,2.021321 0 0 1 -2.0213767,-2.0213 2.0213759,2.021321 0 0 1 2.0213767,-2.0213 z"
+ id="path4403"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="opacity:1;fill:#414042;fill-opacity:1;stroke:none;stroke-width:5.625;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.44162436"
+ id="rect4160"
+ width="2.3136585"
+ height="0.53352129"
+ x="6.3440895"
+ y="1043.9767" />
+ </g>
+</svg>
diff --git a/scene/resources/default_theme/source/hslider_bg.svg b/editor/icons/source/icon_hslider_bg.svg
index f247904a33..10bea12ab8 100644
--- a/scene/resources/default_theme/source/hslider_bg.svg
+++ b/editor/icons/source/icon_hslider_bg.svg
@@ -14,11 +14,11 @@
viewBox="0 0 16 15.999999"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="hslider_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:version="0.92.1 unknown"
+ sodipodi:docname="icon_hslider_bg.svg"
+ inkscape:export-filename="/mnt/2TB/Development/godot_dev/editor/icons/2x/icon_hslider_bg.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
<defs
id="defs4" />
<sodipodi:namedview
@@ -29,7 +29,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
- inkscape:cx="9.463221"
+ inkscape:cx="4.166346"
inkscape:cy="6.5721301"
inkscape:document-units="px"
inkscape:current-layer="layer1"
@@ -41,11 +41,11 @@
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
+ inkscape:window-width="929"
+ inkscape:window-height="897"
+ inkscape:window-x="436"
+ inkscape:window-y="155"
+ inkscape:window-maximized="0"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="true">
<inkscape:grid
diff --git a/scene/resources/default_theme/source/hsplitter.svg b/editor/icons/source/icon_hsplitter.svg
index 01c893fc56..01c893fc56 100644
--- a/scene/resources/default_theme/source/hsplitter.svg
+++ b/editor/icons/source/icon_hsplitter.svg
diff --git a/editor/icons/source/icon_mini_matrix32.svg b/editor/icons/source/icon_mini_matrix32.svg
new file mode 100644
index 0000000000..5159ea0b87
--- /dev/null
+++ b/editor/icons/source/icon_mini_matrix32.svg
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="12"
+ viewBox="0 0 16 12"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_mini_matrix32.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32.000001"
+ inkscape:cx="1.5471383"
+ inkscape:cy="5.978497"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1040.3622)">
+ <path
+ style="fill:#ddf4aa;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 8 2 L 8 4 L 9 4 L 10 4 A 1 1 0 0 1 9 5 L 9 7 A 1 1 0 0 1 10 8 A 1 1 0 0 1 9 9 L 8 9 L 8 11 L 9 11 A 3 3 0 0 0 11.597656 9.5 A 3 3 0 0 0 11.597656 6.5 A 3 3 0 0 0 11.232422 5.9980469 A 3 3 0 0 0 11.597656 5.5 A 3 3 0 0 0 11.994141 4 L 12 4 L 12 2 L 9 2 L 8 2 z "
+ transform="translate(0,1040.3622)"
+ id="path4753" />
+ <rect
+ y="1048.3622"
+ x="11"
+ height="2"
+ width="5"
+ id="rect4763"
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:open="true"
+ d="m 13,1050.3622 a 2,2 0 0 1 -1.732051,-1 2,2 0 0 1 0,-2 2,2 0 0 1 1.732051,-1"
+ sodipodi:end="4.712389"
+ sodipodi:start="1.5707963"
+ sodipodi:ry="2"
+ sodipodi:rx="2"
+ sodipodi:cy="1048.3622"
+ sodipodi:cx="13"
+ sodipodi:type="arc"
+ id="path4765"
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4767"
+ d="m 13,1042.3622 0,2 a 1,1 0 0 1 1,1 1,1 0 0 1 -1,1 l 0,2 a 3,3 0 0 0 2.597656,-1.5 3,3 0 0 0 0,-3 3,3 0 0 0 -2.597656,-1.5 z"
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2,1044.3622 a 3,3 0 0 1 3,3 l -2,0 a 1.0000174,1.0000174 0 0 0 -1,-1 l 0,-2 z"
+ id="path4771"
+ inkscape:connector-curvature="0" />
+ <rect
+ y="-1050.3622"
+ x="3"
+ height="3"
+ width="2"
+ id="rect4773"
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ transform="scale(1,-1)" />
+ <rect
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4775"
+ width="2"
+ height="5.9999828"
+ x="0"
+ y="-1050.3622"
+ transform="scale(1,-1)" />
+ <rect
+ transform="scale(1,-1)"
+ y="-1050.3622"
+ x="3"
+ height="5.9999828"
+ width="2"
+ id="rect4777"
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4779"
+ d="m 5,1044.3622 a 3,3 0 0 1 3,3 l -2,0 a 1.0000174,1.0000174 0 0 0 -1,-1 l 0,-2 z"
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#c4ec69;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4781"
+ width="2"
+ height="3.0000002"
+ x="6"
+ y="-1050.3622"
+ transform="scale(1,-1)" />
+ </g>
+</svg>
diff --git a/scene/resources/default_theme/source/tab.svg b/editor/icons/source/icon_option_arrow.svg
index 612977953a..5cd943e9e3 100644
--- a/scene/resources/default_theme/source/tab.svg
+++ b/editor/icons/source/icon_option_arrow.svg
@@ -9,16 +9,16 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="8"
- height="8"
- viewBox="0 0 8 8"
+ width="12"
+ height="12"
+ viewBox="0 0 12 12"
id="svg2"
version="1.1"
inkscape:version="0.92.1 r"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
- sodipodi:docname="tab.svg">
+ sodipodi:docname="option_arrow.svg">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="32.000001"
- inkscape:cx="-2.6446005"
- inkscape:cy="5.445875"
+ inkscape:zoom="45.254834"
+ inkscape:cx="3.1667338"
+ inkscape:cy="5.9875884"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -69,13 +69,12 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(0,-1044.3622)">
+ transform="translate(0,-1040.3622)">
<path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:0.07843138;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 8,3.984375 c -4,2.6770833 -2,1.3385417 0,0 z M 8,4 C 7.9958579,3.7402262 7.8907874,3.4766349 7.7070312,3.2929688 l -3,-3.00000005 C 4.5187601,0.09943602 4.2602361,-0.00974989 3.9902344,-0.00976563 3.0928174,-0.00952997 2.6498571,1.0811201 3.2929688,1.7070312 L 4.5859375,3 H 0 V 5 L 4.5859375,5 3.2929688,6.2929688 C 2.3113156,7.2354775 3.7645225,8.6886844 4.7070312,7.7070312 l 3,-3 C 7.898443,4.5157079 8.0041444,4.2706029 8,4 Z"
- transform="translate(0,1044.3622)"
- id="path814"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccccccccccccc" />
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:0.78431374;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 9.9999996,1043.3583 c -0.2637796,0.01 -0.5144012,0.1165 -0.697265,0.3067 l -3.292969,3.2929 -3.2929688,-3.2929 C 2.5285367,1043.4714 2.2700113,1043.3622 2,1043.3622 c -0.8974208,2e-4 -1.34038281,1.0909 -0.6972656,1.7168 l 4,4 c 0.3905299,0.3904 1.0235325,0.3904 1.4140624,0 l 4.0000002,-4 c 0.657344,-0.6321 0.194906,-1.7422 -0.7167974,-1.7207 z"
+ id="path4484"
+ sodipodi:nodetypes="cccccccccc" />
</g>
</svg>
diff --git a/editor/icons/source/icon_particles_shader.svg b/editor/icons/source/icon_particles_shader.svg
new file mode 100644
index 0000000000..b4c2ef7ccd
--- /dev/null
+++ b/editor/icons/source/icon_particles_shader.svg
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_node_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_particles_shader.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4253">
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 16.458984,1024.37 a 12.000027,12.000027 0 0 0 -3.564453,0.4004 12.000027,12.000027 0 0 0 -8.4863279,14.6973 12.000027,12.000027 0 0 0 14.6972659,8.4863 12.000027,12.000027 0 0 0 8.486328,-14.6973 12.000027,12.000027 0 0 0 -11.132813,-8.8867 z M 16.25,1029.8212 a 6.5451717,6.5451717 0 0 1 6.072266,4.8476 6.5451717,6.5451717 0 0 1 -4.628907,8.0157 6.5451717,6.5451717 0 0 1 -8.0156246,-4.6289 6.5451717,6.5451717 0 0 1 4.6289066,-8.0157 6.5451717,6.5451717 0 0 1 1.943359,-0.2187 z"
+ id="path4255"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4199">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4201"
+ d="m 16.5,1025.8622 a 11.8125,10.499999 0 0 0 -11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125,-10.5 11.8125,10.499999 0 0 0 -11.8125,-10.5 z m -3.375,3 a 3.375,2.9999997 0 0 1 3.375,3 3.375,2.9999997 0 0 1 -3.375,3 3.375,2.9999997 0 0 1 -3.3750001,-3 3.375,2.9999997 0 0 1 3.3750001,-3 z"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4208">
+ <path
+ style="opacity:1;fill:#a5b7f5;fill-opacity:0.98823529;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 8,1037.3622 A 4.4999948,4.9999847 0 0 0 3.5859375,1041.3934 3,3 0 0 0 1,1044.3622 a 3,3 0 0 0 3,3 l 8,0 a 3,3 0 0 0 3,-3 3,3 0 0 0 -2.589844,-2.9668 A 4.4999948,4.9999847 0 0 0 8,1037.3622 Z m -4,11 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m 8,0 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m -4,1 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z"
+ id="path4210"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="15.999999"
+ inkscape:cx="8.2922739"
+ inkscape:cy="6.6952763"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="true"
+ inkscape:snap-intersection-paths="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4271"
+ clip-path="url(#clipPath4208)"
+ transform="translate(0,1.8694115e-5)">
+ <rect
+ y="1037.3622"
+ x="0"
+ height="2.0000031"
+ width="16"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="16"
+ height="2.0000029"
+ x="0"
+ y="1039.3622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="16"
+ height="1.9999999"
+ x="0"
+ y="1041.3622" />
+ <rect
+ y="1043.3622"
+ x="0"
+ height="2.0000024"
+ width="16"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1045.3622"
+ x="0"
+ height="2.0000021"
+ width="16"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="16"
+ height="1.9999987"
+ x="0"
+ y="1049.3622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="16"
+ height="2.0000021"
+ x="0"
+ y="1047.3622" />
+ </g>
+ </g>
+</svg>
diff --git a/scene/resources/default_theme/source/button_group.svg b/editor/icons/source/icon_play_button_group.svg
index 84bdb00505..84bdb00505 100644
--- a/scene/resources/default_theme/source/button_group.svg
+++ b/editor/icons/source/icon_play_button_group.svg
diff --git a/scene/resources/default_theme/source/scroll_bg.svg b/editor/icons/source/icon_scroll_bg.svg
index 29604b9e14..29604b9e14 100644
--- a/scene/resources/default_theme/source/scroll_bg.svg
+++ b/editor/icons/source/icon_scroll_bg.svg
diff --git a/scene/resources/default_theme/source/scroll_grabber.svg b/editor/icons/source/icon_scroll_grabber.svg
index b9d2bbbec0..b9d2bbbec0 100644
--- a/scene/resources/default_theme/source/scroll_grabber.svg
+++ b/editor/icons/source/icon_scroll_grabber.svg
diff --git a/scene/resources/default_theme/source/scroll_grabber_hl.svg b/editor/icons/source/icon_scroll_grabber_hl.svg
index 88f4317b8d..ce9a66c5bc 100644
--- a/scene/resources/default_theme/source/scroll_grabber_hl.svg
+++ b/editor/icons/source/icon_scroll_grabber_hl.svg
@@ -14,9 +14,9 @@
viewBox="0 0 12 11.999999"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_grabber_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
+ inkscape:version="0.92.1 unknown"
+ sodipodi:docname="icon_scroll_grabber_hl.svg"
+ inkscape:export-filename="/mnt/2TB/Development/godot_dev/editor/icons/icon_scroll_grabber_hl.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="45.254836"
- inkscape:cx="1.4412236"
- inkscape:cy="5.623836"
+ inkscape:cx="3.0874565"
+ inkscape:cy="5.7564185"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -41,11 +41,11 @@
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
+ inkscape:window-width="1097"
+ inkscape:window-height="1076"
+ inkscape:window-x="161"
+ inkscape:window-y="200"
+ inkscape:window-maximized="0"
inkscape:snap-nodes="false">
<inkscape:grid
type="xygrid"
@@ -60,7 +60,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -70,10 +70,13 @@
id="layer1"
transform="translate(0,-1040.3623)">
<circle
- style="opacity:1;fill:#7eff8a;fill-opacity:1;stroke:none;stroke-width:2.24999642;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ style="opacity:1;fill:#f9f9f9;fill-opacity:0.73000002;stroke:none;stroke-width:2.24999642;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4239"
cx="6"
cy="1046.3623"
- r="2.9999952" />
+ r="2.9999952"
+ inkscape:export-filename="/mnt/2TB/Development/godot_dev/editor/icons/icon_scroll_grabber_hl.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/hslider_grabber.svg b/editor/icons/source/icon_slider_grabber.svg
index a222edd37e..b13ca5d1a9 100644
--- a/scene/resources/default_theme/source/hslider_grabber.svg
+++ b/editor/icons/source/icon_slider_grabber.svg
@@ -14,8 +14,8 @@
viewBox="0 0 16 15.999999"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="hslider_grabber.svg"
+ inkscape:version="0.92.1 unknown"
+ sodipodi:docname="icon_slider_grabber.svg"
inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
- inkscape:cx="2.6109686"
- inkscape:cy="6.3424144"
+ inkscape:cx="3.7828436"
+ inkscape:cy="7.4986644"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -41,11 +41,11 @@
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
+ inkscape:window-width="1195"
+ inkscape:window-height="722"
+ inkscape:window-x="91"
+ inkscape:window-y="633"
+ inkscape:window-maximized="0"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="true">
<inkscape:grid
diff --git a/scene/resources/default_theme/source/hslider_grabber_hl.svg b/editor/icons/source/icon_slider_grabber_hl.svg
index d53aa5c0e9..5d53811c55 100644
--- a/scene/resources/default_theme/source/hslider_grabber_hl.svg
+++ b/editor/icons/source/icon_slider_grabber_hl.svg
@@ -14,11 +14,11 @@
viewBox="0 0 16 15.999999"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="hslider_grabber_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:version="0.92.1 unknown"
+ sodipodi:docname="icon_slider_grabber_hl.svg"
+ inkscape:export-filename="/mnt/2TB/Development/godot_dev/editor/icons/2x/icon_slider_grabber_hl.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
<defs
id="defs4" />
<sodipodi:namedview
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
- inkscape:cx="7.0748113"
- inkscape:cy="6.0432589"
+ inkscape:cx="7.6841863"
+ inkscape:cy="6.0120089"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -41,11 +41,11 @@
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
+ inkscape:window-width="1092"
+ inkscape:window-height="880"
+ inkscape:window-x="92"
+ inkscape:window-y="49"
+ inkscape:window-maximized="0"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="true">
<inkscape:grid
@@ -75,6 +75,6 @@
cy="1044.3623"
cx="8.0000057"
id="circle4262"
- style="fill:#7eff8a;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:#f9f9f9;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>
diff --git a/editor/icons/source/icon_spatial_shader.svg b/editor/icons/source/icon_spatial_shader.svg
new file mode 100644
index 0000000000..329354b716
--- /dev/null
+++ b/editor/icons/source/icon_spatial_shader.svg
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_spatial_shader.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ id="clipPath4253"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4255"
+ d="m 16.458984,1024.37 a 12.000027,12.000027 0 0 0 -3.564453,0.4004 12.000027,12.000027 0 0 0 -8.4863279,14.6973 12.000027,12.000027 0 0 0 14.6972659,8.4863 12.000027,12.000027 0 0 0 8.486328,-14.6973 12.000027,12.000027 0 0 0 -11.132813,-8.8867 z M 16.25,1029.8212 a 6.5451717,6.5451717 0 0 1 6.072266,4.8476 6.5451717,6.5451717 0 0 1 -4.628907,8.0157 6.5451717,6.5451717 0 0 1 -8.0156246,-4.6289 6.5451717,6.5451717 0 0 1 4.6289066,-8.0157 6.5451717,6.5451717 0 0 1 1.943359,-0.2187 z"
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </clipPath>
+ <clipPath
+ id="clipPath4199"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 16.5,1025.8622 a 11.8125,10.499999 0 0 0 -11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125,-10.5 11.8125,10.499999 0 0 0 -11.8125,-10.5 z m -3.375,3 a 3.375,2.9999997 0 0 1 3.375,3 3.375,2.9999997 0 0 1 -3.375,3 3.375,2.9999997 0 0 1 -3.3750001,-3 3.375,2.9999997 0 0 1 3.3750001,-3 z"
+ id="path4201"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4280">
+ <g
+ id="g4282"
+ inkscape:label="Layer 1"
+ transform="translate(0,1.1802001e-5)"
+ style="stroke:#fc9c9c;stroke-opacity:0.99607843">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 7.9628906,1.0019531 A 1.0001,1.0001 0 0 0 7.5527344,1.1054688 l -6,3 A 1.0001,1.0001 0 0 0 1,5 l 0,6 a 1.0001,1.0001 0 0 0 0.5527344,0.894531 l 6,3 a 1.0001,1.0001 0 0 0 0.8945312,0 l 6.0000004,-3 A 1.0001,1.0001 0 0 0 15,11 L 15,5 A 1.0001,1.0001 0 0 0 14.447266,4.1054688 l -6.0000004,-3 A 1.0001,1.0001 0 0 0 7.9628906,1.0019531 Z M 8,3.1191406 11.763672,5 8,6.8828125 4.2363281,5 8,3.1191406 Z m -5,3.5 4,2 0,3.7636714 -4,-2 0,-3.7636714 z m 10,0 0,3.7636714 -4,2 0,-3.7636714 4,-2 z"
+ transform="translate(0,1036.3622)"
+ id="path4284"
+ inkscape:connector-curvature="0" />
+ </g>
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="7.8442401"
+ inkscape:cy="13.929239"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="false"
+ inkscape:snap-smooth-nodes="false"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4271"
+ clip-path="url(#clipPath4280)">
+ <rect
+ y="1037.3622"
+ x="0"
+ height="2.0000031"
+ width="16"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="16"
+ height="2.0000029"
+ x="0"
+ y="1039.3622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="16"
+ height="1.9999999"
+ x="0"
+ y="1041.3622" />
+ <rect
+ y="1043.3622"
+ x="0"
+ height="2.0000024"
+ width="16"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1045.3622"
+ x="0"
+ height="2.0000021"
+ width="16"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="16"
+ height="1.9999987"
+ x="0"
+ y="1049.3622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="16"
+ height="2.0000021"
+ x="0"
+ y="1047.3622" />
+ </g>
+ </g>
+</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_down.svg b/editor/icons/source/icon_spinbox_updown.svg
index 078cc5c37c..e29d7fe0d2 100644
--- a/scene/resources/default_theme/source/scroll_button_down.svg
+++ b/editor/icons/source/icon_spinbox_updown.svg
@@ -9,16 +9,16 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
id="svg2"
version="1.1"
inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_down.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="spinbox_updown.svg">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,28 +28,30 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="1.4098045"
- inkscape:cy="5.764877"
+ inkscape:zoom="16"
+ inkscape:cx="-1.901723"
+ inkscape:cy="9.1326297"
inkscape:document-units="px"
- inkscape:current-layer="layer1"
+ inkscape:current-layer="layer1-5"
showgrid="true"
units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
inkscape:window-width="1600"
inkscape:window-height="836"
inkscape:window-x="0"
inkscape:window-y="27"
- inkscape:window-maximized="1">
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true">
<inkscape:grid
type="xygrid"
- id="grid4136"
- empspacing="4" />
+ id="grid3336" />
</sodipodi:namedview>
<metadata
id="metadata7">
@@ -67,11 +69,15 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(0,-1040.3623)">
+ transform="translate(0,-1036.3622)">
<path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:0.27450982;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 10.023438,1044.3535 a 1.0001,1.0001 0 0 0 -0.6230474,0.209 L 6,1047.1113 2.5996094,1044.5625 a 1.0001,1.0001 0 1 0 -1.1992188,1.5996 l 4,3 a 1.0001,1.0001 0 0 0 1.1992188,0 l 3.9999996,-3 a 1.0001,1.0001 0 0 0 -0.576171,-1.8086 z"
- id="path4511"
- inkscape:connector-curvature="0" />
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e0e0e0;fill-opacity:0.78431374;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 7.984375 1.0019531 A 1.0001 1.0001 0 0 0 7.2929688 1.2929688 L 3.2929688 5.2929688 A 1.0001 1.0001 0 1 0 4.7070312 6.7070312 L 8 3.4140625 L 11.292969 6.7070312 A 1.0001 1.0001 0 1 0 12.707031 5.2929688 L 8.7070312 1.2929688 A 1.0001 1.0001 0 0 0 7.984375 1.0019531 z M 11.990234 8.9863281 A 1.0001 1.0001 0 0 0 11.292969 9.2929688 L 8 12.585938 L 4.7070312 9.2929688 A 1.0001 1.0001 0 0 0 3.9902344 8.9902344 A 1.0001 1.0001 0 0 0 3.2929688 10.707031 L 7.2929688 14.707031 A 1.0001 1.0001 0 0 0 8.7070312 14.707031 L 12.707031 10.707031 A 1.0001 1.0001 0 0 0 11.990234 8.9863281 z "
+ transform="translate(0,1036.3622)"
+ id="path4484" />
+ <g
+ id="layer1-5"
+ inkscape:label="Layer 1"
+ transform="translate(14.210182,-5.3664)" />
</g>
</svg>
diff --git a/editor/icons/source/icon_2_d.svg b/editor/icons/source/icon_tab_menu.svg
index 54c93a45aa..39e0d1f261 100644
--- a/editor/icons/source/icon_2_d.svg
+++ b/editor/icons/source/icon_tab_menu.svg
@@ -15,10 +15,10 @@
id="svg2"
version="1.1"
inkscape:version="0.92.1 r"
- inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
- sodipodi:docname="icon_2_d.svg">
+ sodipodi:docname="tab_menu.svg">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="22.627418"
- inkscape:cx="1.7654173"
- inkscape:cy="7.2653991"
+ inkscape:zoom="32.000001"
+ inkscape:cx="4.0814179"
+ inkscape:cy="8.4695645"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -47,7 +47,6 @@
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
- inkscape:snap-midpoints="true"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="true">
<inkscape:grid
@@ -71,23 +70,23 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
- <path
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,1040.3622 2,-2 2,2"
- id="path4485"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc" />
- <path
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 4,1039.3622 v 9 h 9"
- id="path4487"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc" />
- <path
- sodipodi:nodetypes="ccc"
- inkscape:connector-curvature="0"
- id="path4489"
- d="m 12,1046.3622 2,2 -2,2"
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <circle
+ style="fill:#ffffff;fill-opacity:0.39215687;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294118"
+ id="path819"
+ cx="8"
+ cy="1038.3622"
+ r="2" />
+ <circle
+ r="2"
+ cy="1044.3622"
+ cx="8"
+ id="circle821"
+ style="fill:#ffffff;fill-opacity:0.39215687;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294118" />
+ <circle
+ style="fill:#ffffff;fill-opacity:0.39215687;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294118"
+ id="circle823"
+ cx="8"
+ cy="1050.3622"
+ r="2" />
</g>
</svg>
diff --git a/editor/icons/source/icon_texture.svg b/editor/icons/source/icon_texture.svg
new file mode 100644
index 0000000000..39e88e592b
--- /dev/null
+++ b/editor/icons/source/icon_texture.svg
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_image_texture.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="9.9365814"
+ inkscape:cy="6.4466253"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="false"
+ inkscape:snap-smooth-nodes="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 2 1 A 1 1 0 0 0 1 2 L 1 14 A 1 1 0 0 0 2 15 L 14 15 A 1 1 0 0 0 15 14 L 15 2 A 1 1 0 0 0 14 1 L 2 1 z M 3 3 L 13 3 L 13 11 L 3 11 L 3 3 z "
+ transform="translate(0,1036.3622)"
+ id="rect4156" />
+ <rect
+ y="1043.3622"
+ x="6"
+ height="1"
+ width="2"
+ id="rect4197"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ id="rect4199"
+ width="2"
+ height="2.0000174"
+ x="6"
+ y="1044.3622" />
+ <rect
+ y="1045.3622"
+ x="4"
+ height="1"
+ width="2"
+ id="rect4201"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ id="rect4203"
+ width="2"
+ height="2.0000174"
+ x="8"
+ y="1044.3622" />
+ <rect
+ y="1044.3622"
+ x="10"
+ height="2.0000174"
+ width="2"
+ id="rect4205"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ id="rect4207"
+ width="3"
+ height="2.0000174"
+ x="8"
+ y="1042.3622" />
+ <rect
+ y="1041.3622"
+ x="9"
+ height="1"
+ width="1"
+ id="rect4217"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ id="rect4219"
+ width="1"
+ height="1"
+ x="5"
+ y="1044.3622" />
+ </g>
+</svg>
diff --git a/scene/resources/default_theme/source/vseparator.svg b/editor/icons/source/icon_tree_arrow_down.svg
index 40c2c674a1..1dd209720f 100644
--- a/scene/resources/default_theme/source/vseparator.svg
+++ b/editor/icons/source/icon_tree_arrow_down.svg
@@ -9,16 +9,16 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="8"
- height="8"
- viewBox="0 0 8 8"
+ width="12"
+ height="12"
+ viewBox="0 0 12 12"
id="svg2"
version="1.1"
inkscape:version="0.92.1 r"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
- sodipodi:docname="vseparator.svg">
+ sodipodi:docname="arrow_down.svg">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="5.3201856"
- inkscape:cy="4.9836785"
+ inkscape:zoom="22.627417"
+ inkscape:cx="1.7981958"
+ inkscape:cy="7.5815407"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -69,5 +69,12 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(0,-1044.3622)" />
+ transform="translate(0,-1040.3622)">
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.39215687"
+ d="m 3,1045.3622 3,3 3,-3"
+ id="path814"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
</svg>
diff --git a/editor/icons/source/icon_tree_arrow_right.svg b/editor/icons/source/icon_tree_arrow_right.svg
new file mode 100644
index 0000000000..43134ba1b1
--- /dev/null
+++ b/editor/icons/source/icon_tree_arrow_right.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="12"
+ height="12"
+ viewBox="0 0 12 12"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92.1 r"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="arrow_right.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254836"
+ inkscape:cx="4.0845752"
+ inkscape:cy="5.8802612"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1600"
+ inkscape:window-height="836"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1040.3622)">
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.39215687"
+ d="m 4,1049.3622 3.0000202,-3 -3.0000202,-3"
+ id="path814"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+</svg>
diff --git a/scene/resources/default_theme/source/unchecked.svg b/editor/icons/source/icon_unchecked.svg
index 053cbe6de5..053cbe6de5 100644
--- a/scene/resources/default_theme/source/unchecked.svg
+++ b/editor/icons/source/icon_unchecked.svg
diff --git a/scene/resources/default_theme/source/vslider_bg.svg b/editor/icons/source/icon_vslider_bg.svg
index b34dddc2d0..b34dddc2d0 100644
--- a/scene/resources/default_theme/source/vslider_bg.svg
+++ b/editor/icons/source/icon_vslider_bg.svg
diff --git a/scene/resources/default_theme/source/vsplit_bg.svg b/editor/icons/source/icon_vsplit_bg.svg
index e11940cf53..e11940cf53 100644
--- a/scene/resources/default_theme/source/vsplit_bg.svg
+++ b/editor/icons/source/icon_vsplit_bg.svg
diff --git a/scene/resources/default_theme/source/vsplitter.svg b/editor/icons/source/icon_vsplitter.svg
index 80f7c2ce12..80f7c2ce12 100644
--- a/scene/resources/default_theme/source/vsplitter.svg
+++ b/editor/icons/source/icon_vsplitter.svg
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
new file mode 100644
index 0000000000..6dee5da538
--- /dev/null
+++ b/editor/import/editor_import_plugin.cpp
@@ -0,0 +1,152 @@
+/*************************************************************************/
+/* editor_import_plugin.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 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_import_plugin.h"
+#include "core/script_language.h"
+
+EditorImportPlugin::EditorImportPlugin() {
+}
+
+String EditorImportPlugin::get_importer_name() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_importer_name")), "");
+ return get_script_instance()->call("get_importer_name");
+}
+
+String EditorImportPlugin::get_visible_name() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_visible_name")), "");
+ return get_script_instance()->call("get_visible_name");
+}
+
+void EditorImportPlugin::get_recognized_extensions(List<String> *p_extensions) const {
+ ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("get_recognized_extensions")));
+ Array extensions = get_script_instance()->call("get_recognized_extensions");
+ for (int i = 0; i < extensions.size(); i++) {
+ p_extensions->push_back(extensions[i]);
+ }
+}
+
+String EditorImportPlugin::get_preset_name(int p_idx) const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_preset_name")), "");
+ return get_script_instance()->call("get_preset_name", p_idx);
+}
+
+int EditorImportPlugin::get_preset_count() {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_preset_count")), 0);
+ return get_script_instance()->call("get_preset_count");
+}
+
+String EditorImportPlugin::get_save_extension() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_save_extension")), "");
+ return get_script_instance()->call("get_save_extension");
+}
+
+String EditorImportPlugin::get_resource_type() const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_resource_type")), "");
+ return get_script_instance()->call("get_resource_type");
+}
+
+void EditorImportPlugin::get_import_options(List<ResourceImporter::ImportOption> *r_options, int p_preset) const {
+
+ ERR_FAIL_COND(!(get_script_instance() && get_script_instance()->has_method("get_import_options")));
+ Array needed;
+ needed.push_back("name");
+ needed.push_back("default_value");
+ Array options = get_script_instance()->call("get_import_options", p_preset);
+ for (int i = 0; i < options.size(); i++) {
+ Dictionary d = options[i];
+ ERR_FAIL_COND(!d.has_all(needed));
+ String name = d["name"];
+ Variant default_value = d["default_value"];
+
+ PropertyHint hint = PROPERTY_HINT_NONE;
+ if (d.has("property_hint")) {
+ hint = (PropertyHint)d["property_hint"].operator int64_t();
+ }
+
+ String hint_string;
+ if (d.has("hint_string")) {
+ hint_string = d["hint_string"];
+ }
+
+ uint32_t usage = PROPERTY_USAGE_DEFAULT;
+ if (d.has("usage")) {
+ usage = d["usage"];
+ }
+
+ ImportOption option(PropertyInfo(default_value.get_type(), name, hint, hint_string, usage), default_value);
+ r_options->push_back(option);
+ }
+}
+
+bool EditorImportPlugin::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("get_option_visibility")), true);
+ Dictionary d;
+ Map<StringName, Variant>::Element *E = p_options.front();
+ while (E) {
+ d[E->key()] = E->get();
+ E = E->next();
+ }
+ return get_script_instance()->call("get_option_visibility", p_option, d);
+}
+
+Error EditorImportPlugin::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) {
+
+ ERR_FAIL_COND_V(!(get_script_instance() && get_script_instance()->has_method("import")), ERR_UNAVAILABLE);
+ Dictionary options;
+ Array platform_variants, gen_files;
+
+ Map<StringName, Variant>::Element *E = p_options.front();
+ while (E) {
+ options[E->key()] = E->get();
+ E = E->next();
+ }
+ Error err = (Error)get_script_instance()->call("import", p_source_file, p_save_path, options, platform_variants, gen_files).operator int64_t();
+
+ for (int i = 0; i < platform_variants.size(); i++) {
+ r_platform_variants->push_back(platform_variants[i]);
+ }
+ for (int i = 0; i < gen_files.size(); i++) {
+ r_gen_files->push_back(gen_files[i]);
+ }
+ return err;
+}
+
+void EditorImportPlugin::_bind_methods() {
+
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_importer_name"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_visible_name"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "get_preset_count"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_preset_name", PropertyInfo(Variant::INT, "preset")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_recognized_extensions"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::ARRAY, "get_import_options", PropertyInfo(Variant::INT, "preset")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_save_extension"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type"));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "get_option_visibility", PropertyInfo(Variant::STRING, "option"), PropertyInfo(Variant::DICTIONARY, "options")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "import", PropertyInfo(Variant::STRING, "source_file"), PropertyInfo(Variant::STRING, "save_path"), PropertyInfo(Variant::DICTIONARY, "options"), PropertyInfo(Variant::ARRAY, "r_platform_variants"), PropertyInfo(Variant::ARRAY, "r_gen_files")));
+}
diff --git a/platform/osx/context_gl_osx.h b/editor/import/editor_import_plugin.h
index d0e2a2c0d3..3c16b79713 100644
--- a/platform/osx/context_gl_osx.h
+++ b/editor/import/editor_import_plugin.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* context_gl_osx.h */
+/* editor_import_plugin.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,38 +27,28 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CONTEXT_GL_OSX_H
-#define CONTEXT_GL_OSX_H
+#ifndef EDITOR_IMPORT_PLUGIN_H
+#define EDITOR_IMPORT_PLUGIN_H
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-#ifdef OSX_ENABLED
+#include "io/resource_import.h"
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
-
-#include "drivers/gl_context/context_gl.h"
-#include "os/os.h"
-#include <AGL/agl.h>
-#include <Carbon/Carbon.h>
-
-class ContextGL_OSX : public ContextGL {
-
- AGLContext context;
- WindowRef window;
+class EditorImportPlugin : public ResourceImporter {
+ GDCLASS(EditorImportPlugin, Reference)
+protected:
+ static void _bind_methods();
public:
- virtual void release_current();
- virtual void make_current();
- virtual void swap_buffers();
-
- virtual Error initialize();
-
- ContextGL_OSX(WindowRef window);
- ~ContextGL_OSX();
+ EditorImportPlugin();
+ virtual String get_importer_name() const;
+ virtual String get_visible_name() const;
+ virtual void get_recognized_extensions(List<String> *p_extensions) const;
+ virtual String get_preset_name(int p_idx) const;
+ virtual int get_preset_count();
+ virtual String get_save_extension() const;
+ virtual String get_resource_type() const;
+ virtual void get_import_options(List<ImportOption> *r_options, int p_preset) const;
+ virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
+ virtual Error 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);
};
-#endif
-
-#endif
-#endif
+#endif //EDITOR_IMPORT_PLUGIN_H
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index ea43477dc3..85d446f38a 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -54,7 +54,7 @@ String ResourceImporterCSVTranslation::get_save_extension() const {
String ResourceImporterCSVTranslation::get_resource_type() const {
- return "StreamCSVTranslation";
+ return "Translation";
}
bool ResourceImporterCSVTranslation::get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const {
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index f0dcc4a298..c115f0014a 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -181,7 +181,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "detect_3d"), p_preset == PRESET_DETECT));
}
-void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb) {
+void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb) {
FileAccess *f = FileAccess::open(p_to_path, FileAccess::WRITE);
f->store_8('G');
@@ -189,8 +189,8 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
f->store_8('S');
f->store_8('T'); //godot streamable texture
- f->store_32(p_image.get_width());
- f->store_32(p_image.get_height());
+ f->store_32(p_image->get_width());
+ f->store_32(p_image->get_height());
f->store_32(p_texture_flags);
uint32_t format = 0;
@@ -207,14 +207,14 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
switch (p_compress_mode) {
case COMPRESS_LOSSLESS: {
- Image image = p_image;
+ Ref<Image> image = p_image->duplicate();
if (p_mipmaps) {
- image.generate_mipmaps();
+ image->generate_mipmaps();
} else {
- image.clear_mipmaps();
+ image->clear_mipmaps();
}
- int mmc = image.get_mipmap_count() + 1;
+ int mmc = image->get_mipmap_count() + 1;
format |= StreamTexture::FORMAT_BIT_LOSSLESS;
f->store_32(format);
@@ -223,7 +223,7 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
for (int i = 0; i < mmc; i++) {
if (i > 0) {
- image.shrink_x2();
+ image->shrink_x2();
}
PoolVector<uint8_t> data = Image::lossless_packer(image);
@@ -236,14 +236,14 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
} break;
case COMPRESS_LOSSY: {
- Image image = p_image;
+ Ref<Image> image = p_image->duplicate();
if (p_mipmaps) {
- image.generate_mipmaps();
+ image->generate_mipmaps();
} else {
- image.clear_mipmaps();
+ image->clear_mipmaps();
}
- int mmc = image.get_mipmap_count() + 1;
+ int mmc = image->get_mipmap_count() + 1;
format |= StreamTexture::FORMAT_BIT_LOSSY;
f->store_32(format);
@@ -252,7 +252,7 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
for (int i = 0; i < mmc; i++) {
if (i > 0) {
- image.shrink_x2();
+ image->shrink_x2();
}
PoolVector<uint8_t> data = Image::lossy_packer(image, p_lossy_quality);
@@ -265,15 +265,15 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
} break;
case COMPRESS_VIDEO_RAM: {
- Image image = p_image;
- image.generate_mipmaps();
- image.compress(p_vram_compression);
+ Ref<Image> image = p_image->duplicate();
+ image->generate_mipmaps();
+ image->compress(p_vram_compression);
- format |= image.get_format();
+ format |= image->get_format();
f->store_32(format);
- PoolVector<uint8_t> data = image.get_data();
+ PoolVector<uint8_t> data = image->get_data();
int dl = data.size();
PoolVector<uint8_t>::Read r = data.read();
f->store_buffer(r.ptr(), dl);
@@ -281,17 +281,17 @@ void ResourceImporterTexture::_save_stex(const Image &p_image, const String &p_t
} break;
case COMPRESS_UNCOMPRESSED: {
- Image image = p_image;
+ Ref<Image> image = p_image->duplicate();
if (p_mipmaps) {
- image.generate_mipmaps();
+ image->generate_mipmaps();
} else {
- image.clear_mipmaps();
+ image->clear_mipmaps();
}
- format |= image.get_format();
+ format |= image->get_format();
f->store_32(format);
- PoolVector<uint8_t> data = image.get_data();
+ PoolVector<uint8_t> data = image->get_data();
int dl = data.size();
PoolVector<uint8_t>::Read r = data.read();
@@ -317,8 +317,9 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
bool stream = p_options["stream"];
int size_limit = p_options["size_limit"];
- Image image;
- Error err = ImageLoader::load_image(p_source_file, &image);
+ Ref<Image> image;
+ image.instance();
+ Error err = ImageLoader::load_image(p_source_file, image);
if (err != OK)
return err;
@@ -336,28 +337,28 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
if (srgb == 1)
tex_flags |= Texture::FLAG_CONVERT_TO_LINEAR;
- if (size_limit > 0 && (image.get_width() > size_limit || image.get_height() > size_limit)) {
+ if (size_limit > 0 && (image->get_width() > size_limit || image->get_height() > size_limit)) {
//limit size
- if (image.get_width() >= image.get_height()) {
+ if (image->get_width() >= image->get_height()) {
int new_width = size_limit;
- int new_height = image.get_height() * new_width / image.get_width();
+ int new_height = image->get_height() * new_width / image->get_width();
- image.resize(new_width, new_height, Image::INTERPOLATE_CUBIC);
+ image->resize(new_width, new_height, Image::INTERPOLATE_CUBIC);
} else {
int new_height = size_limit;
- int new_width = image.get_width() * new_height / image.get_height();
+ int new_width = image->get_width() * new_height / image->get_height();
- image.resize(new_width, new_height, Image::INTERPOLATE_CUBIC);
+ image->resize(new_width, new_height, Image::INTERPOLATE_CUBIC);
}
}
if (fix_alpha_border) {
- image.fix_alpha_edges();
+ image->fix_alpha_edges();
}
if (premult_alpha) {
- image.premultiply_alpha();
+ image->premultiply_alpha();
}
bool detect_3d = p_options["detect_3d"];
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index 196eb48469..e782fc2978 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -30,7 +30,9 @@
#ifndef RESOURCEIMPORTTEXTURE_H
#define RESOURCEIMPORTTEXTURE_H
+#include "image.h"
#include "io/resource_import.h"
+
class StreamTexture;
class ResourceImporterTexture : public ResourceImporter {
@@ -78,7 +80,7 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const;
- void _save_stex(const Image &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb);
+ void _save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb);
virtual Error 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 = NULL);
diff --git a/editor/io_plugins/editor_texture_import_plugin.cpp b/editor/io_plugins/editor_texture_import_plugin.cpp
index d9b4a95045..e860866d24 100644
--- a/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -680,7 +680,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
};
- mode_check[i]=memnew( CheckBox );
+ mode_check[i]=memnew(CheckBox);
bg->add_child(mode_check[i]);
mode_check[i]->set_text(mode_name[i]);
mode_check[i]->connect("pressed",this,"_mode_changed",varray(i));
diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp
index 69a1f07fba..22b306f941 100644
--- a/editor/pane_drag.cpp
+++ b/editor/pane_drag.cpp
@@ -29,11 +29,12 @@
/*************************************************************************/
#include "pane_drag.h"
-void PaneDrag::_gui_input(const InputEvent &p_input) {
+void PaneDrag::_gui_input(const Ref<InputEvent> &p_input) {
- if (p_input.type == InputEvent::MOUSE_MOTION && p_input.mouse_motion.button_mask & BUTTON_MASK_LEFT) {
+ Ref<InputEventMouseMotion> mm = p_input;
+ if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
- emit_signal("dragged", Point2(p_input.mouse_motion.relative_x, p_input.mouse_motion.relative_y));
+ emit_signal("dragged", Point2(mm->get_relative().x, mm->get_relative().y));
}
}
diff --git a/editor/pane_drag.h b/editor/pane_drag.h
index bd26621c83..7bd9feb63b 100644
--- a/editor/pane_drag.h
+++ b/editor/pane_drag.h
@@ -39,7 +39,7 @@ class PaneDrag : public Control {
bool mouse_over;
protected:
- void _gui_input(const InputEvent &p_input);
+ void _gui_input(const Ref<InputEvent> &p_input);
void _notification(int p_what);
virtual Size2 get_minimum_size() const;
static void _bind_methods();
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index b4398427f8..17fb953f3f 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -51,7 +51,7 @@ void AnimationPlayerEditor::_node_removed(Node *p_node) {
}
}
-void AnimationPlayerEditor::_gui_input(InputEvent p_event) {
+void AnimationPlayerEditor::_gui_input(Ref<InputEvent> p_event) {
}
void AnimationPlayerEditor::_notification(int p_what) {
@@ -118,7 +118,14 @@ void AnimationPlayerEditor::_notification(int p_what) {
blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
- // nodename->set_icon(get_icon("AnimationPlayer", "EditorIcons"));
+ /*
+ anim_editor_load->set_normal_texture( get_icon("AnimGet","EditorIcons"));
+ anim_editor_store->set_normal_texture( get_icon("AnimSet","EditorIcons"));
+ anim_editor_load->set_pressed_texture( get_icon("AnimGet","EditorIcons"));
+ anim_editor_store->set_pressed_texture( get_icon("AnimSet","EditorIcons"));
+ anim_editor_load->set_hover_texture( get_icon("AnimGetHl","EditorIcons"));
+ anim_editor_store->set_hover_texture( get_icon("AnimSetHl","EditorIcons"));
+*/
get_tree()->connect("node_removed", this, "_node_removed");
}
@@ -781,10 +788,6 @@ void AnimationPlayerEditor::_update_player() {
player->get_animation_list(&animlist);
animation->clear();
- if (player)
- nodename->set_text(player->get_name());
- else
- nodename->set_text(TTR("No player selected"));
add_anim->set_disabled(player == NULL);
load_anim->set_disabled(player == NULL);
@@ -1157,14 +1160,15 @@ void AnimationPlayerEditor::_animation_save_menu(int p_option) {
}
}
-void AnimationPlayerEditor::_unhandled_key_input(const InputEvent &p_ev) {
+void AnimationPlayerEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
- if (is_visible_in_tree() && p_ev.type == InputEvent::KEY && p_ev.key.pressed && !p_ev.key.echo && !p_ev.key.mod.alt && !p_ev.key.mod.control && !p_ev.key.mod.meta) {
+ Ref<InputEventKey> k = p_ev;
+ if (is_visible_in_tree() && k.is_valid() && k->is_pressed() && !k->is_echo() && !k->get_alt() && !k->get_control() && !k->get_metakey()) {
- switch (p_ev.key.scancode) {
+ switch (k->get_scancode()) {
case KEY_A: {
- if (!p_ev.key.mod.shift)
+ if (!k->get_shift())
_play_bw_from_pressed();
else
_play_bw_pressed();
@@ -1173,7 +1177,7 @@ void AnimationPlayerEditor::_unhandled_key_input(const InputEvent &p_ev) {
_stop_pressed();
} break;
case KEY_D: {
- if (!p_ev.key.mod.shift)
+ if (!k->get_shift())
_play_from_pressed();
else
_play_pressed();
@@ -1358,14 +1362,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
//tool_anim->get_popup()->add_item("Edit Anim Resource",TOOL_PASTE_ANIM);
hb->add_child(tool_anim);
- hb->add_child(memnew(VSeparator));
- nodename_icon = memnew(TextureRect);
- nodename_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
- hb->add_child(nodename_icon);
- nodename = memnew(Label);
- hb->add_child(nodename);
pin = memnew(ToolButton);
- pin->set_tooltip(TTR("Keep this animation selected?"));
pin->set_toggle_mode(true);
hb->add_child(pin);
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index d80f9dccf2..ceaa73569a 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -85,8 +85,6 @@ class AnimationPlayerEditor : public VBoxContainer {
Button *remove_anim;
MenuButton *tool_anim;
ToolButton *pin;
- Label *nodename;
- TextureRect *nodename_icon;
SpinBox *frame;
LineEdit *scale;
LineEdit *name;
@@ -160,7 +158,7 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_key_editor_anim_len_changed(float p_new);
void _animation_key_editor_anim_step_changed(float p_len);
- void _unhandled_key_input(const InputEvent &p_ev);
+ void _unhandled_key_input(const Ref<InputEvent> &p_ev);
void _animation_tool_menu(int p_option);
void _animation_save_menu(int p_option);
@@ -168,7 +166,7 @@ class AnimationPlayerEditor : public VBoxContainer {
protected:
void _notification(int p_what);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
void _node_removed(Node *p_node);
static void _bind_methods();
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index e126cdf40f..fccd527ed6 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -735,139 +735,139 @@ void AnimationTreeEditor::_node_edit_property(const StringName& p_node) {
}
#endif
-void AnimationTreeEditor::_gui_input(InputEvent p_event) {
+void AnimationTreeEditor::_gui_input(Ref<InputEvent> p_event) {
- switch (p_event.type) {
+ Ref<InputEventMouseButton> mb = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
- if (p_event.mouse_button.pressed) {
+ if (mb->is_pressed()) {
- if (p_event.mouse_button.button_index == 1) {
- click_pos = Point2(p_event.mouse_button.x, p_event.mouse_button.y);
- click_motion = click_pos;
- click_type = _locate_click(click_pos, &click_node, &click_slot);
- if (click_type != CLICK_NONE) {
+ if (mb->get_button_index() == 1) {
+ click_pos = Point2(mb->get_pos().x, mb->get_pos().y);
+ click_motion = click_pos;
+ click_type = _locate_click(click_pos, &click_node, &click_slot);
+ if (click_type != CLICK_NONE) {
- order.erase(click_node);
- order.push_back(click_node);
- update();
- }
+ order.erase(click_node);
+ order.push_back(click_node);
+ update();
+ }
- switch (click_type) {
- case CLICK_INPUT_SLOT: {
- click_pos = _get_slot_pos(click_node, true, click_slot);
- } break;
- case CLICK_OUTPUT_SLOT: {
- click_pos = _get_slot_pos(click_node, false, click_slot);
- } break;
- case CLICK_PARAMETER: {
-
- edited_node = click_node;
- renaming_edit = false;
- _popup_edit_dialog();
- //open editor
- //_node_edit_property(click_node);
- } break;
- default: {}
- }
+ switch (click_type) {
+ case CLICK_INPUT_SLOT: {
+ click_pos = _get_slot_pos(click_node, true, click_slot);
+ } break;
+ case CLICK_OUTPUT_SLOT: {
+ click_pos = _get_slot_pos(click_node, false, click_slot);
+ } break;
+ case CLICK_PARAMETER: {
+
+ edited_node = click_node;
+ renaming_edit = false;
+ _popup_edit_dialog();
+ //open editor
+ //_node_edit_property(click_node);
+ } break;
+ default: {}
}
- if (p_event.mouse_button.button_index == 2) {
-
- if (click_type != CLICK_NONE) {
- click_type = CLICK_NONE;
- update();
- } else {
- // try to disconnect/remove
-
- Point2 rclick_pos = Point2(p_event.mouse_button.x, p_event.mouse_button.y);
- rclick_type = _locate_click(rclick_pos, &rclick_node, &rclick_slot);
- if (rclick_type == CLICK_INPUT_SLOT || rclick_type == CLICK_OUTPUT_SLOT) {
-
- node_popup->clear();
- node_popup->add_item(TTR("Disconnect"), NODE_DISCONNECT);
- if (anim_tree->node_get_type(rclick_node) == AnimationTreePlayer::NODE_TRANSITION) {
- node_popup->add_item(TTR("Add Input"), NODE_ADD_INPUT);
- if (rclick_type == CLICK_INPUT_SLOT) {
- if (anim_tree->transition_node_has_input_auto_advance(rclick_node, rclick_slot))
- node_popup->add_item(TTR("Clear Auto-Advance"), NODE_CLEAR_AUTOADVANCE);
- else
- node_popup->add_item(TTR("Set Auto-Advance"), NODE_SET_AUTOADVANCE);
- node_popup->add_item(TTR("Delete Input"), NODE_DELETE_INPUT);
- }
- }
+ }
+ if (mb->get_button_index() == 2) {
- node_popup->set_position(rclick_pos + get_global_position());
- node_popup->popup();
+ if (click_type != CLICK_NONE) {
+ click_type = CLICK_NONE;
+ update();
+ } else {
+ // try to disconnect/remove
+
+ Point2 rclick_pos = Point2(mb->get_pos().x, mb->get_pos().y);
+ rclick_type = _locate_click(rclick_pos, &rclick_node, &rclick_slot);
+ if (rclick_type == CLICK_INPUT_SLOT || rclick_type == CLICK_OUTPUT_SLOT) {
+
+ node_popup->clear();
+ node_popup->add_item(TTR("Disconnect"), NODE_DISCONNECT);
+ if (anim_tree->node_get_type(rclick_node) == AnimationTreePlayer::NODE_TRANSITION) {
+ node_popup->add_item(TTR("Add Input"), NODE_ADD_INPUT);
+ if (rclick_type == CLICK_INPUT_SLOT) {
+ if (anim_tree->transition_node_has_input_auto_advance(rclick_node, rclick_slot))
+ node_popup->add_item(TTR("Clear Auto-Advance"), NODE_CLEAR_AUTOADVANCE);
+ else
+ node_popup->add_item(TTR("Set Auto-Advance"), NODE_SET_AUTOADVANCE);
+ node_popup->add_item(TTR("Delete Input"), NODE_DELETE_INPUT);
+ }
}
- if (rclick_type == CLICK_NODE) {
- node_popup->clear();
- node_popup->add_item(TTR("Rename"), NODE_RENAME);
- node_popup->add_item(TTR("Remove"), NODE_ERASE);
- if (anim_tree->node_get_type(rclick_node) == AnimationTreePlayer::NODE_TRANSITION)
- node_popup->add_item(TTR("Add Input"), NODE_ADD_INPUT);
- node_popup->set_position(rclick_pos + get_global_position());
- node_popup->popup();
- }
+ node_popup->set_position(rclick_pos + get_global_position());
+ node_popup->popup();
}
- }
- } else {
- if (p_event.mouse_button.button_index == 1 && click_type != CLICK_NONE) {
+ if (rclick_type == CLICK_NODE) {
+ node_popup->clear();
+ node_popup->add_item(TTR("Rename"), NODE_RENAME);
+ node_popup->add_item(TTR("Remove"), NODE_ERASE);
+ if (anim_tree->node_get_type(rclick_node) == AnimationTreePlayer::NODE_TRANSITION)
+ node_popup->add_item(TTR("Add Input"), NODE_ADD_INPUT);
+ node_popup->set_position(rclick_pos + get_global_position());
+ node_popup->popup();
+ }
+ }
+ }
+ } else {
- switch (click_type) {
- case CLICK_INPUT_SLOT:
- case CLICK_OUTPUT_SLOT: {
+ if (mb->get_button_index() == 1 && click_type != CLICK_NONE) {
- Point2 dst_click_pos = Point2(p_event.mouse_button.x, p_event.mouse_button.y);
- StringName id;
- int slot;
- ClickType dst_click_type = _locate_click(dst_click_pos, &id, &slot);
+ switch (click_type) {
+ case CLICK_INPUT_SLOT:
+ case CLICK_OUTPUT_SLOT: {
- if (dst_click_type == CLICK_INPUT_SLOT && click_type == CLICK_OUTPUT_SLOT) {
+ Point2 dst_click_pos = Point2(mb->get_pos().x, mb->get_pos().y);
+ StringName id;
+ int slot;
+ ClickType dst_click_type = _locate_click(dst_click_pos, &id, &slot);
- anim_tree->connect_nodes(click_node, id, slot);
- }
- if (click_type == CLICK_INPUT_SLOT && dst_click_type == CLICK_OUTPUT_SLOT) {
+ if (dst_click_type == CLICK_INPUT_SLOT && click_type == CLICK_OUTPUT_SLOT) {
- anim_tree->connect_nodes(id, click_node, click_slot);
- }
+ anim_tree->connect_nodes(click_node, id, slot);
+ }
+ if (click_type == CLICK_INPUT_SLOT && dst_click_type == CLICK_OUTPUT_SLOT) {
- } break;
- case CLICK_NODE: {
- Point2 new_pos = anim_tree->node_get_pos(click_node) + (click_motion - click_pos);
- if (new_pos.x < 5)
- new_pos.x = 5;
- if (new_pos.y < 5)
- new_pos.y = 5;
- anim_tree->node_set_pos(click_node, new_pos);
-
- } break;
- default: {}
- }
+ anim_tree->connect_nodes(id, click_node, click_slot);
+ }
- click_type = CLICK_NONE;
- update();
+ } break;
+ case CLICK_NODE: {
+ Point2 new_pos = anim_tree->node_get_pos(click_node) + (click_motion - click_pos);
+ if (new_pos.x < 5)
+ new_pos.x = 5;
+ if (new_pos.y < 5)
+ new_pos.y = 5;
+ anim_tree->node_set_pos(click_node, new_pos);
+
+ } break;
+ default: {}
}
+
+ click_type = CLICK_NONE;
+ update();
}
}
+ }
- case InputEvent::MOUSE_MOTION: {
+ Ref<InputEventMouseMotion> mm = p_event;
- if (p_event.mouse_motion.button_mask & 1 && click_type != CLICK_NONE) {
+ if (mm.is_valid()) {
- click_motion = Point2(p_event.mouse_button.x, p_event.mouse_button.y);
- update();
- }
- if ((p_event.mouse_motion.button_mask & 4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
+ if (mm->get_button_mask() & 1 && click_type != CLICK_NONE) {
- h_scroll->set_value(h_scroll->get_value() - p_event.mouse_motion.relative_x);
- v_scroll->set_value(v_scroll->get_value() - p_event.mouse_motion.relative_y);
- update();
- }
+ click_motion = Point2(mm->get_pos().x, mm->get_pos().y);
+ update();
+ }
+ if ((mm->get_button_mask() & 4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
- } break;
+ h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x);
+ v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y);
+ update();
+ }
}
}
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index 8bbe22387b..785f042dd9 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -155,7 +155,7 @@ class AnimationTreeEditor : public Control {
protected:
void _notification(int p_what);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
static void _bind_methods();
public:
diff --git a/editor/plugins/baked_light_baker.h b/editor/plugins/baked_light_baker.h
index 5f32e236c0..123812fc07 100644
--- a/editor/plugins/baked_light_baker.h
+++ b/editor/plugins/baked_light_baker.h
@@ -31,7 +31,7 @@
#define BAKED_LIGHT_BAKER_H
#include "os/thread.h"
-#include "scene/3d/baked_light_instance.h"
+
#include "scene/3d/light.h"
#include "scene/3d/mesh_instance.h"
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 27be6ea8f0..a626dffc3c 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -204,17 +204,19 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
undo_redo->commit_action();
}
-void CanvasItemEditor::_unhandled_key_input(const InputEvent &p_ev) {
+void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
+
+ Ref<InputEventKey> k = p_ev;
if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
- if (p_ev.key.mod.control)
+ if (k->get_control())
return;
- if (p_ev.key.pressed && !p_ev.key.echo && p_ev.key.scancode == KEY_V && drag == DRAG_NONE && can_move_pivot) {
+ if (k->is_pressed() && !k->is_echo() && k->get_scancode() == KEY_V && drag == DRAG_NONE && can_move_pivot) {
- if (p_ev.key.mod.shift) {
+ if (k->get_shift()) {
//move drag pivot
drag = DRAG_PIVOT;
} else if (!Input::get_singleton()->is_mouse_button_pressed(0)) {
@@ -958,9 +960,9 @@ bool CanvasItemEditor::get_remove_list(List<Node *> *p_list) {
return false; //!p_list->empty();
}
-void CanvasItemEditor::_list_select(const InputEventMouseButton &b) {
+void CanvasItemEditor::_list_select(const Ref<InputEventMouseButton> &b) {
- Point2 click = Point2(b.x, b.y);
+ Point2 click = b->get_pos();
Node *scene = editor->get_edited_scene();
if (!scene)
@@ -982,7 +984,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton &b) {
CanvasItem *item = selection_results[0].item;
selection_results.clear();
- additive_selection = b.mod.shift;
+ additive_selection = b->get_shift();
if (!_select(item, click, additive_selection, false))
return;
@@ -1012,9 +1014,9 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton &b) {
"\nType: " + item->get_class() + "\nPath: " + node_path);
}
- additive_selection = b.mod.shift;
+ additive_selection = b->get_shift();
- selection_menu->set_global_position(Vector2(b.global_x, b.global_y));
+ selection_menu->set_global_position(b->get_global_pos());
selection_menu->popup();
selection_menu->call_deferred("grab_click_focus");
selection_menu->set_invalidate_click_until_motion();
@@ -1023,7 +1025,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton &b) {
}
}
-void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
+void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
{
@@ -1039,19 +1041,19 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> b = p_event;
- const InputEventMouseButton &b = p_event.mouse_button;
+ if (b.is_valid()) {
- if (b.button_index == BUTTON_WHEEL_DOWN) {
+ if (b->get_button_index() == BUTTON_WHEEL_DOWN) {
if (zoom < MIN_ZOOM)
return;
float prev_zoom = zoom;
- zoom = zoom * (1 - (0.05 * b.factor));
+ zoom = zoom * (1 - (0.05 * b->get_factor()));
{
- Point2 ofs(b.x, b.y);
+ Point2 ofs = b->get_pos();
ofs = ofs / prev_zoom - ofs / zoom;
h_scroll->set_value(h_scroll->get_value() + ofs.x);
v_scroll->set_value(v_scroll->get_value() + ofs.y);
@@ -1061,15 +1063,15 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
return;
}
- if (b.button_index == BUTTON_WHEEL_UP) {
+ if (b->get_button_index() == BUTTON_WHEEL_UP) {
if (zoom > MAX_ZOOM)
return;
float prev_zoom = zoom;
- zoom = zoom * ((0.95 + (0.05 * b.factor)) / 0.95);
+ zoom = zoom * ((0.95 + (0.05 * b->get_factor())) / 0.95);
{
- Point2 ofs(b.x, b.y);
+ Point2 ofs = b->get_pos();
ofs = ofs / prev_zoom - ofs / zoom;
h_scroll->set_value(h_scroll->get_value() + ofs.x);
v_scroll->set_value(v_scroll->get_value() + ofs.y);
@@ -1080,9 +1082,9 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
return;
}
- if (b.button_index == BUTTON_RIGHT) {
+ if (b->get_button_index() == BUTTON_RIGHT) {
- if (b.pressed && (tool == TOOL_SELECT && b.mod.alt)) {
+ if (b->is_pressed() && (tool == TOOL_SELECT && b->get_alt())) {
_list_select(b);
return;
@@ -1129,7 +1131,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
} else if (box_selecting) {
box_selecting = false;
viewport->update();
- } else if (b.pressed) {
+ } else if (b->is_pressed()) {
#if 0
ref_item = NULL;
Node* scene = get_scene()->get_root_node()->cast_to<EditorNode>()->get_edited_scene();
@@ -1145,16 +1147,16 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
return;
*/
- if (b.button_index == BUTTON_LEFT && tool == TOOL_LIST_SELECT) {
- if (b.pressed)
+ if (b->get_button_index() == BUTTON_LEFT && tool == TOOL_LIST_SELECT) {
+ if (b->is_pressed())
_list_select(b);
return;
}
- if (b.button_index == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) {
- if (b.pressed) {
+ if (b->get_button_index() == BUTTON_LEFT && tool == TOOL_EDIT_PIVOT) {
+ if (b->is_pressed()) {
- Point2 mouse_pos(b.x, b.y);
+ Point2 mouse_pos = b->get_pos();
mouse_pos = transform.affine_inverse().xform(mouse_pos);
mouse_pos = snap_point(mouse_pos);
_edit_set_pivot(mouse_pos);
@@ -1162,10 +1164,10 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
return;
}
- if (tool == TOOL_PAN || b.button_index != BUTTON_LEFT || Input::get_singleton()->is_key_pressed(KEY_SPACE))
+ if (tool == TOOL_PAN || b->get_button_index() != BUTTON_LEFT || Input::get_singleton()->is_key_pressed(KEY_SPACE))
return;
- if (!b.pressed) {
+ if (!b->is_pressed()) {
if (drag != DRAG_NONE) {
@@ -1227,7 +1229,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
if (box_selecting) {
#if 0
- if ( ! b.mod.shift ) _clear_canvas_items();
+ if ( ! b->get_shift() ) _clear_canvas_items();
if ( box_selection_end() ) return;
#endif
@@ -1272,8 +1274,8 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
E->get().to
};
- Vector2 p = Geometry::get_closest_point_to_segment_2d(Vector2(b.x, b.y), s);
- float d = p.distance_to(Vector2(b.x, b.y));
+ Vector2 p = Geometry::get_closest_point_to_segment_2d(b->get_pos(), s);
+ float d = p.distance_to(b->get_pos());
if (d < bone_width && d < closest_dist) {
Cbone = E;
closest_dist = d;
@@ -1340,9 +1342,9 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
CanvasItemEditorSelectedItem *se = editor_selection->get_node_editor_data<CanvasItemEditorSelectedItem>(canvas_item);
ERR_FAIL_COND(!se);
- Point2 click(b.x, b.y);
+ Point2 click = b->get_pos();
- if ((b.mod.control && tool == TOOL_SELECT) || tool == TOOL_ROTATE) {
+ if ((b->get_control() && tool == TOOL_SELECT) || tool == TOOL_ROTATE) {
drag = DRAG_ROTATE;
drag_from = transform.affine_inverse().xform(click);
@@ -1361,7 +1363,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
if (tool == TOOL_SELECT) {
drag = _find_drag_type(xform, rect, click, drag_point_from);
- if (b.doubleclick) {
+ if (b->is_doubleclick()) {
if (canvas_item->get_filename() != "" && canvas_item != editor->get_edited_scene()) {
@@ -1386,9 +1388,9 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
//multi canvas_item edit
- Point2 click = Point2(b.x, b.y);
+ Point2 click = b->get_pos();
- if ((b.mod.alt || tool == TOOL_MOVE) && get_item_count()) {
+ if ((b->get_alt() || tool == TOOL_MOVE) && get_item_count()) {
_prepare_drag(click);
viewport->update();
return;
@@ -1433,37 +1435,36 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
};
c = n->cast_to<CanvasItem>();
#if 0
- if ( b.pressed ) box_selection_start( click );
+ if ( b->is_pressed() ) box_selection_start( click );
#endif
- additive_selection = b.mod.shift;
+ additive_selection = b->get_shift();
if (!_select(c, click, additive_selection))
return;
}
- if (p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> m = p_event;
+ if (m.is_valid()) {
if (!viewport->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
viewport->call_deferred("grab_focus");
- const InputEventMouseMotion &m = p_event.mouse_motion;
-
if (box_selecting) {
- box_selecting_to = transform.affine_inverse().xform(Point2(m.x, m.y));
+ box_selecting_to = transform.affine_inverse().xform(m->get_pos());
viewport->update();
return;
}
if (drag == DRAG_NONE) {
- if ((m.button_mask & BUTTON_MASK_LEFT && tool == TOOL_PAN) || m.button_mask & BUTTON_MASK_MIDDLE || (m.button_mask & BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
+ if ((m->get_button_mask() & BUTTON_MASK_LEFT && tool == TOOL_PAN) || m->get_button_mask() & BUTTON_MASK_MIDDLE || (m->get_button_mask() & BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
Point2i relative;
if (bool(EditorSettings::get_singleton()->get("editors/2d/warped_mouse_panning"))) {
relative = Input::get_singleton()->warp_mouse_motion(m, viewport->get_global_rect());
} else {
- relative = Point2i(m.relative_x, m.relative_y);
+ relative = m->get_relative();
}
h_scroll->set_value(h_scroll->get_value() - relative.x / zoom);
@@ -1496,7 +1497,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
}
Vector2 dfrom = drag_from;
- Vector2 dto = transform.affine_inverse().xform(Point2(m.x, m.y));
+ Vector2 dto = transform.affine_inverse().xform(m->get_pos());
if (canvas_item->has_meta("_edit_lock_"))
continue;
@@ -1530,8 +1531,8 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
continue;
}
- bool uniform = m.mod.shift;
- bool symmetric = m.mod.alt;
+ bool uniform = m->get_shift();
+ bool symmetric = m->get_alt();
dto = dto - (drag == DRAG_ALL || drag == DRAG_NODE_2D ? drag_from - drag_point_from : Vector2(0, 0));
@@ -1765,25 +1766,25 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::KEY) {
+ Ref<InputEventKey> k = p_event;
- const InputEventKey &k = p_event.key;
+ if (k.is_valid()) {
- if (k.pressed && drag == DRAG_NONE) {
+ if (k->is_pressed() && drag == DRAG_NONE) {
KeyMoveMODE move_mode = MOVE_VIEW_BASE;
- if (k.mod.alt) move_mode = MOVE_LOCAL_BASE;
- if (k.mod.control || k.mod.meta) move_mode = MOVE_LOCAL_WITH_ROT;
-
- if (k.scancode == KEY_UP)
- _key_move(Vector2(0, -1), k.mod.shift, move_mode);
- else if (k.scancode == KEY_DOWN)
- _key_move(Vector2(0, 1), k.mod.shift, move_mode);
- else if (k.scancode == KEY_LEFT)
- _key_move(Vector2(-1, 0), k.mod.shift, move_mode);
- else if (k.scancode == KEY_RIGHT)
- _key_move(Vector2(1, 0), k.mod.shift, move_mode);
- else if (k.scancode == KEY_ESCAPE) {
+ if (k->get_alt()) move_mode = MOVE_LOCAL_BASE;
+ if (k->get_control() || k->get_metakey()) move_mode = MOVE_LOCAL_WITH_ROT;
+
+ if (k->get_scancode() == KEY_UP)
+ _key_move(Vector2(0, -1), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_DOWN)
+ _key_move(Vector2(0, 1), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_LEFT)
+ _key_move(Vector2(-1, 0), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_RIGHT)
+ _key_move(Vector2(1, 0), k->get_shift(), move_mode);
+ else if (k->get_scancode() == KEY_ESCAPE) {
editor_selection->clear();
viewport->update();
} else
@@ -1837,7 +1838,7 @@ void CanvasItemEditor::_viewport_draw() {
if (h_scroll->is_visible_in_tree())
size.height -= h_scroll->get_size().height;
- get_stylebox("EditorFocus", "EditorStyles")->draw(ci, Rect2(Point2(), size));
+ get_stylebox("Focus", "EditorStyles")->draw(ci, Rect2(Point2(), size));
}
Ref<Texture> lock = get_icon("Lock", "EditorIcons");
@@ -3123,7 +3124,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
editor_selection->connect("selection_changed", this, "update");
hb = memnew(HBoxContainer);
- hb->add_style_override("bg", editor->get_gui_base()->get_stylebox("panel", "PanelContainer"));
add_child(hb);
hb->set_area_as_parent_rect();
@@ -3300,8 +3300,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_hb->hide();
key_loc_button = memnew(Button("loc"));
- key_loc_button = memnew(Button("loc"));
- key_loc_button->set_flat(true);
key_loc_button->set_toggle_mode(true);
key_loc_button->set_pressed(true);
key_loc_button->set_focus_mode(FOCUS_NONE);
@@ -3310,7 +3308,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_loc_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS));
animation_hb->add_child(key_loc_button);
key_rot_button = memnew(Button("rot"));
- key_rot_button->set_flat(true);
key_rot_button->set_toggle_mode(true);
key_rot_button->set_pressed(true);
key_rot_button->set_focus_mode(FOCUS_NONE);
@@ -3319,14 +3316,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_rot_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT));
animation_hb->add_child(key_rot_button);
key_scale_button = memnew(Button("scl"));
- key_scale_button->set_flat(true);
key_scale_button->set_toggle_mode(true);
key_scale_button->set_focus_mode(FOCUS_NONE);
key_scale_button->add_color_override("font_color", Color(1, 0.6, 0.6));
key_scale_button->add_color_override("font_color_pressed", Color(0.6, 1, 0.6));
key_scale_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE));
animation_hb->add_child(key_scale_button);
- key_insert_button = memnew(ToolButton);
+ key_insert_button = memnew(Button);
key_insert_button->set_focus_mode(FOCUS_NONE);
key_insert_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_KEY));
key_insert_button->set_tooltip(TTR("Insert Keys"));
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 7f09b92f4c..22fa5b5db8 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -322,7 +322,7 @@ class CanvasItemEditor : public VBoxContainer {
void _clear_canvas_items();
void _visibility_changed(ObjectID p_canvas_item);
void _key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE p_move_mode);
- void _list_select(const InputEventMouseButton &b);
+ void _list_select(const Ref<InputEventMouseButton> &b);
DragType _find_drag_type(const Transform2D &p_xform, const Rect2 &p_local_rect, const Point2 &p_click, Vector2 &r_point);
void _prepare_drag(const Point2 &p_click_pos);
@@ -352,9 +352,9 @@ class CanvasItemEditor : public VBoxContainer {
int get_item_count();
void _keying_changed();
- void _unhandled_key_input(const InputEvent &p_ev);
+ void _unhandled_key_input(const Ref<InputEvent> &p_ev);
- void _viewport_gui_input(const InputEvent &p_event);
+ void _viewport_gui_input(const Ref<InputEvent> &p_event);
void _viewport_draw();
void _focus_selection(int p_op);
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index ae426ba29e..b7cfcaae02 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -94,213 +94,208 @@ void CollisionPolygon2DEditor::_wip_close() {
edited_point = -1;
}
-bool CollisionPolygon2DEditor::forward_gui_input(const InputEvent &p_event) {
+bool CollisionPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node)
return false;
- switch (p_event.type) {
+ Ref<InputEventMouseButton> mb;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
+ Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- const InputEventMouseButton &mb = p_event.mouse_button;
+ Vector2 gpoint = mb->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
- Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Vector<Vector2> poly = node->get_polygon();
- Vector2 gpoint = Point2(mb.x, mb.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
+ //first check if a point is to be added (segment split)
+ real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
- Vector<Vector2> poly = node->get_polygon();
+ switch (mode) {
- //first check if a point is to be added (segment split)
- real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
+ case MODE_CREATE: {
- switch (mode) {
+ if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
- case MODE_CREATE: {
+ if (!wip_active) {
- if (mb.button_index == BUTTON_LEFT && mb.pressed) {
+ wip.clear();
+ wip.push_back(cpoint);
+ wip_active = true;
+ edited_point_pos = cpoint;
+ canvas_item_editor->get_viewport_control()->update();
+ edited_point = 1;
+ return true;
+ } else {
- if (!wip_active) {
+ if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
+ //wip closed
+ _wip_close();
- wip.clear();
- wip.push_back(cpoint);
- wip_active = true;
- edited_point_pos = cpoint;
- canvas_item_editor->get_viewport_control()->update();
- edited_point = 1;
return true;
} else {
- if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
- //wip closed
- _wip_close();
-
- return true;
- } else {
-
- wip.push_back(cpoint);
- edited_point = wip.size();
- canvas_item_editor->get_viewport_control()->update();
- return true;
+ wip.push_back(cpoint);
+ edited_point = wip.size();
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
- //add wip point
- }
+ //add wip point
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && wip_active) {
- _wip_close();
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
+ _wip_close();
+ }
- } break;
-
- case MODE_EDIT: {
+ } break;
- if (mb.button_index == BUTTON_LEFT) {
- if (mb.pressed) {
+ case MODE_EDIT: {
- if (mb.mod.control) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ if (mb->is_pressed()) {
- if (poly.size() < 3) {
+ if (mb->get_control()) {
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_undo_method(node, "set_polygon", poly);
- poly.push_back(cpoint);
- undo_redo->add_do_method(node, "set_polygon", poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- return true;
- }
-
- //search edges
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
-
- Vector2 points[2] = { xform.xform(poly[i]),
- xform.xform(poly[(i + 1) % poly.size()]) };
-
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
- if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
- continue; //not valid to reuse point
-
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
- }
- }
-
- if (closest_idx >= 0) {
+ if (poly.size() < 3) {
- pre_move_edit = poly;
- poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos));
- edited_point = closest_idx + 1;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- node->set_polygon(poly);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
- } else {
+ undo_redo->create_action(TTR("Edit Poly"));
+ undo_redo->add_undo_method(node, "set_polygon", poly);
+ poly.push_back(cpoint);
+ undo_redo->add_do_method(node, "set_polygon", poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
- //look for points to move
+ //search edges
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
+ Vector2 points[2] = { xform.xform(poly[i]),
+ xform.xform(poly[(i + 1) % poly.size()]) };
- Vector2 cp = xform.xform(poly[i]);
+ Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
+ if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
+ continue; //not valid to reuse point
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
- }
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
}
+ }
- if (closest_idx >= 0) {
+ if (closest_idx >= 0) {
- pre_move_edit = poly;
- edited_point = closest_idx;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
+ pre_move_edit = poly;
+ poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos));
+ edited_point = closest_idx + 1;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ node->set_polygon(poly);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
} else {
- if (edited_point != -1) {
+ //look for points to move
- //apply
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
- poly[edited_point] = edited_point_pos;
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_do_method(node, "set_polygon", poly);
- undo_redo->add_undo_method(node, "set_polygon", pre_move_edit);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ Vector2 cp = xform.xform(poly[i]);
- edited_point = -1;
- return true;
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
+ }
}
- }
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && edited_point == -1) {
-
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
- Vector2 cp = xform.xform(poly[i]);
+ if (closest_idx >= 0) {
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
+ pre_move_edit = poly;
+ edited_point = closest_idx;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
}
+ } else {
+
+ if (edited_point != -1) {
- if (closest_idx >= 0) {
+ //apply
- undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
- undo_redo->add_undo_method(node, "set_polygon", poly);
- poly.remove(closest_idx);
+ ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
+ poly[edited_point] = edited_point_pos;
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node, "set_polygon", poly);
+ undo_redo->add_undo_method(node, "set_polygon", pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->commit_action();
+
+ edited_point = -1;
return true;
}
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
- } break;
- }
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- } break;
- case InputEvent::MOUSE_MOTION: {
+ Vector2 cp = xform.xform(poly[i]);
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
+ }
+ }
- if (edited_point != -1 && (wip_active || mm.button_mask & BUTTON_MASK_LEFT)) {
+ if (closest_idx >= 0) {
- Vector2 gpoint = Point2(mm.x, mm.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
+ undo_redo->add_undo_method(node, "set_polygon", poly);
+ poly.remove(closest_idx);
+ undo_redo->add_do_method(node, "set_polygon", poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
+ }
- canvas_item_editor->get_viewport_control()->update();
- }
+ } break;
+ }
+ }
- } break;
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
+
+ if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
+
+ Vector2 gpoint = mm->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+
+ canvas_item_editor->get_viewport_control()->update();
+ }
}
return false;
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h
index babe653581..382c0d6c37 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -80,7 +80,7 @@ protected:
static void _bind_methods();
public:
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_collision_polygon);
CollisionPolygon2DEditor(EditorNode *p_editor);
};
@@ -93,7 +93,7 @@ class CollisionPolygon2DEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "CollisionPolygon2D"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp
index fdb1bf984e..c89e6f59a4 100644
--- a/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -131,7 +131,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
- Vector2 gpoint=Point2(mb.x,mb.y);
+ Vector2 gpoint=Point2(mb->get_pos().x,mb->get_pos().y);
Vector3 ray_from = p_camera->project_ray_origin(gpoint);
Vector3 ray_dir = p_camera->project_ray_normal(gpoint);
@@ -156,7 +156,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
case MODE_CREATE: {
- if (mb.button_index==BUTTON_LEFT && mb.pressed) {
+ if (mb->get_button_index()==BUTTON_LEFT && mb->is_pressed()) {
if (!wip_active) {
@@ -186,7 +186,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
//add wip point
}
}
- } else if (mb.button_index==BUTTON_RIGHT && mb.pressed && wip_active) {
+ } else if (mb->get_button_index()==BUTTON_RIGHT && mb->is_pressed() && wip_active) {
_wip_close();
}
@@ -196,10 +196,10 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
case MODE_EDIT: {
- if (mb.button_index==BUTTON_LEFT) {
- if (mb.pressed) {
+ if (mb->get_button_index()==BUTTON_LEFT) {
+ if (mb->is_pressed()) {
- if (mb.mod.control) {
+ if (mb->get_control()) {
if (poly.size() < 3) {
@@ -297,7 +297,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
return true;
}
}
- } if (mb.button_index==BUTTON_RIGHT && mb.pressed && edited_point==-1) {
+ } if (mb->get_button_index()==BUTTON_RIGHT && mb->is_pressed() && edited_point==-1) {
@@ -344,7 +344,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In
const InputEventMouseMotion &mm=p_event.mouse_motion;
- if (edited_point!=-1 && (wip_active || mm.button_mask&BUTTON_MASK_LEFT)) {
+ if (edited_point!=-1 && (wip_active || mm->get_button_mask()&BUTTON_MASK_LEFT)) {
Vector2 gpoint = Point2(mm.x,mm.y);
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 70cc81efb0..e2184c6158 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -302,7 +302,7 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
undo_redo->commit_action();
}
-bool CollisionShape2DEditor::forward_gui_input(const InputEvent &p_event) {
+bool CollisionShape2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node) {
return false;
@@ -316,68 +316,66 @@ bool CollisionShape2DEditor::forward_gui_input(const InputEvent &p_event) {
return false;
}
- switch (p_event.type) {
- case InputEvent::MOUSE_BUTTON: {
- const InputEventMouseButton &mb = p_event.mouse_button;
+ Ref<InputEventMouseButton> mb = p_event;
- Transform2D gt = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ if (mb.is_valid()) {
- Point2 gpoint(mb.x, mb.y);
+ Transform2D gt = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- if (mb.button_index == BUTTON_LEFT) {
- if (mb.pressed) {
- for (int i = 0; i < handles.size(); i++) {
- if (gt.xform(handles[i]).distance_to(gpoint) < 8) {
- edit_handle = i;
+ Point2 gpoint(mb->get_pos().x, mb->get_pos().y);
- break;
- }
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ if (mb->is_pressed()) {
+ for (int i = 0; i < handles.size(); i++) {
+ if (gt.xform(handles[i]).distance_to(gpoint) < 8) {
+ edit_handle = i;
+
+ break;
}
+ }
- if (edit_handle == -1) {
- pressed = false;
+ if (edit_handle == -1) {
+ pressed = false;
- return false;
- }
+ return false;
+ }
- original = get_handle_value(edit_handle);
- pressed = true;
+ original = get_handle_value(edit_handle);
+ pressed = true;
- return true;
+ return true;
- } else {
- if (pressed) {
- commit_handle(edit_handle, original);
+ } else {
+ if (pressed) {
+ commit_handle(edit_handle, original);
- edit_handle = -1;
- pressed = false;
+ edit_handle = -1;
+ pressed = false;
- return true;
- }
+ return true;
}
}
+ }
- return false;
-
- } break;
+ return false;
+ }
- case InputEvent::MOUSE_MOTION: {
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ Ref<InputEventMouseMotion> mm = p_event;
- if (edit_handle == -1 || !pressed) {
- return false;
- }
+ if (mm.is_valid()) {
- Point2 gpoint = Point2(mm.x, mm.y);
- Point2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
+ if (edit_handle == -1 || !pressed) {
+ return false;
+ }
- set_handle(edit_handle, cpoint);
+ Point2 gpoint = mm->get_pos();
+ Point2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
- return true;
+ set_handle(edit_handle, cpoint);
- } break;
+ return true;
}
return false;
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index bbd94516a8..09aefc65c0 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -74,7 +74,7 @@ protected:
static void _bind_methods();
public:
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_node);
CollisionShape2DEditor(EditorNode *p_editor);
@@ -87,7 +87,7 @@ class CollisionShape2DEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return collision_shape_2d_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return collision_shape_2d_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "CollisionShape2D"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index f3ad5c0fd1..6dd94863a1 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -33,9 +33,10 @@
#include "os/keyboard.h"
#include "spatial_editor_plugin.h"
-void CurveTextureEdit::_gui_input(const InputEvent &p_event) {
+void CurveTextureEdit::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode == KEY_DELETE && grabbed != -1) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && grabbed != -1) {
points.remove(grabbed);
grabbed = -1;
@@ -44,7 +45,9 @@ void CurveTextureEdit::_gui_input(const InputEvent &p_event) {
accept_event();
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed) {
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
update();
Ref<Font> font = get_font("font", "Label");
@@ -54,7 +57,7 @@ void CurveTextureEdit::_gui_input(const InputEvent &p_event) {
Vector2 size = get_size();
size.y -= font_h;
- Point2 p = Vector2(p_event.mouse_button.x, p_event.mouse_button.y) / size;
+ Point2 p = Vector2(mb->get_pos().x, mb->get_pos().y) / size;
p.y = CLAMP(1.0 - p.y, 0, 1) * (max - min) + min;
grabbed = -1;
grabbing = true;
@@ -90,7 +93,7 @@ void CurveTextureEdit::_gui_input(const InputEvent &p_event) {
emit_signal("curve_changed");
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && !p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
if (grabbing) {
grabbing = false;
@@ -99,14 +102,16 @@ void CurveTextureEdit::_gui_input(const InputEvent &p_event) {
update();
}
- if (p_event.type == InputEvent::MOUSE_MOTION && grabbing && grabbed != -1) {
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid() && grabbing && grabbed != -1) {
Ref<Font> font = get_font("font", "Label");
int font_h = font->get_height();
Vector2 size = get_size();
size.y -= font_h;
- Point2 p = Vector2(p_event.mouse_motion.x, p_event.mouse_motion.y) / size;
+ Point2 p = mm->get_pos() / size;
p.y = CLAMP(1.0 - p.y, 0, 1) * (max - min) + min;
p.x = CLAMP(p.x, 0.0, 1.0);
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index ebe05539aa..4e75ba407c 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -54,7 +54,7 @@ class CurveTextureEdit : public Control {
void _plot_curve(const Vector2 &p_a, const Vector2 &p_b, const Vector2 &p_c, const Vector2 &p_d);
protected:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/plugins/gradient_texture_editor_plugin.cpp b/editor/plugins/gradient_texture_editor_plugin.cpp
index 41dd64d931..40f7de478d 100644
--- a/editor/plugins/gradient_texture_editor_plugin.cpp
+++ b/editor/plugins/gradient_texture_editor_plugin.cpp
@@ -48,7 +48,8 @@ GradientTextureEdit::GradientTextureEdit() {
add_child(popup);
checker = Ref<ImageTexture>(memnew(ImageTexture));
- checker->create_from_image(Image(checker_bg_png), ImageTexture::FLAG_REPEAT);
+ Ref<Image> checker_bg = memnew(Image(checker_bg_png));
+ checker->create_from_image(checker_bg, ImageTexture::FLAG_REPEAT);
}
int GradientTextureEdit::_get_point_from_pos(int x) {
@@ -76,9 +77,11 @@ void GradientTextureEdit::_show_color_picker() {
GradientTextureEdit::~GradientTextureEdit() {
}
-void GradientTextureEdit::_gui_input(const InputEvent &p_event) {
+void GradientTextureEdit::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode == KEY_DELETE && grabbed != -1) {
+ Ref<InputEventKey> k = p_event;
+
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && grabbed != -1) {
points.remove(grabbed);
grabbed = -1;
@@ -88,16 +91,17 @@ void GradientTextureEdit::_gui_input(const InputEvent &p_event) {
accept_event();
}
+ Ref<InputEventMouseButton> mb = p_event;
//Show color picker on double click.
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.doubleclick && p_event.mouse_button.pressed) {
- grabbed = _get_point_from_pos(p_event.mouse_button.x);
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_doubleclick() && mb->is_pressed()) {
+ grabbed = _get_point_from_pos(mb->get_pos().x);
_show_color_picker();
accept_event();
}
//Delete point on right click
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 2 && p_event.mouse_button.pressed) {
- grabbed = _get_point_from_pos(p_event.mouse_button.x);
+ if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) {
+ grabbed = _get_point_from_pos(mb->get_pos().x);
if (grabbed != -1) {
points.remove(grabbed);
grabbed = -1;
@@ -109,9 +113,9 @@ void GradientTextureEdit::_gui_input(const InputEvent &p_event) {
}
//Hold alt key to duplicate selected color
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed && p_event.key.mod.alt) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed() && mb->get_alt()) {
- int x = p_event.mouse_button.x;
+ int x = mb->get_pos().x;
grabbed = _get_point_from_pos(x);
if (grabbed != -1) {
@@ -133,10 +137,10 @@ void GradientTextureEdit::_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
update();
- int x = p_event.mouse_button.x;
+ int x = mb->get_pos().x;
int total_w = get_size().width - get_size().height - 3;
//Check if color selector was clicked.
@@ -201,7 +205,7 @@ void GradientTextureEdit::_gui_input(const InputEvent &p_event) {
emit_signal("ramp_changed");
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && !p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
if (grabbing) {
grabbing = false;
@@ -210,15 +214,17 @@ void GradientTextureEdit::_gui_input(const InputEvent &p_event) {
update();
}
- if (p_event.type == InputEvent::MOUSE_MOTION && grabbing) {
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid() && grabbing) {
int total_w = get_size().width - get_size().height - 3;
- int x = p_event.mouse_motion.x;
+ int x = mm->get_pos().x;
float newofs = CLAMP(x / float(total_w), 0, 1);
//Snap to nearest point if holding shift
- if (p_event.key.mod.shift) {
+ if (mm->get_shift()) {
float snap_treshhold = 0.03;
float smallest_ofs = snap_treshhold;
bool founded = false;
diff --git a/editor/plugins/gradient_texture_editor_plugin.h b/editor/plugins/gradient_texture_editor_plugin.h
index cb2f6b4061..842d586541 100644
--- a/editor/plugins/gradient_texture_editor_plugin.h
+++ b/editor/plugins/gradient_texture_editor_plugin.h
@@ -53,7 +53,7 @@ class GradientTextureEdit : public Control {
void _show_color_picker();
protected:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
static void _bind_methods();
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index 73b615d817..9c9e010b47 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -98,225 +98,223 @@ void LightOccluder2DEditor::_wip_close(bool p_closed) {
edited_point = -1;
}
-bool LightOccluder2DEditor::forward_gui_input(const InputEvent &p_event) {
+bool LightOccluder2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node)
return false;
if (node->get_occluder_polygon().is_null()) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
create_poly->set_text("No OccluderPolygon2D resource on this node.\nCreate and assign one?");
create_poly->popup_centered_minsize();
}
- return (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1);
+ return (mb.is_valid() && mb->get_button_index() == 1);
}
- switch (p_event.type) {
- case InputEvent::MOUSE_BUTTON: {
+ Ref<InputEventMouseButton> mb = p_event;
- const InputEventMouseButton &mb = p_event.mouse_button;
+ if (mb.is_valid()) {
- Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- Vector2 gpoint = Point2(mb.x, mb.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
+ Vector2 gpoint = mb->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
- Vector<Vector2> poly = Variant(node->get_occluder_polygon()->get_polygon());
+ Vector<Vector2> poly = Variant(node->get_occluder_polygon()->get_polygon());
- //first check if a point is to be added (segment split)
- real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
+ //first check if a point is to be added (segment split)
+ real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
- switch (mode) {
+ switch (mode) {
- case MODE_CREATE: {
+ case MODE_CREATE: {
- if (mb.button_index == BUTTON_LEFT && mb.pressed) {
+ if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
- if (!wip_active) {
+ if (!wip_active) {
- wip.clear();
- wip.push_back(cpoint);
- wip_active = true;
- edited_point_pos = cpoint;
- canvas_item_editor->get_viewport_control()->update();
- edited_point = 1;
- return true;
- } else {
+ wip.clear();
+ wip.push_back(cpoint);
+ wip_active = true;
+ edited_point_pos = cpoint;
+ canvas_item_editor->get_viewport_control()->update();
+ edited_point = 1;
+ return true;
+ } else {
- if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
- //wip closed
- _wip_close(true);
+ if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
+ //wip closed
+ _wip_close(true);
- return true;
- } else if (wip.size() > 1 && xform.xform(wip[wip.size() - 1]).distance_to(gpoint) < grab_treshold) {
- //wip closed
- _wip_close(false);
- return true;
+ return true;
+ } else if (wip.size() > 1 && xform.xform(wip[wip.size() - 1]).distance_to(gpoint) < grab_treshold) {
+ //wip closed
+ _wip_close(false);
+ return true;
- } else {
+ } else {
- wip.push_back(cpoint);
- edited_point = wip.size();
- canvas_item_editor->get_viewport_control()->update();
- return true;
+ wip.push_back(cpoint);
+ edited_point = wip.size();
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
- //add wip point
- }
+ //add wip point
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && wip_active) {
- _wip_close(true);
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
+ _wip_close(true);
+ }
- } break;
-
- case MODE_EDIT: {
-
- if (mb.button_index == BUTTON_LEFT) {
- if (mb.pressed) {
-
- if (mb.mod.control) {
+ } break;
- if (poly.size() < 3) {
+ case MODE_EDIT: {
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_undo_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
- poly.push_back(cpoint);
- undo_redo->add_do_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- return true;
- }
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ if (mb->is_pressed()) {
- //search edges
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
-
- Vector2 points[2] = { xform.xform(poly[i]),
- xform.xform(poly[(i + 1) % poly.size()]) };
-
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
- if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
- continue; //not valid to reuse point
-
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
- }
- }
+ if (mb->get_control()) {
- if (closest_idx >= 0) {
+ if (poly.size() < 3) {
- pre_move_edit = poly;
- poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos));
- edited_point = closest_idx + 1;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- node->get_occluder_polygon()->set_polygon(Variant(poly));
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
- } else {
+ undo_redo->create_action(TTR("Edit Poly"));
+ undo_redo->add_undo_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
+ poly.push_back(cpoint);
+ undo_redo->add_do_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
- //look for points to move
+ //search edges
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
+ Vector2 points[2] = { xform.xform(poly[i]),
+ xform.xform(poly[(i + 1) % poly.size()]) };
- Vector2 cp = xform.xform(poly[i]);
+ Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
+ if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
+ continue; //not valid to reuse point
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
- }
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
}
+ }
- if (closest_idx >= 0) {
+ if (closest_idx >= 0) {
- pre_move_edit = poly;
- edited_point = closest_idx;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
+ pre_move_edit = poly;
+ poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos));
+ edited_point = closest_idx + 1;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ node->get_occluder_polygon()->set_polygon(Variant(poly));
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
} else {
- if (edited_point != -1) {
+ //look for points to move
- //apply
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
- poly[edited_point] = edited_point_pos;
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_do_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
- undo_redo->add_undo_method(node->get_occluder_polygon().ptr(), "set_polygon", pre_move_edit);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ Vector2 cp = xform.xform(poly[i]);
- edited_point = -1;
- return true;
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
+ }
}
- }
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && edited_point == -1) {
-
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
- Vector2 cp = xform.xform(poly[i]);
+ if (closest_idx >= 0) {
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
+ pre_move_edit = poly;
+ edited_point = closest_idx;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
}
+ } else {
+
+ if (edited_point != -1) {
- if (closest_idx >= 0) {
+ //apply
- undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
- undo_redo->add_undo_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
- poly.remove(closest_idx);
+ ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
+ poly[edited_point] = edited_point_pos;
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
+ undo_redo->add_undo_method(node->get_occluder_polygon().ptr(), "set_polygon", pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->commit_action();
+
+ edited_point = -1;
return true;
}
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
- } break;
- }
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- } break;
- case InputEvent::MOUSE_MOTION: {
+ Vector2 cp = xform.xform(poly[i]);
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
+ }
+ }
- if (edited_point != -1 && (wip_active || mm.button_mask & BUTTON_MASK_LEFT)) {
+ if (closest_idx >= 0) {
- Vector2 gpoint = Point2(mm.x, mm.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
+ undo_redo->add_undo_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
+ poly.remove(closest_idx);
+ undo_redo->add_do_method(node->get_occluder_polygon().ptr(), "set_polygon", poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
+ }
- canvas_item_editor->get_viewport_control()->update();
- }
+ } break;
+ }
+ }
- } break;
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
+
+ if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
+
+ Vector2 gpoint = mm->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+
+ canvas_item_editor->get_viewport_control()->update();
+ }
}
return false;
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.h b/editor/plugins/light_occluder_2d_editor_plugin.h
index 8e0817e61e..d6579fc94c 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -84,7 +84,7 @@ protected:
public:
Vector2 snap_point(const Vector2 &p_point) const;
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_collision_polygon);
LightOccluder2DEditor(EditorNode *p_editor);
};
@@ -97,7 +97,7 @@ class LightOccluder2DEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "LightOccluder2D"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 4df0d2605a..3497af3602 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -75,7 +75,7 @@ int Line2DEditor::get_point_index_at(Vector2 gpos) {
return -1;
}
-bool Line2DEditor::forward_gui_input(const InputEvent &p_event) {
+bool Line2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node)
return false;
@@ -83,75 +83,74 @@ bool Line2DEditor::forward_gui_input(const InputEvent &p_event) {
if (!node->is_visible())
return false;
- switch (p_event.type) {
-
- case InputEvent::MOUSE_BUTTON: {
-
- const InputEventMouseButton &mb = p_event.mouse_button;
-
- Vector2 gpoint = Point2(mb.x, mb.y);
- Vector2 cpoint = mouse_to_local_pos(gpoint, mb.mod.alt);
-
- if (mb.pressed && _dragging == false) {
- int i = get_point_index_at(gpoint);
- if (i != -1) {
- if (mb.button_index == BUTTON_LEFT && !mb.mod.shift && mode == MODE_EDIT) {
- _dragging = true;
- action_point = i;
- moving_from = node->get_point_pos(i);
- moving_screen_from = gpoint;
- } else if ((mb.button_index == BUTTON_RIGHT && mode == MODE_EDIT) || (mb.button_index == BUTTON_LEFT && mode == MODE_DELETE)) {
- undo_redo->create_action(TTR("Remove Point from Line2D"));
- undo_redo->add_do_method(node, "remove_point", i);
- undo_redo->add_undo_method(node, "add_point", node->get_point_pos(i), i);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- }
- return true;
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (mb.is_valid()) {
+
+ Vector2 gpoint = mb->get_pos();
+ Vector2 cpoint = mouse_to_local_pos(gpoint, mb->get_alt());
+
+ if (mb->is_pressed() && _dragging == false) {
+ int i = get_point_index_at(gpoint);
+ if (i != -1) {
+ if (mb->get_button_index() == BUTTON_LEFT && !mb->get_shift() && mode == MODE_EDIT) {
+ _dragging = true;
+ action_point = i;
+ moving_from = node->get_point_pos(i);
+ moving_screen_from = gpoint;
+ } else if ((mb->get_button_index() == BUTTON_RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == BUTTON_LEFT && mode == MODE_DELETE)) {
+ undo_redo->create_action(TTR("Remove Point from Line2D"));
+ undo_redo->add_do_method(node, "remove_point", i);
+ undo_redo->add_undo_method(node, "add_point", node->get_point_pos(i), i);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
}
+ return true;
}
+ }
- if (mb.pressed && mb.button_index == BUTTON_LEFT && ((mb.mod.command && mode == MODE_EDIT) || mode == MODE_CREATE)) {
+ if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && ((mb->get_command() && mode == MODE_EDIT) || mode == MODE_CREATE)) {
- undo_redo->create_action(TTR("Add Point to Line2D"));
- undo_redo->add_do_method(node, "add_point", cpoint);
- undo_redo->add_undo_method(node, "remove_point", node->get_point_count());
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ undo_redo->create_action(TTR("Add Point to Line2D"));
+ undo_redo->add_do_method(node, "add_point", cpoint);
+ undo_redo->add_undo_method(node, "remove_point", node->get_point_count());
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
- _dragging = true;
- action_point = node->get_point_count() - 1;
- moving_from = node->get_point_pos(action_point);
- moving_screen_from = gpoint;
+ _dragging = true;
+ action_point = node->get_point_count() - 1;
+ moving_from = node->get_point_pos(action_point);
+ moving_screen_from = gpoint;
- canvas_item_editor->get_viewport_control()->update();
+ canvas_item_editor->get_viewport_control()->update();
- return true;
- }
+ return true;
+ }
- if (!mb.pressed && mb.button_index == BUTTON_LEFT && _dragging) {
- undo_redo->create_action(TTR("Move Point in Line2D"));
- undo_redo->add_do_method(node, "set_point_pos", action_point, cpoint);
- undo_redo->add_undo_method(node, "set_point_pos", action_point, moving_from);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- _dragging = false;
- return true;
- }
- } break;
-
- case InputEvent::MOUSE_MOTION: {
- if (_dragging) {
- const InputEventMouseMotion &mm = p_event.mouse_motion;
- Vector2 cpoint = mouse_to_local_pos(Vector2(mm.x, mm.y), mm.mod.alt);
- node->set_point_pos(action_point, cpoint);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
- } break;
+ if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && _dragging) {
+ undo_redo->create_action(TTR("Move Point in Line2D"));
+ undo_redo->add_do_method(node, "set_point_pos", action_point, cpoint);
+ undo_redo->add_undo_method(node, "set_point_pos", action_point, moving_from);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ _dragging = false;
+ return true;
+ }
+ }
+
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
+
+ if (_dragging) {
+ Vector2 cpoint = mouse_to_local_pos(mm->get_pos(), mm->get_alt());
+ node->set_point_pos(action_point, cpoint);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
+ }
}
return false;
diff --git a/editor/plugins/line_2d_editor_plugin.h b/editor/plugins/line_2d_editor_plugin.h
index 7477f7eee5..3a1f841556 100644
--- a/editor/plugins/line_2d_editor_plugin.h
+++ b/editor/plugins/line_2d_editor_plugin.h
@@ -43,7 +43,7 @@ class Line2DEditor : public HBoxContainer {
GDCLASS(Line2DEditor, HBoxContainer)
public:
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_line2d);
Line2DEditor(EditorNode *p_editor);
@@ -95,7 +95,7 @@ class Line2DEditorPlugin : public EditorPlugin {
public:
virtual bool forward_canvas_gui_input(
const Transform2D &p_canvas_xform,
- const InputEvent &p_event) {
+ const Ref<InputEvent> &p_event) {
return line2d_editor->forward_gui_input(p_event);
}
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 61da860cab..f377d3a7cc 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -33,10 +33,10 @@
void MeshEditor::_gui_input(InputEvent p_event) {
- if (p_event.type==InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask&BUTTON_MASK_LEFT) {
+ if (p_event.type==InputEvent::MOUSE_MOTION && p_event->get_button_mask()&BUTTON_MASK_LEFT) {
- rot_x-=p_event.mouse_motion.relative_y*0.01;
- rot_y-=p_event.mouse_motion.relative_x*0.01;
+ rot_x-=p_event->get_relative().y*0.01;
+ rot_y-=p_event->get_relative().x*0.01;
if (rot_x<-Math_PI/2)
rot_x=-Math_PI/2;
else if (rot_x>Math_PI/2) {
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index be8c46f379..a7fc1d5adb 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -112,263 +112,262 @@ void NavigationPolygonEditor::_wip_close() {
edited_point = -1;
}
-bool NavigationPolygonEditor::forward_gui_input(const InputEvent &p_event) {
+bool NavigationPolygonEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node)
return false;
if (node->get_navigation_polygon().is_null()) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed) {
+
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
create_nav->set_text("No NavigationPolygon resource on this node.\nCreate and assign one?");
create_nav->popup_centered_minsize();
}
- return (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1);
+ return (mb.is_valid() && mb->get_button_index() == 1);
}
- switch (p_event.type) {
+ Ref<InputEventMouseButton> mb = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
- const InputEventMouseButton &mb = p_event.mouse_button;
+ Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Vector2 gpoint = mb->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
- Vector2 gpoint = Point2(mb.x, mb.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
+ //first check if a point is to be added (segment split)
+ real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
- //first check if a point is to be added (segment split)
- real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
+ switch (mode) {
- switch (mode) {
+ case MODE_CREATE: {
- case MODE_CREATE: {
+ if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
- if (mb.button_index == BUTTON_LEFT && mb.pressed) {
+ if (!wip_active) {
- if (!wip_active) {
+ wip.clear();
+ wip.push_back(cpoint);
+ wip_active = true;
+ edited_point_pos = cpoint;
+ edited_outline = -1;
+ canvas_item_editor->get_viewport_control()->update();
+ edited_point = 1;
+ return true;
+ } else {
+
+ if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
+ //wip closed
+ _wip_close();
- wip.clear();
- wip.push_back(cpoint);
- wip_active = true;
- edited_point_pos = cpoint;
- edited_outline = -1;
- canvas_item_editor->get_viewport_control()->update();
- edited_point = 1;
return true;
} else {
- if (wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_treshold) {
- //wip closed
- _wip_close();
-
- return true;
- } else {
-
- wip.push_back(cpoint);
- edited_point = wip.size();
- canvas_item_editor->get_viewport_control()->update();
- return true;
+ wip.push_back(cpoint);
+ edited_point = wip.size();
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
- //add wip point
- }
+ //add wip point
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && wip_active) {
- _wip_close();
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
+ _wip_close();
+ }
- } break;
+ } break;
- case MODE_EDIT: {
+ case MODE_EDIT: {
- if (mb.button_index == BUTTON_LEFT) {
- if (mb.pressed) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ if (mb->is_pressed()) {
- if (mb.mod.control) {
+ if (mb->get_control()) {
- //search edges
- int closest_outline = -1;
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
+ //search edges
+ int closest_outline = -1;
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
- for (int j = 0; j < node->get_navigation_polygon()->get_outline_count(); j++) {
+ for (int j = 0; j < node->get_navigation_polygon()->get_outline_count(); j++) {
- PoolVector<Vector2> points = node->get_navigation_polygon()->get_outline(j);
+ PoolVector<Vector2> points = node->get_navigation_polygon()->get_outline(j);
- int pc = points.size();
- PoolVector<Vector2>::Read poly = points.read();
+ int pc = points.size();
+ PoolVector<Vector2>::Read poly = points.read();
- for (int i = 0; i < pc; i++) {
+ for (int i = 0; i < pc; i++) {
- Vector2 points[2] = { xform.xform(poly[i]),
- xform.xform(poly[(i + 1) % pc]) };
+ Vector2 points[2] = { xform.xform(poly[i]),
+ xform.xform(poly[(i + 1) % pc]) };
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
- if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
- continue; //not valid to reuse point
+ Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
+ if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
+ continue; //not valid to reuse point
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_outline = j;
- closest_pos = cp;
- closest_idx = i;
- }
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_outline = j;
+ closest_pos = cp;
+ closest_idx = i;
}
}
+ }
- if (closest_idx >= 0) {
-
- pre_move_edit = node->get_navigation_polygon()->get_outline(closest_outline);
- PoolVector<Point2> poly = pre_move_edit;
- poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos));
- edited_point = closest_idx + 1;
- edited_outline = closest_outline;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- node->get_navigation_polygon()->set_outline(closest_outline, poly);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
- } else {
+ if (closest_idx >= 0) {
+
+ pre_move_edit = node->get_navigation_polygon()->get_outline(closest_outline);
+ PoolVector<Point2> poly = pre_move_edit;
+ poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos));
+ edited_point = closest_idx + 1;
+ edited_outline = closest_outline;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ node->get_navigation_polygon()->set_outline(closest_outline, poly);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
+ }
+ } else {
- //look for points to move
- int closest_outline = -1;
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
+ //look for points to move
+ int closest_outline = -1;
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
- for (int j = 0; j < node->get_navigation_polygon()->get_outline_count(); j++) {
+ for (int j = 0; j < node->get_navigation_polygon()->get_outline_count(); j++) {
- PoolVector<Vector2> points = node->get_navigation_polygon()->get_outline(j);
+ PoolVector<Vector2> points = node->get_navigation_polygon()->get_outline(j);
- int pc = points.size();
- PoolVector<Vector2>::Read poly = points.read();
+ int pc = points.size();
+ PoolVector<Vector2>::Read poly = points.read();
- for (int i = 0; i < pc; i++) {
+ for (int i = 0; i < pc; i++) {
- Vector2 cp = xform.xform(poly[i]);
+ Vector2 cp = xform.xform(poly[i]);
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_outline = j;
- closest_idx = i;
- }
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_outline = j;
+ closest_idx = i;
}
}
+ }
- if (closest_idx >= 0) {
+ if (closest_idx >= 0) {
- pre_move_edit = node->get_navigation_polygon()->get_outline(closest_outline);
- edited_point = closest_idx;
- edited_outline = closest_outline;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
+ pre_move_edit = node->get_navigation_polygon()->get_outline(closest_outline);
+ edited_point = closest_idx;
+ edited_outline = closest_outline;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
- } else {
+ }
+ } else {
- if (edited_point != -1) {
+ if (edited_point != -1) {
- //apply
+ //apply
- PoolVector<Vector2> poly = node->get_navigation_polygon()->get_outline(edited_outline);
- ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
- poly.set(edited_point, edited_point_pos);
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "set_outline", edited_outline, poly);
- undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "set_outline", edited_outline, pre_move_edit);
- undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
- undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ PoolVector<Vector2> poly = node->get_navigation_polygon()->get_outline(edited_outline);
+ ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
+ poly.set(edited_point, edited_point_pos);
+ undo_redo->create_action(TTR("Edit Poly"));
+ undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "set_outline", edited_outline, poly);
+ undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "set_outline", edited_outline, pre_move_edit);
+ undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
+ undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
- edited_point = -1;
- return true;
- }
+ edited_point = -1;
+ return true;
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && edited_point == -1) {
+ }
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
- int closest_outline = -1;
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
+ int closest_outline = -1;
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
- for (int j = 0; j < node->get_navigation_polygon()->get_outline_count(); j++) {
+ for (int j = 0; j < node->get_navigation_polygon()->get_outline_count(); j++) {
- PoolVector<Vector2> points = node->get_navigation_polygon()->get_outline(j);
+ PoolVector<Vector2> points = node->get_navigation_polygon()->get_outline(j);
- int pc = points.size();
- PoolVector<Vector2>::Read poly = points.read();
+ int pc = points.size();
+ PoolVector<Vector2>::Read poly = points.read();
- for (int i = 0; i < pc; i++) {
+ for (int i = 0; i < pc; i++) {
- Vector2 cp = xform.xform(poly[i]);
+ Vector2 cp = xform.xform(poly[i]);
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_outline = j;
- closest_idx = i;
- }
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_outline = j;
+ closest_idx = i;
}
}
+ }
- if (closest_idx >= 0) {
-
- PoolVector<Vector2> poly = node->get_navigation_polygon()->get_outline(closest_outline);
-
- if (poly.size() > 3) {
- undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
- undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "set_outline", closest_outline, poly);
- poly.remove(closest_idx);
- undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "set_outline", closest_outline, poly);
- undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
- undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- } else {
-
- undo_redo->create_action(TTR("Remove Poly And Point"));
- undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "add_outline_at_index", poly, closest_outline);
- poly.remove(closest_idx);
- undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "remove_outline", closest_outline);
- undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
- undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- }
- return true;
+ if (closest_idx >= 0) {
+
+ PoolVector<Vector2> poly = node->get_navigation_polygon()->get_outline(closest_outline);
+
+ if (poly.size() > 3) {
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
+ undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "set_outline", closest_outline, poly);
+ poly.remove(closest_idx);
+ undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "set_outline", closest_outline, poly);
+ undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
+ undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ } else {
+
+ undo_redo->create_action(TTR("Remove Poly And Point"));
+ undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "add_outline_at_index", poly, closest_outline);
+ poly.remove(closest_idx);
+ undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "remove_outline", closest_outline);
+ undo_redo->add_do_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
+ undo_redo->add_undo_method(node->get_navigation_polygon().ptr(), "make_polygons_from_outlines");
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
}
+ return true;
}
+ }
- } break;
- }
-
- } break;
- case InputEvent::MOUSE_MOTION: {
+ } break;
+ }
+ }
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ Ref<InputEventMouseMotion> mm = p_event;
- if (edited_point != -1 && (wip_active || mm.button_mask & BUTTON_MASK_LEFT)) {
+ if (mm.is_valid()) {
- Vector2 gpoint = Point2(mm.x, mm.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+ if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
- canvas_item_editor->get_viewport_control()->update();
- }
+ Vector2 gpoint = mm->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
- } break;
+ canvas_item_editor->get_viewport_control()->update();
+ }
}
return false;
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 6de77b5ef3..62a83983fd 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -85,7 +85,7 @@ protected:
static void _bind_methods();
public:
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_collision_polygon);
NavigationPolygonEditor(EditorNode *p_editor);
};
@@ -98,7 +98,7 @@ class NavigationPolygonEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "NavigationPolygonInstance"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index 35743ce0b3..c6c85d8be2 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -64,17 +64,18 @@ void Particles2DEditorPlugin::_file_selected(const String &p_file) {
int epc = epoints->get_value();
- Image img;
- Error err = ImageLoader::load_image(p_file, &img);
+ Ref<Image> img;
+ img.instance();
+ Error err = ImageLoader::load_image(p_file, img);
ERR_EXPLAIN(TTR("Error loading image:") + " " + p_file);
ERR_FAIL_COND(err != OK);
- img.convert(Image::FORMAT_LA8);
- ERR_FAIL_COND(img.get_format() != Image::FORMAT_LA8);
- Size2i s = Size2(img.get_width(), img.get_height());
+ img->convert(Image::FORMAT_LA8);
+ ERR_FAIL_COND(img->get_format() != Image::FORMAT_LA8);
+ Size2i s = Size2(img->get_width(), img->get_height());
ERR_FAIL_COND(s.width == 0 || s.height == 0);
- PoolVector<uint8_t> data = img.get_data();
+ PoolVector<uint8_t> data = img->get_data();
PoolVector<uint8_t>::Read r = data.read();
Vector<Point2i> valid_positions;
@@ -98,7 +99,7 @@ void Particles2DEditorPlugin::_file_selected(const String &p_file) {
epoints.resize(epc);
PoolVector<Point2>::Write w = epoints.write();
- Size2 extents = Size2(img.get_width() * 0.5, img.get_height() * 0.5);
+ Size2 extents = Size2(img->get_width() * 0.5, img->get_height() * 0.5);
for (int i = 0; i < epc; i++) {
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index 4c84e831c1..dc2da80b06 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -329,7 +329,7 @@ void ParticlesEditor::_generate_emission_points() {
copymem(iw.ptr(), r.ptr(), point_count * sizeof(float) * 3);
}
- Image image(w, h, false, Image::FORMAT_RGBF, point_img);
+ Ref<Image> image = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img));
Ref<ImageTexture> tex;
tex.instance();
@@ -354,7 +354,7 @@ void ParticlesEditor::_generate_emission_points() {
copymem(iw.ptr(), r.ptr(), point_count * sizeof(float) * 3);
}
- Image image2(w, h, false, Image::FORMAT_RGBF, point_img2);
+ Ref<Image> image2 = memnew(Image(w, h, false, Image::FORMAT_RGBF, point_img2));
Ref<ImageTexture> tex2;
tex2.instance();
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index e00111b565..f8d250334c 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -58,8 +58,7 @@ void Path2DEditor::_node_removed(Node *p_node) {
}
}
-bool Path2DEditor::forward_gui_input(const InputEvent &p_event) {
-
+bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node)
return false;
@@ -69,70 +68,52 @@ bool Path2DEditor::forward_gui_input(const InputEvent &p_event) {
if (!node->get_curve().is_valid())
return false;
- switch (p_event.type) {
-
- case InputEvent::MOUSE_BUTTON: {
-
- const InputEventMouseButton &mb = p_event.mouse_button;
-
- Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Ref<InputEventMouseButton> mb = p_event;
- Vector2 gpoint = Point2(mb.x, mb.y);
- Vector2 cpoint = !mb.mod.alt ? canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint)) : node->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)));
+ if (mb.is_valid()) {
- //first check if a point is to be added (segment split)
- real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
+ Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- // Test move point!!
+ Vector2 gpoint = mb->get_pos();
+ Vector2 cpoint =
+ !mb->get_alt() ?
+ canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint)) :
+ node->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)));
- if (mb.pressed && action == ACTION_NONE) {
+ real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
- Ref<Curve2D> curve = node->get_curve();
+ if (mb->is_pressed() && action == ACTION_NONE) {
- for (int i = 0; i < curve->get_point_count(); i++) {
+ Ref<Curve2D> curve = node->get_curve();
- bool pointunder = false;
+ for (int i = 0; i < curve->get_point_count(); i++) {
- {
- Point2 p = xform.xform(curve->get_point_pos(i));
- if (gpoint.distance_to(p) < grab_treshold) {
+ real_t dist_to_p = gpoint.distance_to(xform.xform(curve->get_point_pos(i)));
+ real_t dist_to_p_out = gpoint.distance_to(xform.xform(curve->get_point_pos(i) + curve->get_point_out(i)));
+ real_t dist_to_p_in = gpoint.distance_to(xform.xform(curve->get_point_pos(i) + curve->get_point_in(i)));
- if (mb.button_index == BUTTON_LEFT && !mb.mod.shift && mode == MODE_EDIT) {
+ // Check for point movement start (for point + in/out controls).
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ if (!mb->get_shift() && mode == MODE_EDIT) {
+ // Point can only be moved in edit mode.
+ if (dist_to_p < grab_threshold) {
- action = ACTION_MOVING_POINT;
- action_point = i;
- moving_from = curve->get_point_pos(i);
- moving_screen_from = gpoint;
- return true;
- } else if ((mb.button_index == BUTTON_RIGHT && mode == MODE_EDIT) || (mb.button_index == BUTTON_LEFT && mode == MODE_DELETE)) {
-
- undo_redo->create_action(TTR("Remove Point from Curve"));
- undo_redo->add_do_method(curve.ptr(), "remove_point", i);
- undo_redo->add_undo_method(curve.ptr(), "add_point", curve->get_point_pos(i), curve->get_point_in(i), curve->get_point_out(i), i);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- return true;
- } else
- pointunder = true;
+ action = ACTION_MOVING_POINT;
+ action_point = i;
+ moving_from = curve->get_point_pos(i);
+ moving_screen_from = gpoint;
+ return true;
}
- }
-
- if (mb.button_index == BUTTON_LEFT && i < (curve->get_point_count() - 1)) {
- Point2 p = xform.xform(curve->get_point_pos(i) + curve->get_point_out(i));
- if (gpoint.distance_to(p) < grab_treshold && (mode == MODE_EDIT || mode == MODE_EDIT_CURVE)) {
+ } else if (mode == MODE_EDIT || mode == MODE_EDIT_CURVE) {
+ // In/out controls can be moved in multiple modes.
+ if (dist_to_p_out < grab_threshold && i < (curve->get_point_count() - 1)) {
action = ACTION_MOVING_OUT;
action_point = i;
moving_from = curve->get_point_out(i);
moving_screen_from = gpoint;
return true;
- }
- }
-
- if (mb.button_index == BUTTON_LEFT && i > 0) {
- Point2 p = xform.xform(curve->get_point_pos(i) + curve->get_point_in(i));
- if (gpoint.distance_to(p) < grab_treshold && (mode == MODE_EDIT || mode == MODE_EDIT_CURVE)) {
+ } else if (dist_to_p_in < grab_threshold && i > 0) {
action = ACTION_MOVING_IN;
action_point = i;
@@ -141,314 +122,362 @@ bool Path2DEditor::forward_gui_input(const InputEvent &p_event) {
return true;
}
}
+ }
+
+ // Check for point deletion.
+ if ((mb->get_button_index() == BUTTON_RIGHT && mode == MODE_EDIT) || (mb->get_button_index() == BUTTON_LEFT && mode == MODE_DELETE)) {
+ if (dist_to_p < grab_threshold) {
- if (pointunder)
+ undo_redo->create_action(TTR("Remove Point from Curve"));
+ undo_redo->add_do_method(curve.ptr(), "remove_point", i);
+ undo_redo->add_undo_method(curve.ptr(), "add_point", curve->get_point_pos(i), curve->get_point_in(i), curve->get_point_out(i), i);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
return true;
+ } else if (dist_to_p_out < grab_threshold) {
+
+ undo_redo->create_action(TTR("Remove Out-Control from Curve"));
+ undo_redo->add_do_method(curve.ptr(), "set_point_out", i, Vector2());
+ undo_redo->add_undo_method(curve.ptr(), "set_point_out", i, curve->get_point_out(i));
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ } else if (dist_to_p_in < grab_threshold) {
+
+ undo_redo->create_action(TTR("Remove In-Control from Curve"));
+ undo_redo->add_do_method(curve.ptr(), "set_point_in", i, Vector2());
+ undo_redo->add_undo_method(curve.ptr(), "set_point_in", i, curve->get_point_in(i));
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
}
}
+ }
- // Test add point in empty space!
+ // Check for point creation.
+ if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && ((mb->get_command() && mode == MODE_EDIT) || mode == MODE_CREATE)) {
- if (mb.pressed && mb.button_index == BUTTON_LEFT && ((mb.mod.command && mode == MODE_EDIT) || mode == MODE_CREATE)) {
+ Ref<Curve2D> curve = node->get_curve();
- Ref<Curve2D> curve = node->get_curve();
+ undo_redo->create_action(TTR("Add Point to Curve"));
+ undo_redo->add_do_method(curve.ptr(), "add_point", cpoint);
+ undo_redo->add_undo_method(curve.ptr(), "remove_point", curve->get_point_count());
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
- undo_redo->create_action(TTR("Add Point to Curve"));
- undo_redo->add_do_method(curve.ptr(), "add_point", cpoint);
- undo_redo->add_undo_method(curve.ptr(), "remove_point", curve->get_point_count());
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ action = ACTION_MOVING_POINT;
+ action_point = curve->get_point_count() - 1;
+ moving_from = curve->get_point_pos(action_point);
+ moving_screen_from = gpoint;
- action = ACTION_MOVING_POINT;
- action_point = curve->get_point_count() - 1;
- moving_from = curve->get_point_pos(action_point);
- moving_screen_from = gpoint;
+ canvas_item_editor->get_viewport_control()->update();
- canvas_item_editor->get_viewport_control()->update();
+ return true;
+ }
- return true;
- }
+ // Check for point movement completion.
+ if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT && action != ACTION_NONE) {
- if (!mb.pressed && mb.button_index == BUTTON_LEFT && action != ACTION_NONE) {
+ Ref<Curve2D> curve = node->get_curve();
- Ref<Curve2D> curve = node->get_curve();
+ Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
+ switch (action) {
- Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
- switch (action) {
+ case ACTION_NONE:
+ // N/A, handled in above condition.
+ break;
- case ACTION_MOVING_POINT: {
+ case ACTION_MOVING_POINT: {
- undo_redo->create_action(TTR("Move Point in Curve"));
- undo_redo->add_do_method(curve.ptr(), "set_point_pos", action_point, cpoint);
- undo_redo->add_undo_method(curve.ptr(), "set_point_pos", action_point, moving_from);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ undo_redo->create_action(TTR("Move Point in Curve"));
+ undo_redo->add_do_method(curve.ptr(), "set_point_pos", action_point, cpoint);
+ undo_redo->add_undo_method(curve.ptr(), "set_point_pos", action_point, moving_from);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
- } break;
- case ACTION_MOVING_IN: {
+ } break;
- undo_redo->create_action(TTR("Move In-Control in Curve"));
- undo_redo->add_do_method(curve.ptr(), "set_point_in", action_point, new_pos);
- undo_redo->add_undo_method(curve.ptr(), "set_point_in", action_point, moving_from);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ case ACTION_MOVING_IN: {
- } break;
- case ACTION_MOVING_OUT: {
+ undo_redo->create_action(TTR("Move In-Control in Curve"));
+ undo_redo->add_do_method(curve.ptr(), "set_point_in", action_point, new_pos);
+ undo_redo->add_undo_method(curve.ptr(), "set_point_in", action_point, moving_from);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
- undo_redo->create_action(TTR("Move Out-Control in Curve"));
- undo_redo->add_do_method(curve.ptr(), "set_point_out", action_point, new_pos);
- undo_redo->add_undo_method(curve.ptr(), "set_point_out", action_point, moving_from);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ } break;
- } break;
- }
+ case ACTION_MOVING_OUT: {
- action = ACTION_NONE;
+ undo_redo->create_action(TTR("Move Out-Control in Curve"));
+ undo_redo->add_do_method(curve.ptr(), "set_point_out", action_point, new_pos);
+ undo_redo->add_undo_method(curve.ptr(), "set_point_out", action_point, moving_from);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
- return true;
+ } break;
}
+ action = ACTION_NONE;
+
+ return true;
+ }
+
#if 0
- switch(mode) {
+ switch(mode) {
- case MODE_CREATE: {
+ case MODE_CREATE: {
- if (mb.button_index==BUTTON_LEFT && mb.pressed) {
+ if (mb->get_button_index()==BUTTON_LEFT && mb->is_pressed()) {
- if (!wip_active) {
+ if (!wip_active) {
- wip.clear();
- wip.push_back( canvas_item_editor->snap_point(cpoint) );
- wip_active=true;
- edited_point_pos=canvas_item_editor->snap_point(cpoint);
- canvas_item_editor->update();
- edited_point=1;
- return true;
- } else {
+ wip.clear();
+ wip.push_back( canvas_item_editor->snap_point(cpoint) );
+ wip_active=true;
+ edited_point_pos=canvas_item_editor->snap_point(cpoint);
+ canvas_item_editor->update();
+ edited_point=1;
+ return true;
+ } else {
+ if (wip.size()>1 && xform.xform(wip[0]).distance_to(gpoint)<grab_treshold) {
+ //wip closed
+ _wip_close();
- if (wip.size()>1 && xform.xform(wip[0]).distance_to(gpoint)<grab_treshold) {
- //wip closed
- _wip_close();
- return true;
- } else {
+ return true;
+ } else {
- wip.push_back( canvas_item_editor->snap_point(cpoint) );
- edited_point=wip.size();
- canvas_item_editor->update();
- return true;
+ wip.push_back( canvas_item_editor->snap_point(cpoint) );
+ edited_point=wip.size();
+ canvas_item_editor->update();
+ return true;
- //add wip point
- }
+ //add wip point
}
- } else if (mb.button_index==BUTTON_RIGHT && mb.pressed && wip_active) {
- _wip_close();
}
+ } else if (mb->get_button_index()==BUTTON_RIGHT && mb->is_pressed() && wip_active) {
+ _wip_close();
+ }
+ } break;
+ case MODE_EDIT: {
- } break;
-
- case MODE_EDIT: {
-
- if (mb.button_index==BUTTON_LEFT) {
- if (mb.pressed) {
-
- if (mb.mod.control) {
-
+ if (mb->get_button_index()==BUTTON_LEFT) {
+ if (mb->is_pressed()) {
- if (poly.size() < 3) {
+ if (mb->get_control()) {
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_undo_method(node,"set_polygon",poly);
- poly.push_back(cpoint);
- undo_redo->add_do_method(node,"set_polygon",poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->commit_action();
- return true;
- }
- //search edges
- int closest_idx=-1;
- Vector2 closest_pos;
- real_t closest_dist=1e10;
- for(int i=0;i<poly.size();i++) {
+ if (poly.size() < 3) {
- Vector2 points[2] ={ xform.xform(poly[i]),
- xform.xform(poly[(i+1)%poly.size()]) };
+ undo_redo->create_action(TTR("Edit Poly"));
+ undo_redo->add_undo_method(node,"set_polygon",poly);
+ poly.push_back(cpoint);
+ undo_redo->add_do_method(node,"set_polygon",poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
+ undo_redo->commit_action();
+ return true;
+ }
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint,points);
- if (cp.distance_squared_to(points[0])<CMP_EPSILON2 || cp.distance_squared_to(points[1])<CMP_EPSILON2)
- continue; //not valid to reuse point
+ //search edges
+ int closest_idx=-1;
+ Vector2 closest_pos;
+ real_t closest_dist=1e10;
+ for(int i=0;i<poly.size();i++) {
- real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_treshold) {
+ if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
}
+ Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint,points);
+ if (cp.distance_squared_to(points[0])<CMP_EPSILON2 || cp.distance_squared_to(points[1])<CMP_EPSILON2)
+ continue; //not valid to reuse point
+ real_t d = cp.distance_to(gpoint);
+ if (d<closest_dist && d<grab_treshold) {
+ closest_dist=d;
+ closest_pos=cp;
+ closest_idx=i;
}
- if (closest_idx>=0) {
- pre_move_edit=poly;
- poly.insert(closest_idx+1,canvas_item_editor->snap_point(xform.affine_inverse().xform(closest_pos)));
- edited_point=closest_idx+1;
- edited_point_pos=canvas_item_editor->snap_point(xform.affine_inverse().xform(closest_pos));
- node->set_polygon(poly);
- canvas_item_editor->update();
- return true;
- }
- } else {
-
- //look for points to move
+ }
- int closest_idx=-1;
- Vector2 closest_pos;
- real_t closest_dist=1e10;
- for(int i=0;i<poly.size();i++) {
+ if (closest_idx>=0) {
- Vector2 cp =xform.xform(poly[i]);
+ pre_move_edit=poly;
+ poly.insert(closest_idx+1,canvas_item_editor->snap_point(xform.affine_inverse().xform(closest_pos)));
+ edited_point=closest_idx+1;
+ edited_point_pos=canvas_item_editor->snap_point(xform.affine_inverse().xform(closest_pos));
+ node->set_polygon(poly);
+ canvas_item_editor->update();
+ return true;
+ }
+ } else {
real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_treshold) {
+ if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
}
- }
+ int closest_idx=-1;
+ Vector2 closest_pos;
+ real_t closest_dist=1e10;
+ for(int i=0;i<poly.size();i++) {
- if (closest_idx>=0) {
+ Vector2 cp =xform.xform(poly[i]);
- pre_move_edit=poly;
- edited_point=closest_idx;
- edited_point_pos=xform.affine_inverse().xform(closest_pos);
- canvas_item_editor->update();
- return true;
+ real_t d = cp.distance_to(gpoint);
+ if (d<closest_dist && d<grab_treshold) {
+ closest_dist=d;
+ closest_pos=cp;
+ closest_idx=i;
}
- }
- } else {
- if (edited_point!=-1) {
+ }
- //apply
+ if (closest_idx>=0) {
- ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
- poly[edited_point]=edited_point_pos;
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_do_method(node,"set_polygon",poly);
- undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->commit_action();
-
- edited_point=-1;
+ pre_move_edit=poly;
+ edited_point=closest_idx;
+ edited_point_pos=xform.affine_inverse().xform(closest_pos);
+ canvas_item_editor->update();
return true;
}
}
- } if (mb.button_index==BUTTON_RIGHT && mb.pressed && edited_point==-1) {
+ } else {
+ if (edited_point!=-1) {
+ //apply
- int closest_idx=-1;
- Vector2 closest_pos;
- real_t closest_dist=1e10;
- for(int i=0;i<poly.size();i++) {
+ ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
+ poly[edited_point]=edited_point_pos;
+ undo_redo->create_action(TTR("Edit Poly"));
+ undo_redo->add_do_method(node,"set_polygon",poly);
+ undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
+ undo_redo->commit_action();
- Vector2 cp =xform.xform(poly[i]);
+ edited_point=-1;
+ return true;
+ }
+ }
+ } if (mb->get_button_index()==BUTTON_RIGHT && mb->is_pressed() && edited_point==-1) {
real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_treshold) {
+ if (d<closest_dist && d<grab_threshold) {
closest_dist=d;
closest_pos=cp;
closest_idx=i;
}
- }
+ int closest_idx=-1;
+ Vector2 closest_pos;
+ real_t closest_dist=1e10;
+ for(int i=0;i<poly.size();i++) {
- if (closest_idx>=0) {
+ Vector2 cp =xform.xform(poly[i]);
-
- undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
- undo_redo->add_undo_method(node,"set_polygon",poly);
- poly.remove(closest_idx);
- undo_redo->add_do_method(node,"set_polygon",poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->commit_action();
- return true;
+ real_t d = cp.distance_to(gpoint);
+ if (d<closest_dist && d<grab_treshold) {
+ closest_dist=d;
+ closest_pos=cp;
+ closest_idx=i;
}
}
+ if (closest_idx>=0) {
- } break;
- }
-
-#endif
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
+ undo_redo->add_undo_method(node,"set_polygon",poly);
+ poly.remove(closest_idx);
+ undo_redo->add_do_method(node,"set_polygon",poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
+ undo_redo->commit_action();
+ return true;
+ }
- if (action != ACTION_NONE) {
+ }
- Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- Vector2 gpoint = Point2(mm.x, mm.y);
- Vector2 cpoint = !mm.mod.alt ? canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint)) : node->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)));
+ } break;
+ }
+#endif
+ }
- Ref<Curve2D> curve = node->get_curve();
+ Ref<InputEventMouseMotion> mm = p_event;
- Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
+ if (mm.is_valid()) {
- switch (action) {
+ if (action != ACTION_NONE) {
+ // Handle point/control movement.
+ Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Vector2 gpoint = mm->get_pos();
+ Vector2 cpoint =
+ !mm->get_alt() ?
+ canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint)) :
+ node->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)));
- case ACTION_MOVING_POINT: {
+ Ref<Curve2D> curve = node->get_curve();
- curve->set_point_pos(action_point, cpoint);
- } break;
- case ACTION_MOVING_IN: {
+ Vector2 new_pos = moving_from + xform.affine_inverse().basis_xform(gpoint - moving_screen_from);
- curve->set_point_in(action_point, new_pos);
+ switch (action) {
- } break;
- case ACTION_MOVING_OUT: {
+ case ACTION_NONE:
+ // N/A, handled in above condition.
+ break;
- curve->set_point_out(action_point, new_pos);
+ case ACTION_MOVING_POINT: {
+ curve->set_point_pos(action_point, cpoint);
+ } break;
- } break;
- }
+ case ACTION_MOVING_IN: {
+ curve->set_point_in(action_point, new_pos);
+ } break;
- canvas_item_editor->get_viewport_control()->update();
- return true;
+ case ACTION_MOVING_OUT: {
+ curve->set_point_out(action_point, new_pos);
+ } break;
}
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
+ }
+
#if 0
- if (edited_point!=-1 && (wip_active || mm.button_mask&BUTTON_MASK_LEFT)) {
+ if (edited_point!=-1 && (wip_active || mm->get_button_mask()&BUTTON_MASK_LEFT)) {
- Matrix32 xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Matrix32 xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- Vector2 gpoint = Point2(mm.x,mm.y);
- edited_point_pos = canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint));
- canvas_item_editor->update();
+ Vector2 gpoint = Point2(mm.x,mm.y);
+ edited_point_pos = canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint));
+ canvas_item_editor->update();
- }
+ }
#endif
- } break;
}
return false;
diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h
index 67c6f3c8cb..70911444ad 100644
--- a/editor/plugins/path_2d_editor_plugin.h
+++ b/editor/plugins/path_2d_editor_plugin.h
@@ -95,7 +95,7 @@ protected:
static void _bind_methods();
public:
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_path2d);
Path2DEditor(EditorNode *p_editor);
};
@@ -108,7 +108,7 @@ class Path2DEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return path2d_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return path2d_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "Path2D"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index 9c95cee388..12b6dce798 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -303,9 +303,9 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera* p_camera,const InputEve
if (p_event.type==InputEvent::MOUSE_BUTTON) {
const InputEventMouseButton &mb=p_event.mouse_button;
- Point2 mbpos(mb.x,mb.y);
+ Point2 mbpos(mb->get_pos().x,mb->get_pos().y);
- if (mb.pressed && mb.button_index==BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb.mod.control))) {
+ if (mb->is_pressed() && mb->get_button_index()==BUTTON_LEFT && (curve_create->is_pressed() || (curve_edit->is_pressed() && mb->get_control()))) {
//click into curve, break it down
Vector3Array v3a = c->tesselate();
int idx=0;
@@ -405,26 +405,40 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera* p_camera,const InputEve
//add new at pos
}
- } else if (mb.pressed && ((mb.button_index==BUTTON_LEFT && curve_del->is_pressed()) || (mb.button_index==BUTTON_RIGHT && curve_edit->is_pressed()))) {
+ } else if (mb->is_pressed() && ((mb->get_button_index()==BUTTON_LEFT && curve_del->is_pressed()) || (mb->get_button_index()==BUTTON_RIGHT && curve_edit->is_pressed()))) {
- int erase_idx=-1;
for(int i=0;i<c->get_point_count();i++) {
- //find the offset and point index of the place to break up
- if (p_camera->unproject_position(gt.xform(c->get_point_pos(i))).distance_to(mbpos)<click_dist) {
-
- erase_idx=i;
- break;
- }
- }
+ real_t dist_to_p = p_camera->unproject_position(gt.xform(c->get_point_pos(i))).distance_to(mbpos);
+ real_t dist_to_p_out = p_camera->unproject_position(gt.xform(c->get_point_pos(i) + c->get_point_out(i))).distance_to(mbpos);
+ real_t dist_to_p_in = p_camera->unproject_position(gt.xform(c->get_point_pos(i) + c->get_point_in(i))).distance_to(mbpos);
+
+ // Find the offset and point index of the place to break up.
+ // Also check for the control points.
+ if (dist_to_p < click_dist) {
+
+ UndoRedo *ur = editor->get_undo_redo();
+ ur->create_action(TTR("Remove Path Point"));
+ ur->add_do_method(c.ptr(),"remove_point",i);
+ ur->add_undo_method(c.ptr(),"add_point",c->get_point_pos(i),c->get_point_in(i),c->get_point_out(i),i);
+ ur->commit_action();
+ return true;
+ } else if (dist_to_p_out < click_dist) {
- if (erase_idx!=-1) {
+ UndoRedo *ur = editor->get_undo_redo();
+ ur->create_action(TTR("Remove Out-Control Point"));
+ ur->add_do_method(c.ptr(),"set_point_out",i,Vector3());
+ ur->add_undo_method(c.ptr(),"set_point_out",i,c->get_point_out(i));
+ ur->commit_action();
+ return true;
+ } else if (dist_to_p_in < click_dist) {
- UndoRedo *ur = editor->get_undo_redo();
- ur->create_action(TTR("Remove Path Point"));
- ur->add_do_method(c.ptr(),"remove_point",erase_idx);
- ur->add_undo_method(c.ptr(),"add_point",c->get_point_pos(erase_idx),c->get_point_in(erase_idx),c->get_point_out(erase_idx),erase_idx);
- ur->commit_action();
- return true;
+ UndoRedo *ur = editor->get_undo_redo();
+ ur->create_action(TTR("Remove In-Control Point"));
+ ur->add_do_method(c.ptr(),"set_point_in",i,Vector3());
+ ur->add_undo_method(c.ptr(),"set_point_in",i,c->get_point_in(i));
+ ur->commit_action();
+ return true;
+ }
}
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 896a26c8e8..c2edc608ab 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -201,213 +201,209 @@ void Polygon2DEditor::_wip_close() {
edited_point = -1;
}
-bool Polygon2DEditor::forward_gui_input(const InputEvent &p_event) {
+bool Polygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (node == NULL)
return false;
- switch (p_event.type) {
+ Ref<InputEventMouseButton> mb = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
- const InputEventMouseButton &mb = p_event.mouse_button;
+ Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
- Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
+ Vector2 gpoint = mb->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
- Vector2 gpoint = Point2(mb.x, mb.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- cpoint = node->get_global_transform().affine_inverse().xform(cpoint);
+ Vector<Vector2> poly = Variant(node->get_polygon());
- Vector<Vector2> poly = Variant(node->get_polygon());
+ //first check if a point is to be added (segment split)
+ real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
- //first check if a point is to be added (segment split)
- real_t grab_treshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
+ switch (mode) {
- switch (mode) {
+ case MODE_CREATE: {
- case MODE_CREATE: {
+ if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
- if (mb.button_index == BUTTON_LEFT && mb.pressed) {
+ if (!wip_active) {
- if (!wip_active) {
+ wip.clear();
+ wip.push_back(cpoint - node->get_offset());
+ wip_active = true;
+ edited_point_pos = cpoint;
+ canvas_item_editor->get_viewport_control()->update();
+ edited_point = 1;
+ return true;
+ } else {
+
+ if (wip.size() > 1 && xform.xform(wip[0] + node->get_offset()).distance_to(gpoint) < grab_treshold) {
+ //wip closed
+ _wip_close();
- wip.clear();
- wip.push_back(cpoint - node->get_offset());
- wip_active = true;
- edited_point_pos = cpoint;
- canvas_item_editor->get_viewport_control()->update();
- edited_point = 1;
return true;
} else {
- if (wip.size() > 1 && xform.xform(wip[0] + node->get_offset()).distance_to(gpoint) < grab_treshold) {
- //wip closed
- _wip_close();
-
- return true;
- } else {
-
- wip.push_back(cpoint - node->get_offset());
- edited_point = wip.size();
- canvas_item_editor->get_viewport_control()->update();
- return true;
+ wip.push_back(cpoint - node->get_offset());
+ edited_point = wip.size();
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
- //add wip point
- }
+ //add wip point
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && wip_active) {
- _wip_close();
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
+ _wip_close();
+ }
- } break;
-
- case MODE_EDIT: {
-
- if (mb.button_index == BUTTON_LEFT) {
- if (mb.pressed) {
-
- if (mb.mod.control) {
+ } break;
- if (poly.size() < 3) {
+ case MODE_EDIT: {
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_undo_method(node, "set_polygon", poly);
- poly.push_back(cpoint);
- undo_redo->add_do_method(node, "set_polygon", poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
- return true;
- }
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ if (mb->is_pressed()) {
- //search edges
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
-
- Vector2 points[2] = { xform.xform(poly[i] + node->get_offset()),
- xform.xform(poly[(i + 1) % poly.size()] + node->get_offset()) };
-
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
- if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
- continue; //not valid to reuse point
-
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
- }
- }
+ if (mb->get_control()) {
- if (closest_idx >= 0) {
+ if (poly.size() < 3) {
- pre_move_edit = poly;
- poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos) - node->get_offset());
- edited_point = closest_idx + 1;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- node->set_polygon(Variant(poly));
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
- } else {
+ undo_redo->create_action(TTR("Edit Poly"));
+ undo_redo->add_undo_method(node, "set_polygon", poly);
+ poly.push_back(cpoint);
+ undo_redo->add_do_method(node, "set_polygon", poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
- //look for points to move
+ //search edges
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
+ Vector2 points[2] = { xform.xform(poly[i] + node->get_offset()),
+ xform.xform(poly[(i + 1) % poly.size()] + node->get_offset()) };
- Vector2 cp = xform.xform(poly[i] + node->get_offset());
+ Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
+ if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2)
+ continue; //not valid to reuse point
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
- }
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
}
+ }
- if (closest_idx >= 0) {
+ if (closest_idx >= 0) {
- pre_move_edit = poly;
- edited_point = closest_idx;
- edited_point_pos = xform.affine_inverse().xform(closest_pos);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
+ pre_move_edit = poly;
+ poly.insert(closest_idx + 1, xform.affine_inverse().xform(closest_pos) - node->get_offset());
+ edited_point = closest_idx + 1;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ node->set_polygon(Variant(poly));
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
} else {
- if (edited_point != -1) {
+ //look for points to move
- //apply
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
- poly[edited_point] = edited_point_pos - node->get_offset();
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_do_method(node, "set_polygon", poly);
- undo_redo->add_undo_method(node, "set_polygon", pre_move_edit);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
- undo_redo->commit_action();
+ Vector2 cp = xform.xform(poly[i] + node->get_offset());
- edited_point = -1;
- return true;
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
+ }
}
- }
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed && edited_point == -1) {
- int closest_idx = -1;
- Vector2 closest_pos;
- real_t closest_dist = 1e10;
- for (int i = 0; i < poly.size(); i++) {
+ if (closest_idx >= 0) {
- Vector2 cp = xform.xform(poly[i] + node->get_offset());
-
- real_t d = cp.distance_to(gpoint);
- if (d < closest_dist && d < grab_treshold) {
- closest_dist = d;
- closest_pos = cp;
- closest_idx = i;
+ pre_move_edit = poly;
+ edited_point = closest_idx;
+ edited_point_pos = xform.affine_inverse().xform(closest_pos);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
}
}
+ } else {
+
+ if (edited_point != -1) {
- if (closest_idx >= 0) {
+ //apply
- undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
- undo_redo->add_undo_method(node, "set_polygon", poly);
- poly.remove(closest_idx);
+ ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
+ poly[edited_point] = edited_point_pos - node->get_offset();
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node, "set_polygon", poly);
+ undo_redo->add_undo_method(node, "set_polygon", pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
undo_redo->commit_action();
+
+ edited_point = -1;
return true;
}
}
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
- } break;
- }
+ int closest_idx = -1;
+ Vector2 closest_pos;
+ real_t closest_dist = 1e10;
+ for (int i = 0; i < poly.size(); i++) {
- } break;
- case InputEvent::MOUSE_MOTION: {
+ Vector2 cp = xform.xform(poly[i] + node->get_offset());
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ real_t d = cp.distance_to(gpoint);
+ if (d < closest_dist && d < grab_treshold) {
+ closest_dist = d;
+ closest_pos = cp;
+ closest_idx = i;
+ }
+ }
- if (edited_point != -1 && (wip_active || mm.button_mask & BUTTON_MASK_LEFT)) {
+ if (closest_idx >= 0) {
- Vector2 gpoint = Point2(mm.x, mm.y);
- Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
- cpoint = canvas_item_editor->snap_point(cpoint);
- edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
+ undo_redo->add_undo_method(node, "set_polygon", poly);
+ poly.remove(closest_idx);
+ undo_redo->add_do_method(node, "set_polygon", poly);
+ undo_redo->add_do_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(), "update");
+ undo_redo->commit_action();
+ return true;
+ }
+ }
- canvas_item_editor->get_viewport_control()->update();
- }
+ } break;
+ }
+ }
- } break;
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
+
+ if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
+
+ Vector2 gpoint = mm->get_pos();
+ Vector2 cpoint = canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint);
+ cpoint = canvas_item_editor->snap_point(cpoint);
+ edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+
+ canvas_item_editor->get_viewport_control()->update();
+ }
}
return false;
@@ -455,31 +451,31 @@ void Polygon2DEditor::_uv_mode(int p_mode) {
}
}
-void Polygon2DEditor::_uv_input(const InputEvent &p_input) {
+void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
Transform2D mtx;
mtx.elements[2] = -uv_draw_ofs;
mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom));
- if (p_input.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb = p_input;
- const InputEventMouseButton &mb = p_input.mouse_button;
+ if (mb.is_valid()) {
- if (mb.button_index == BUTTON_LEFT) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
- if (mb.pressed) {
+ if (mb->is_pressed()) {
- uv_drag_from = Vector2(mb.x, mb.y);
+ uv_drag_from = Vector2(mb->get_pos().x, mb->get_pos().y);
uv_drag = true;
uv_prev = node->get_uv();
uv_move_current = uv_mode;
if (uv_move_current == UV_MODE_EDIT_POINT) {
- if (mb.mod.shift && mb.mod.command)
+ if (mb->get_shift() && mb->get_command())
uv_move_current = UV_MODE_SCALE;
- else if (mb.mod.shift)
+ else if (mb->get_shift())
uv_move_current = UV_MODE_MOVE;
- else if (mb.mod.command)
+ else if (mb->get_command())
uv_move_current = UV_MODE_ROTATE;
}
@@ -489,7 +485,7 @@ void Polygon2DEditor::_uv_input(const InputEvent &p_input) {
for (int i = 0; i < uv_prev.size(); i++) {
Vector2 tuv = mtx.xform(uv_prev[i]);
- if (tuv.distance_to(Vector2(mb.x, mb.y)) < 8) {
+ if (tuv.distance_to(Vector2(mb->get_pos().x, mb->get_pos().y)) < 8) {
uv_drag_from = tuv;
uv_drag_index = i;
}
@@ -511,7 +507,7 @@ void Polygon2DEditor::_uv_input(const InputEvent &p_input) {
uv_drag = false;
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed) {
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
if (uv_drag) {
@@ -520,27 +516,28 @@ void Polygon2DEditor::_uv_input(const InputEvent &p_input) {
uv_edit_draw->update();
}
- } else if (mb.button_index == BUTTON_WHEEL_UP && mb.pressed) {
+ } else if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
- uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * mb.factor)));
- } else if (mb.button_index == BUTTON_WHEEL_DOWN && mb.pressed) {
+ uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * mb->get_factor())));
+ } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
- uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * mb.factor)));
+ uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * mb->get_factor())));
}
+ }
- } else if (p_input.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_input;
- const InputEventMouseMotion &mm = p_input.mouse_motion;
+ if (mm.is_valid()) {
- if (mm.button_mask & BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
+ if (mm->get_button_mask() & BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
- Vector2 drag(mm.relative_x, mm.relative_y);
+ Vector2 drag(mm->get_relative().x, mm->get_relative().y);
uv_hscroll->set_value(uv_hscroll->get_value() - drag.x);
uv_vscroll->set_value(uv_vscroll->get_value() - drag.y);
} else if (uv_drag) {
- Vector2 uv_drag_to = snap_point(Vector2(mm.x, mm.y));
+ Vector2 uv_drag_to = mm->get_pos();
Vector2 drag = mtx.affine_inverse().xform(uv_drag_to) - mtx.affine_inverse().xform(uv_drag_from);
switch (uv_move_current) {
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 00926bf2d1..0901cc9082 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -113,7 +113,7 @@ class Polygon2DEditor : public HBoxContainer {
Vector2 snap_step;
void _uv_scroll_changed(float);
- void _uv_input(const InputEvent &p_input);
+ void _uv_input(const Ref<InputEvent> &p_input);
void _uv_draw();
void _uv_mode(int p_mode);
void _wip_close();
@@ -135,7 +135,7 @@ protected:
Vector2 snap_point(Vector2 p_target) const;
public:
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_collision_polygon);
Polygon2DEditor(EditorNode *p_editor);
};
@@ -148,7 +148,7 @@ class Polygon2DEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "Polygon2D"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 3b8d655af7..ea7a84d2f4 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -33,7 +33,7 @@
#include "global_config.h"
#include "io/resource_loader.h"
-void ResourcePreloaderEditor::_gui_input(InputEvent p_event) {
+void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {
}
void ResourcePreloaderEditor::_notification(int p_what) {
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index fad3ba93f1..1f54620ba4 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -70,7 +70,7 @@ class ResourcePreloaderEditor : public PanelContainer {
protected:
void _notification(int p_what);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
static void _bind_methods();
public:
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index a5414325d0..d369064050 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -164,14 +164,16 @@ void ScriptEditorQuickOpen::_text_changed(const String &p_newtext) {
_update_search();
}
-void ScriptEditorQuickOpen::_sbox_input(const InputEvent &p_ie) {
+void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
- if (p_ie.type == InputEvent::KEY && (p_ie.key.scancode == KEY_UP ||
- p_ie.key.scancode == KEY_DOWN ||
- p_ie.key.scancode == KEY_PAGEUP ||
- p_ie.key.scancode == KEY_PAGEDOWN)) {
+ Ref<InputEventKey> k = p_ie;
- search_options->call("_gui_input", p_ie);
+ if (k.is_valid() && (k->get_scancode() == KEY_UP ||
+ k->get_scancode() == KEY_DOWN ||
+ k->get_scancode() == KEY_PAGEUP ||
+ k->get_scancode() == KEY_PAGEDOWN)) {
+
+ search_options->call("_gui_input", k);
search_box->accept_event();
}
}
@@ -1037,7 +1039,7 @@ void ScriptEditor::_notification(int p_what) {
EditorSettings::get_singleton()->connect("settings_changed", this, "_editor_settings_changed");
help_search->set_icon(get_icon("Help", "EditorIcons"));
- site_search->set_icon(get_icon("Godot", "EditorIcons"));
+ site_search->set_icon(get_icon("GodotDocs", "EditorIcons"));
class_search->set_icon(get_icon("ClassList", "EditorIcons"));
script_forward->set_icon(get_icon("Forward", "EditorIcons"));
@@ -1048,6 +1050,7 @@ void ScriptEditor::_notification(int p_what) {
get_tree()->connect("tree_changed", this, "_tree_changed");
editor->connect("request_help", this, "_request_help");
+ editor->connect("request_help_search", this, "_help_search");
}
if (p_what == NOTIFICATION_EXIT_TREE) {
@@ -1374,8 +1377,7 @@ void ScriptEditor::_update_script_colors() {
int non_zero_hist_size = (hist_size == 0) ? 1 : hist_size;
float v = Math::ease((edit_pass - pass) / float(non_zero_hist_size), 0.4);
- //script_list->set_item_custom_bg_color(i, hot_color.linear_interpolate(cold_color, v));
- script_list->set_item_custom_font_color(i, hot_color.linear_interpolate(cold_color, v));
+ script_list->set_item_custom_bg_color(i, hot_color.linear_interpolate(cold_color, v));
}
}
}
@@ -1778,8 +1780,8 @@ void ScriptEditor::_script_split_dragged(float) {
_save_layout();
}
-void ScriptEditor::_unhandled_input(const InputEvent &p_event) {
- if (p_event.key.pressed || !is_visible_in_tree()) return;
+void ScriptEditor::_unhandled_input(const Ref<InputEvent> &p_event) {
+ if (p_event->is_pressed() || !is_visible_in_tree()) return;
if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
int next_tab = script_list->get_current() + 1;
next_tab %= script_list->get_item_count();
@@ -2112,7 +2114,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_split->set_split_offset(140);
tab_container = memnew(TabContainer);
- tab_container->add_style_override("panel", p_editor->get_gui_base()->get_stylebox("EditorBG", "EditorStyles"));
+ tab_container->add_style_override("panel", p_editor->get_gui_base()->get_stylebox("ScriptPanel", "EditorStyles"));
tab_container->set_tabs_visible(false);
script_split->add_child(tab_container);
@@ -2431,8 +2433,8 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("text_editor/open_scripts/script_temperature_enabled", true);
EDITOR_DEF("text_editor/open_scripts/highlight_current_script", true);
EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15);
- EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color", Color::html("ff5446"));
- EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color", Color::html("647b93"));
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color", Color(1, 0, 0, 0.3));
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color", Color(0, 0, 1, 0.3));
EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(0.81, 0.81, 0.14, 0.63));
EDITOR_DEF("text_editor/open_scripts/group_help_pages", true);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path"));
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 983847ddaf..fb2f108277 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -54,7 +54,7 @@ class ScriptEditorQuickOpen : public ConfirmationDialog {
void _update_search();
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
Vector<String> functions;
void _confirmed();
@@ -288,7 +288,7 @@ class ScriptEditor : public VBoxContainer {
void _script_split_dragged(float);
- void _unhandled_input(const InputEvent &p_event);
+ void _unhandled_input(const Ref<InputEvent> &p_event);
void _help_search(String p_text);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 3bb1c7852b..2d3a14e525 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -124,7 +124,6 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_keyword_color("Transform", basetype_color);
text_edit->add_keyword_color("Color", basetype_color);
text_edit->add_keyword_color("Image", basetype_color);
- text_edit->add_keyword_color("InputEvent", basetype_color);
text_edit->add_keyword_color("Rect2", basetype_color);
text_edit->add_keyword_color("NodePath", basetype_color);
@@ -1227,15 +1226,18 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
}
-void ScriptTextEditor::_text_edit_gui_input(const InputEvent &ev) {
- if (ev.type == InputEvent::MOUSE_BUTTON) {
- InputEventMouseButton mb = ev.mouse_button;
- if (mb.button_index == BUTTON_RIGHT && !mb.pressed) {
+void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
+
+ Ref<InputEventMouseButton> mb = ev;
+
+ if (mb.is_valid()) {
+
+ if (mb->get_button_index() == BUTTON_RIGHT && !mb->is_pressed()) {
int col, row;
TextEdit *tx = code_editor->get_text_edit();
- tx->_get_mouse_pos(Point2i(mb.global_x, mb.global_y) - tx->get_global_position(), row, col);
- Vector2 mpos = Vector2(mb.global_x, mb.global_y) - tx->get_global_position();
+ tx->_get_mouse_pos(mb->get_global_pos() - tx->get_global_position(), row, col);
+ Vector2 mpos = mb->get_global_pos() - tx->get_global_position();
bool have_selection = (tx->get_selection_text().length() > 0);
bool have_color = (tx->get_word_at_pos(mpos) == "Color");
if (have_color) {
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 77bce59f2e..fdae03949c 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -106,7 +106,7 @@ protected:
void _edit_option(int p_op);
void _make_context_menu(bool p_selection, bool p_color);
- void _text_edit_gui_input(const InputEvent &ev);
+ void _text_edit_gui_input(const Ref<InputEvent> &ev);
void _color_changed(const Color &p_color);
void _goto_line(int p_line) { goto_line(p_line); }
diff --git a/editor/plugins/shader_graph_editor_plugin.cpp b/editor/plugins/shader_graph_editor_plugin.cpp
index 0fd28a0b59..9c65ef667a 100644
--- a/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/editor/plugins/shader_graph_editor_plugin.cpp
@@ -40,7 +40,7 @@
void GraphColorRampEdit::_gui_input(const InputEvent& p_event) {
- if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) {
+ if (p_event.type==InputEvent::KEY && p_event->is_pressed() && p_event->get_scancode()==KEY_DELETE && grabbed!=-1) {
points.remove(grabbed);
grabbed=-1;
@@ -49,10 +49,10 @@ void GraphColorRampEdit::_gui_input(const InputEvent& p_event) {
accept_event();
}
- if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && p_event.mouse_button.pressed) {
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==1 && p_event->is_pressed()) {
update();
- int x = p_event.mouse_button.x;
+ int x = p_event->get_pos().x;
int total_w = get_size().width-get_size().height-3;
if (x>total_w+3) {
@@ -132,7 +132,7 @@ void GraphColorRampEdit::_gui_input(const InputEvent& p_event) {
}
- if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && !p_event.mouse_button.pressed) {
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==1 && !p_event->is_pressed()) {
if (grabbing) {
grabbing=false;
@@ -319,7 +319,7 @@ GraphColorRampEdit::GraphColorRampEdit(){
void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) {
- if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) {
+ if (p_event.type==InputEvent::KEY && p_event->is_pressed() && p_event->get_scancode()==KEY_DELETE && grabbed!=-1) {
points.remove(grabbed);
grabbed=-1;
@@ -328,10 +328,10 @@ void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) {
accept_event();
}
- if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && p_event.mouse_button.pressed) {
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==1 && p_event->is_pressed()) {
update();
- Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
+ Point2 p = Vector2(p_event->get_pos().x,p_event->get_pos().y)/get_size();
p.y=1.0-p.y;
grabbed=-1;
grabbing=true;
@@ -371,7 +371,7 @@ void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) {
}
- if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1 && !p_event.mouse_button.pressed) {
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==1 && !p_event->is_pressed()) {
if (grabbing) {
grabbing=false;
@@ -382,7 +382,7 @@ void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) {
if (p_event.type==InputEvent::MOUSE_MOTION && grabbing && grabbed != -1) {
- Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
+ Point2 p = Vector2(p_event->get_pos().x,p_event->get_pos().y)/get_size();
p.y=1.0-p.y;
p.x = CLAMP(p.x,0.0,1.0);
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 0bd4d7d6d2..c4595b477e 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -531,12 +531,12 @@ static int _get_key_modifier(const String &p_property) {
return 0;
}
-bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hilite_only) {
+bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_highlight_only) {
if (!spatial_editor->is_gizmo_visible())
return false;
if (get_selected_count() == 0) {
- if (p_hilite_only)
+ if (p_highlight_only)
spatial_editor->select_gizmo_highlight_axis(-1);
return false;
}
@@ -569,7 +569,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil
if (col_axis != -1) {
- if (p_hilite_only) {
+ if (p_highlight_only) {
spatial_editor->select_gizmo_highlight_axis(col_axis);
@@ -609,7 +609,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil
if (col_axis != -1) {
- if (p_hilite_only) {
+ if (p_highlight_only) {
spatial_editor->select_gizmo_highlight_axis(col_axis + 3);
} else {
@@ -622,7 +622,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hil
}
}
- if (p_hilite_only)
+ if (p_highlight_only)
spatial_editor->select_gizmo_highlight_axis(-1);
return false;
@@ -634,9 +634,9 @@ void SpatialEditorViewport::_smouseenter() {
surface->grab_focus();
}
-void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
+void SpatialEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
- _find_items_at_pos(Vector2(b.x, b.y), clicked_includes_current, selection_results, b.mod.shift);
+ _find_items_at_pos(b->get_pos(), clicked_includes_current, selection_results, b->get_shift());
Node *scene = editor->get_edited_scene();
@@ -649,7 +649,7 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
}
}
- clicked_wants_append = b.mod.shift;
+ clicked_wants_append = b->get_shift();
if (selection_results.size() == 1) {
@@ -684,13 +684,13 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
selection_menu->set_item_tooltip(i, String(spat->get_name()) + "\nType: " + spat->get_class() + "\nPath: " + node_path);
}
- selection_menu->set_global_position(Vector2(b.global_x, b.global_y));
+ selection_menu->set_global_position(b->get_global_pos());
selection_menu->popup();
selection_menu->call_deferred("grab_click_focus");
selection_menu->set_invalidate_click_until_motion();
}
}
-void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
+void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (previewing)
return; //do NONE
@@ -707,800 +707,802 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
}
}
- switch (p_event.type) {
- case InputEvent::MOUSE_BUTTON: {
+ Ref<InputEventMouseButton> b = p_event;
- const InputEventMouseButton &b = p_event.mouse_button;
+ if (b.is_valid()) {
- switch (b.button_index) {
+ switch (b->get_button_index()) {
- case BUTTON_WHEEL_UP: {
- scale_cursor_distance(is_freelook_active() ? ZOOM_MULTIPLIER : 1.0 / ZOOM_MULTIPLIER);
- } break;
+ case BUTTON_WHEEL_UP: {
+ scale_cursor_distance(is_freelook_active() ? ZOOM_MULTIPLIER : 1.0 / ZOOM_MULTIPLIER);
+ } break;
- case BUTTON_WHEEL_DOWN: {
- scale_cursor_distance(is_freelook_active() ? 1.0 / ZOOM_MULTIPLIER : ZOOM_MULTIPLIER);
- } break;
+ case BUTTON_WHEEL_DOWN: {
+ scale_cursor_distance(is_freelook_active() ? 1.0 / ZOOM_MULTIPLIER : ZOOM_MULTIPLIER);
+ } break;
- case BUTTON_RIGHT: {
+ case BUTTON_RIGHT: {
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
+ NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
- if (b.pressed && _edit.gizmo.is_valid()) {
- //restore
- _edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_initial_value, true);
- _edit.gizmo = Ref<SpatialEditorGizmo>();
- }
+ if (b->is_pressed() && _edit.gizmo.is_valid()) {
+ //restore
+ _edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_initial_value, true);
+ _edit.gizmo = Ref<SpatialEditorGizmo>();
+ }
- if (_edit.mode == TRANSFORM_NONE && b.pressed) {
+ if (_edit.mode == TRANSFORM_NONE && b->is_pressed()) {
- if (b.mod.alt) {
+ if (b->get_alt()) {
- if (nav_scheme == NAVIGATION_MAYA)
- break;
+ if (nav_scheme == NAVIGATION_MAYA)
+ break;
- _list_select(b);
- return;
- }
+ _list_select(b);
+ return;
}
+ }
- if (_edit.mode != TRANSFORM_NONE && b.pressed) {
- //cancel motion
- _edit.mode = TRANSFORM_NONE;
- //_validate_selection();
+ if (_edit.mode != TRANSFORM_NONE && b->is_pressed()) {
+ //cancel motion
+ _edit.mode = TRANSFORM_NONE;
+ //_validate_selection();
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
- if (!sp)
- continue;
+ Spatial *sp = E->get()->cast_to<Spatial>();
+ if (!sp)
+ continue;
- SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
- if (!se)
- continue;
+ SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
+ if (!se)
+ continue;
- sp->set_global_transform(se->original);
- }
- surface->update();
- //VisualServer::get_singleton()->poly_clear(indicators);
- set_message(TTR("Transform Aborted."), 3);
+ sp->set_global_transform(se->original);
}
+ surface->update();
+ //VisualServer::get_singleton()->poly_clear(indicators);
+ set_message(TTR("Transform Aborted."), 3);
+ }
- freelook_active = b.pressed;
+ freelook_active = b->is_pressed();
- } break;
- case BUTTON_MIDDLE: {
+ } break;
+ case BUTTON_MIDDLE: {
- if (b.pressed && _edit.mode != TRANSFORM_NONE) {
+ if (b->is_pressed() && _edit.mode != TRANSFORM_NONE) {
- switch (_edit.plane) {
+ switch (_edit.plane) {
- case TRANSFORM_VIEW: {
+ case TRANSFORM_VIEW: {
- _edit.plane = TRANSFORM_X_AXIS;
- set_message(TTR("X-Axis Transform."), 2);
- name = "";
- _update_name();
- } break;
- case TRANSFORM_X_AXIS: {
+ _edit.plane = TRANSFORM_X_AXIS;
+ set_message(TTR("X-Axis Transform."), 2);
+ name = "";
+ _update_name();
+ } break;
+ case TRANSFORM_X_AXIS: {
- _edit.plane = TRANSFORM_Y_AXIS;
- set_message(TTR("Y-Axis Transform."), 2);
+ _edit.plane = TRANSFORM_Y_AXIS;
+ set_message(TTR("Y-Axis Transform."), 2);
- } break;
- case TRANSFORM_Y_AXIS: {
+ } break;
+ case TRANSFORM_Y_AXIS: {
- _edit.plane = TRANSFORM_Z_AXIS;
- set_message(TTR("Z-Axis Transform."), 2);
+ _edit.plane = TRANSFORM_Z_AXIS;
+ set_message(TTR("Z-Axis Transform."), 2);
- } break;
- case TRANSFORM_Z_AXIS: {
+ } break;
+ case TRANSFORM_Z_AXIS: {
- _edit.plane = TRANSFORM_VIEW;
- set_message(TTR("View Plane Transform."), 2);
+ _edit.plane = TRANSFORM_VIEW;
+ set_message(TTR("View Plane Transform."), 2);
- } break;
- }
+ } break;
}
- } break;
- case BUTTON_LEFT: {
+ }
+ } break;
+ case BUTTON_LEFT: {
- if (b.pressed) {
+ if (b->is_pressed()) {
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
- if ((nav_scheme == NAVIGATION_MAYA || nav_scheme == NAVIGATION_MODO) && b.mod.alt) {
- break;
- }
+ NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
+ if ((nav_scheme == NAVIGATION_MAYA || nav_scheme == NAVIGATION_MODO) && b->get_alt()) {
+ break;
+ }
- if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_LIST_SELECT) {
- _list_select(b);
- break;
- }
+ if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_LIST_SELECT) {
+ _list_select(b);
+ break;
+ }
- _edit.mouse_pos = Point2(b.x, b.y);
- _edit.snap = false;
- _edit.mode = TRANSFORM_NONE;
+ _edit.mouse_pos = b->get_pos();
+ _edit.snap = false;
+ _edit.mode = TRANSFORM_NONE;
- //gizmo has priority over everything
+ //gizmo has priority over everything
- bool can_select_gizmos = true;
+ bool can_select_gizmos = true;
- {
- int idx = view_menu->get_popup()->get_item_index(VIEW_GIZMOS);
- can_select_gizmos = view_menu->get_popup()->is_item_checked(idx);
- }
+ {
+ int idx = view_menu->get_popup()->get_item_index(VIEW_GIZMOS);
+ can_select_gizmos = view_menu->get_popup()->is_item_checked(idx);
+ }
- if (can_select_gizmos && spatial_editor->get_selected()) {
+ if (can_select_gizmos && spatial_editor->get_selected()) {
- Ref<SpatialEditorGizmo> seg = spatial_editor->get_selected()->get_gizmo();
- if (seg.is_valid()) {
- int handle = -1;
- Vector3 point;
- Vector3 normal;
- bool inters = seg->intersect_ray(camera, _edit.mouse_pos, point, normal, &handle, b.mod.shift);
- if (inters && handle != -1) {
+ Ref<SpatialEditorGizmo> seg = spatial_editor->get_selected()->get_gizmo();
+ if (seg.is_valid()) {
+ int handle = -1;
+ Vector3 point;
+ Vector3 normal;
+ bool inters = seg->intersect_ray(camera, _edit.mouse_pos, point, normal, &handle, b->get_shift());
+ if (inters && handle != -1) {
- _edit.gizmo = seg;
- _edit.gizmo_handle = handle;
- //_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
- _edit.gizmo_initial_value = seg->get_handle_value(handle);
- break;
- }
+ _edit.gizmo = seg;
+ _edit.gizmo_handle = handle;
+ //_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
+ _edit.gizmo_initial_value = seg->get_handle_value(handle);
+ break;
}
}
+ }
- if (_gizmo_select(_edit.mouse_pos))
- break;
+ if (_gizmo_select(_edit.mouse_pos))
+ break;
- clicked = 0;
- clicked_includes_current = false;
+ clicked = 0;
+ clicked_includes_current = false;
- if ((spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT && b.mod.control) || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_ROTATE) {
+ if ((spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT && b->get_control()) || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_ROTATE) {
- /* HANDLE ROTATION */
- if (get_selected_count() == 0)
- break; //bye
- //handle rotate
- _edit.mode = TRANSFORM_ROTATE;
- _compute_edit(Point2(b.x, b.y));
- break;
- }
+ /* HANDLE ROTATION */
+ if (get_selected_count() == 0)
+ break; //bye
+ //handle rotate
+ _edit.mode = TRANSFORM_ROTATE;
+ _compute_edit(b->get_pos());
+ break;
+ }
- if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_MOVE) {
+ if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_MOVE) {
- if (get_selected_count() == 0)
- break; //bye
- //handle rotate
- _edit.mode = TRANSFORM_TRANSLATE;
- _compute_edit(Point2(b.x, b.y));
- break;
- }
+ if (get_selected_count() == 0)
+ break; //bye
+ //handle rotate
+ _edit.mode = TRANSFORM_TRANSLATE;
+ _compute_edit(b->get_pos());
+ break;
+ }
- if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SCALE) {
+ if (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SCALE) {
- if (get_selected_count() == 0)
- break; //bye
- //handle rotate
- _edit.mode = TRANSFORM_SCALE;
- _compute_edit(Point2(b.x, b.y));
- break;
- }
+ if (get_selected_count() == 0)
+ break; //bye
+ //handle rotate
+ _edit.mode = TRANSFORM_SCALE;
+ _compute_edit(b->get_pos());
+ break;
+ }
- // todo scale
+ // todo scale
- int gizmo_handle = -1;
+ int gizmo_handle = -1;
- clicked = _select_ray(Vector2(b.x, b.y), b.mod.shift, clicked_includes_current, &gizmo_handle, b.mod.shift);
+ clicked = _select_ray(b->get_pos(), b->get_shift(), clicked_includes_current, &gizmo_handle, b->get_shift());
- //clicking is always deferred to either move or release
+ //clicking is always deferred to either move or release
- clicked_wants_append = b.mod.shift;
+ clicked_wants_append = b->get_shift();
- if (!clicked) {
+ if (!clicked) {
- if (!clicked_wants_append)
- _clear_selected();
+ if (!clicked_wants_append)
+ _clear_selected();
- //default to regionselect
- cursor.region_select = true;
- cursor.region_begin = Point2(b.x, b.y);
- cursor.region_end = Point2(b.x, b.y);
- }
+ //default to regionselect
+ cursor.region_select = true;
+ cursor.region_begin = b->get_pos();
+ cursor.region_end = b->get_pos();
+ }
- if (clicked && gizmo_handle >= 0) {
+ if (clicked && gizmo_handle >= 0) {
- Object *obj = ObjectDB::get_instance(clicked);
- if (obj) {
+ Object *obj = ObjectDB::get_instance(clicked);
+ if (obj) {
- Spatial *spa = obj->cast_to<Spatial>();
- if (spa) {
+ Spatial *spa = obj->cast_to<Spatial>();
+ if (spa) {
- Ref<SpatialEditorGizmo> seg = spa->get_gizmo();
- if (seg.is_valid()) {
+ Ref<SpatialEditorGizmo> seg = spa->get_gizmo();
+ if (seg.is_valid()) {
- _edit.gizmo = seg;
- _edit.gizmo_handle = gizmo_handle;
- //_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
- _edit.gizmo_initial_value = seg->get_handle_value(gizmo_handle);
- //print_line("GIZMO: "+itos(gizmo_handle)+" FROMPOS: "+_edit.orig_gizmo_pos);
- break;
- }
+ _edit.gizmo = seg;
+ _edit.gizmo_handle = gizmo_handle;
+ //_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
+ _edit.gizmo_initial_value = seg->get_handle_value(gizmo_handle);
+ //print_line("GIZMO: "+itos(gizmo_handle)+" FROMPOS: "+_edit.orig_gizmo_pos);
+ break;
}
}
- //_compute_edit(Point2(b.x,b.y)); //in case a motion happens..
}
+ //_compute_edit(Point2(b.x,b.y)); //in case a motion happens..
+ }
- surface->update();
- } else {
+ surface->update();
+ } else {
- if (_edit.gizmo.is_valid()) {
+ if (_edit.gizmo.is_valid()) {
- _edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_initial_value, false);
- _edit.gizmo = Ref<SpatialEditorGizmo>();
- break;
- }
- if (clicked) {
- _select_clicked(clicked_wants_append, true);
- //clickd processing was deferred
- clicked = 0;
- }
+ _edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_initial_value, false);
+ _edit.gizmo = Ref<SpatialEditorGizmo>();
+ break;
+ }
+ if (clicked) {
+ _select_clicked(clicked_wants_append, true);
+ //clickd processing was deferred
+ clicked = 0;
+ }
- if (cursor.region_select) {
- _select_region();
- cursor.region_select = false;
- surface->update();
- }
+ if (cursor.region_select) {
+ _select_region();
+ cursor.region_select = false;
+ surface->update();
+ }
- if (_edit.mode != TRANSFORM_NONE) {
+ if (_edit.mode != TRANSFORM_NONE) {
- static const char *_transform_name[4] = { "None", "Rotate", "Translate", "Scale" };
- undo_redo->create_action(_transform_name[_edit.mode]);
+ static const char *_transform_name[4] = { "None", "Rotate", "Translate", "Scale" };
+ undo_redo->create_action(_transform_name[_edit.mode]);
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
- if (!sp)
- continue;
+ Spatial *sp = E->get()->cast_to<Spatial>();
+ if (!sp)
+ continue;
- SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
- if (!se)
- continue;
+ SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
+ if (!se)
+ continue;
- undo_redo->add_do_method(sp, "set_global_transform", sp->get_global_transform());
- undo_redo->add_undo_method(sp, "set_global_transform", se->original);
- }
- undo_redo->commit_action();
- _edit.mode = TRANSFORM_NONE;
- //VisualServer::get_singleton()->poly_clear(indicators);
- set_message("");
+ undo_redo->add_do_method(sp, "set_global_transform", sp->get_global_transform());
+ undo_redo->add_undo_method(sp, "set_global_transform", se->original);
}
-
- surface->update();
+ undo_redo->commit_action();
+ _edit.mode = TRANSFORM_NONE;
+ //VisualServer::get_singleton()->poly_clear(indicators);
+ set_message("");
}
- } break;
- }
- } break;
- case InputEvent::MOUSE_MOTION: {
- const InputEventMouseMotion &m = p_event.mouse_motion;
- _edit.mouse_pos = Point2(p_event.mouse_motion.x, p_event.mouse_motion.y);
+ surface->update();
+ }
- if (spatial_editor->get_selected()) {
+ } break;
+ }
+ }
- Ref<SpatialEditorGizmo> seg = spatial_editor->get_selected()->get_gizmo();
- if (seg.is_valid()) {
+ Ref<InputEventMouseMotion> m = p_event;
- int selected_handle = -1;
+ if (m.is_valid()) {
- int handle = -1;
- Vector3 point;
- Vector3 normal;
- bool inters = seg->intersect_ray(camera, _edit.mouse_pos, point, normal, &handle, false);
- if (inters && handle != -1) {
+ _edit.mouse_pos = m->get_pos();
- selected_handle = handle;
- }
+ if (spatial_editor->get_selected()) {
- if (selected_handle != spatial_editor->get_over_gizmo_handle()) {
- spatial_editor->set_over_gizmo_handle(selected_handle);
- spatial_editor->get_selected()->update_gizmo();
- if (selected_handle != -1)
- spatial_editor->select_gizmo_highlight_axis(-1);
- }
- }
- }
+ Ref<SpatialEditorGizmo> seg = spatial_editor->get_selected()->get_gizmo();
+ if (seg.is_valid()) {
+
+ int selected_handle = -1;
+
+ int handle = -1;
+ Vector3 point;
+ Vector3 normal;
+ bool inters = seg->intersect_ray(camera, _edit.mouse_pos, point, normal, &handle, false);
+ if (inters && handle != -1) {
- if (spatial_editor->get_over_gizmo_handle() == -1 && !(m.button_mask & 1) && !_edit.gizmo.is_valid()) {
+ selected_handle = handle;
+ }
- _gizmo_select(_edit.mouse_pos, true);
+ if (selected_handle != spatial_editor->get_over_gizmo_handle()) {
+ spatial_editor->set_over_gizmo_handle(selected_handle);
+ spatial_editor->get_selected()->update_gizmo();
+ if (selected_handle != -1)
+ spatial_editor->select_gizmo_highlight_axis(-1);
+ }
}
+ }
- NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
- NavigationMode nav_mode = NAVIGATION_NONE;
+ if (spatial_editor->get_over_gizmo_handle() == -1 && !(m->get_button_mask() & 1) && !_edit.gizmo.is_valid()) {
- if (_edit.gizmo.is_valid()) {
+ _gizmo_select(_edit.mouse_pos, true);
+ }
- _edit.gizmo->set_handle(_edit.gizmo_handle, camera, Vector2(m.x, m.y));
- Variant v = _edit.gizmo->get_handle_value(_edit.gizmo_handle);
- String n = _edit.gizmo->get_handle_name(_edit.gizmo_handle);
- set_message(n + ": " + String(v));
+ NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
+ NavigationMode nav_mode = NAVIGATION_NONE;
- } else if (m.button_mask & BUTTON_MASK_LEFT) {
+ if (_edit.gizmo.is_valid()) {
- if (nav_scheme == NAVIGATION_MAYA && m.mod.alt) {
- nav_mode = NAVIGATION_ORBIT;
- } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt && m.mod.shift) {
- nav_mode = NAVIGATION_PAN;
- } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt && m.mod.control) {
- nav_mode = NAVIGATION_ZOOM;
- } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt) {
- nav_mode = NAVIGATION_ORBIT;
- } else {
- if (clicked) {
+ _edit.gizmo->set_handle(_edit.gizmo_handle, camera, m->get_pos());
+ Variant v = _edit.gizmo->get_handle_value(_edit.gizmo_handle);
+ String n = _edit.gizmo->get_handle_name(_edit.gizmo_handle);
+ set_message(n + ": " + String(v));
- if (!clicked_includes_current) {
+ } else if (m->get_button_mask() & BUTTON_MASK_LEFT) {
- _select_clicked(clicked_wants_append, true);
- //clickd processing was deferred
- }
+ if (nav_scheme == NAVIGATION_MAYA && m->get_alt()) {
+ nav_mode = NAVIGATION_ORBIT;
+ } else if (nav_scheme == NAVIGATION_MODO && m->get_alt() && m->get_shift()) {
+ nav_mode = NAVIGATION_PAN;
+ } else if (nav_scheme == NAVIGATION_MODO && m->get_alt() && m->get_control()) {
+ nav_mode = NAVIGATION_ZOOM;
+ } else if (nav_scheme == NAVIGATION_MODO && m->get_alt()) {
+ nav_mode = NAVIGATION_ORBIT;
+ } else {
+ if (clicked) {
- _compute_edit(_edit.mouse_pos);
- clicked = 0;
+ if (!clicked_includes_current) {
- _edit.mode = TRANSFORM_TRANSLATE;
+ _select_clicked(clicked_wants_append, true);
+ //clickd processing was deferred
}
- if (cursor.region_select && nav_mode == NAVIGATION_NONE) {
+ _compute_edit(_edit.mouse_pos);
+ clicked = 0;
- cursor.region_end = Point2(m.x, m.y);
- surface->update();
- return;
- }
+ _edit.mode = TRANSFORM_TRANSLATE;
+ }
- if (_edit.mode == TRANSFORM_NONE && nav_mode == NAVIGATION_NONE)
- break;
+ if (cursor.region_select && nav_mode == NAVIGATION_NONE) {
- Vector3 ray_pos = _get_ray_pos(Vector2(m.x, m.y));
- Vector3 ray = _get_ray(Vector2(m.x, m.y));
+ cursor.region_end = m->get_pos();
+ surface->update();
+ return;
+ }
- switch (_edit.mode) {
+ if (_edit.mode == TRANSFORM_NONE && nav_mode == NAVIGATION_NONE)
+ return;
- case TRANSFORM_SCALE: {
+ Vector3 ray_pos = _get_ray_pos(m->get_pos());
+ Vector3 ray = _get_ray(m->get_pos());
- Plane plane = Plane(_edit.center, _get_camera_normal());
+ switch (_edit.mode) {
- Vector3 intersection;
- if (!plane.intersects_ray(ray_pos, ray, &intersection))
- break;
+ case TRANSFORM_SCALE: {
- Vector3 click;
- if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
- break;
+ Plane plane = Plane(_edit.center, _get_camera_normal());
- float center_click_dist = click.distance_to(_edit.center);
- float center_inters_dist = intersection.distance_to(_edit.center);
- if (center_click_dist == 0)
- break;
+ Vector3 intersection;
+ if (!plane.intersects_ray(ray_pos, ray, &intersection))
+ break;
- float scale = (center_inters_dist / center_click_dist) * 100.0;
+ Vector3 click;
+ if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ break;
- if (_edit.snap || spatial_editor->is_snap_enabled()) {
+ float center_click_dist = click.distance_to(_edit.center);
+ float center_inters_dist = intersection.distance_to(_edit.center);
+ if (center_click_dist == 0)
+ break;
- scale = Math::stepify(scale, spatial_editor->get_scale_snap());
- }
+ float scale = (center_inters_dist / center_click_dist) * 100.0;
- set_message(vformat(TTR("Scaling to %s%%."), String::num(scale, 1)));
- scale /= 100.0;
+ if (_edit.snap || spatial_editor->is_snap_enabled()) {
- Transform r;
- r.basis.scale(Vector3(scale, scale, scale));
+ scale = Math::stepify(scale, spatial_editor->get_scale_snap());
+ }
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ set_message(vformat(TTR("Scaling to %s%%."), String::num(scale, 1)));
+ scale /= 100.0;
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ Transform r;
+ r.basis.scale(Vector3(scale, scale, scale));
- Spatial *sp = E->get()->cast_to<Spatial>();
- if (!sp)
- continue;
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
- if (!se)
- continue;
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Transform original = se->original;
+ Spatial *sp = E->get()->cast_to<Spatial>();
+ if (!sp)
+ continue;
- Transform base = Transform(Basis(), _edit.center);
- Transform t = base * (r * (base.inverse() * original));
+ SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
+ if (!se)
+ continue;
- sp->set_global_transform(t);
- }
+ Transform original = se->original;
- surface->update();
+ Transform base = Transform(Basis(), _edit.center);
+ Transform t = base * (r * (base.inverse() * original));
- } break;
+ sp->set_global_transform(t);
+ }
- case TRANSFORM_TRANSLATE: {
+ surface->update();
- Vector3 motion_mask;
- Plane plane;
+ } break;
- switch (_edit.plane) {
- case TRANSFORM_VIEW:
- motion_mask = Vector3(0, 0, 0);
- plane = Plane(_edit.center, _get_camera_normal());
- break;
- case TRANSFORM_X_AXIS:
- motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0);
- plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
- break;
- case TRANSFORM_Y_AXIS:
- motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1);
- plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
- break;
- case TRANSFORM_Z_AXIS:
- motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2);
- plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
- break;
- }
+ case TRANSFORM_TRANSLATE: {
- Vector3 intersection;
- if (!plane.intersects_ray(ray_pos, ray, &intersection))
- break;
+ Vector3 motion_mask;
+ Plane plane;
- Vector3 click;
- if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ switch (_edit.plane) {
+ case TRANSFORM_VIEW:
+ motion_mask = Vector3(0, 0, 0);
+ plane = Plane(_edit.center, _get_camera_normal());
+ break;
+ case TRANSFORM_X_AXIS:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0);
+ plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
+ break;
+ case TRANSFORM_Y_AXIS:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(1);
+ plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
break;
+ case TRANSFORM_Z_AXIS:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2);
+ plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
+ break;
+ }
- //_validate_selection();
- Vector3 motion = intersection - click;
- if (motion_mask != Vector3()) {
- motion = motion_mask.dot(motion) * motion_mask;
- }
+ Vector3 intersection;
+ if (!plane.intersects_ray(ray_pos, ray, &intersection))
+ break;
- float snap = 0;
+ Vector3 click;
+ if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ break;
- if (_edit.snap || spatial_editor->is_snap_enabled()) {
+ //_validate_selection();
+ Vector3 motion = intersection - click;
+ if (motion_mask != Vector3()) {
+ motion = motion_mask.dot(motion) * motion_mask;
+ }
- snap = spatial_editor->get_translate_snap();
- motion.snap(snap);
- }
+ float snap = 0;
- //set_message("Translating: "+motion);
+ if (_edit.snap || spatial_editor->is_snap_enabled()) {
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ snap = spatial_editor->get_translate_snap();
+ motion.snap(snap);
+ }
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ //set_message("Translating: "+motion);
- Spatial *sp = E->get()->cast_to<Spatial>();
- if (!sp) {
- continue;
- }
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
- if (!se) {
- continue;
- }
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Transform t = se->original;
- t.origin += motion;
- sp->set_global_transform(t);
+ Spatial *sp = E->get()->cast_to<Spatial>();
+ if (!sp) {
+ continue;
}
- } break;
- case TRANSFORM_ROTATE: {
+ SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
+ if (!se) {
+ continue;
+ }
- Plane plane;
+ Transform t = se->original;
+ t.origin += motion;
+ sp->set_global_transform(t);
+ }
+ } break;
- switch (_edit.plane) {
- case TRANSFORM_VIEW:
- plane = Plane(_edit.center, _get_camera_normal());
- break;
- case TRANSFORM_X_AXIS:
- plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0));
- break;
- case TRANSFORM_Y_AXIS:
- plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1));
- break;
- case TRANSFORM_Z_AXIS:
- plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2));
- break;
- }
+ case TRANSFORM_ROTATE: {
- Vector3 intersection;
- if (!plane.intersects_ray(ray_pos, ray, &intersection))
- break;
+ Plane plane;
- Vector3 click;
- if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ switch (_edit.plane) {
+ case TRANSFORM_VIEW:
+ plane = Plane(_edit.center, _get_camera_normal());
+ break;
+ case TRANSFORM_X_AXIS:
+ plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0));
break;
+ case TRANSFORM_Y_AXIS:
+ plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1));
+ break;
+ case TRANSFORM_Z_AXIS:
+ plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2));
+ break;
+ }
+
+ Vector3 intersection;
+ if (!plane.intersects_ray(ray_pos, ray, &intersection))
+ break;
- Vector3 y_axis = (click - _edit.center).normalized();
- Vector3 x_axis = plane.normal.cross(y_axis).normalized();
+ Vector3 click;
+ if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click))
+ break;
- float angle = Math::atan2(x_axis.dot(intersection - _edit.center), y_axis.dot(intersection - _edit.center));
- if (_edit.snap || spatial_editor->is_snap_enabled()) {
+ Vector3 y_axis = (click - _edit.center).normalized();
+ Vector3 x_axis = plane.normal.cross(y_axis).normalized();
- float snap = spatial_editor->get_rotate_snap();
+ float angle = Math::atan2(x_axis.dot(intersection - _edit.center), y_axis.dot(intersection - _edit.center));
+ if (_edit.snap || spatial_editor->is_snap_enabled()) {
- if (snap) {
- angle = Math::rad2deg(angle) + snap * 0.5; //else it wont reach +180
- angle -= Math::fmod(angle, snap);
- set_message(vformat(TTR("Rotating %s degrees."), rtos(angle)));
- angle = Math::deg2rad(angle);
- } else
- set_message(vformat(TTR("Rotating %s degrees."), rtos(Math::rad2deg(angle))));
+ float snap = spatial_editor->get_rotate_snap();
- } else {
+ if (snap) {
+ angle = Math::rad2deg(angle) + snap * 0.5; //else it wont reach +180
+ angle -= Math::fmod(angle, snap);
+ set_message(vformat(TTR("Rotating %s degrees."), rtos(angle)));
+ angle = Math::deg2rad(angle);
+ } else
set_message(vformat(TTR("Rotating %s degrees."), rtos(Math::rad2deg(angle))));
- }
- Transform r;
- r.basis.rotate(plane.normal, angle);
+ } else {
+ set_message(vformat(TTR("Rotating %s degrees."), rtos(Math::rad2deg(angle))));
+ }
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ Transform r;
+ r.basis.rotate(plane.normal, angle);
+
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
- if (!sp)
- continue;
+ Spatial *sp = E->get()->cast_to<Spatial>();
+ if (!sp)
+ continue;
- SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
- if (!se)
- continue;
+ SpatialEditorSelectedItem *se = editor_selection->get_node_editor_data<SpatialEditorSelectedItem>(sp);
+ if (!se)
+ continue;
- Transform original = se->original;
+ Transform original = se->original;
- Transform base = Transform(Basis(), _edit.center);
- Transform t = base * r * base.inverse() * original;
+ Transform base = Transform(Basis(), _edit.center);
+ Transform t = base * r * base.inverse() * original;
- sp->set_global_transform(t);
- }
+ sp->set_global_transform(t);
+ }
- surface->update();
- /*
- VisualServer::get_singleton()->poly_clear(indicators);
-
- Vector<Vector3> points;
- Vector<Vector3> empty;
- Vector<Color> colors;
- points.push_back(intersection);
- points.push_back(_edit.original.origin);
- colors.push_back( Color(255,155,100) );
- colors.push_back( Color(255,155,100) );
- VisualServer::get_singleton()->poly_add_primitive(indicators,points,empty,colors,empty);
- */
- } break;
- default: {}
- }
+ surface->update();
+ /*
+ VisualServer::get_singleton()->poly_clear(indicators);
+
+ Vector<Vector3> points;
+ Vector<Vector3> empty;
+ Vector<Color> colors;
+ points.push_back(intersection);
+ points.push_back(_edit.original.origin);
+ colors.push_back( Color(255,155,100) );
+ colors.push_back( Color(255,155,100) );
+ VisualServer::get_singleton()->poly_add_primitive(indicators,points,empty,colors,empty);
+ */
+ } break;
+ default: {}
}
+ }
- } else if (m.button_mask & BUTTON_MASK_RIGHT) {
+ } else if (m->get_button_mask() & BUTTON_MASK_RIGHT) {
- if (nav_scheme == NAVIGATION_MAYA && m.mod.alt) {
- nav_mode = NAVIGATION_ZOOM;
- } else {
- nav_mode = NAVIGATION_LOOK;
- }
+ if (nav_scheme == NAVIGATION_MAYA && m->get_alt()) {
+ nav_mode = NAVIGATION_ZOOM;
+ } else {
+ nav_mode = NAVIGATION_LOOK;
+ }
- } else if (m.button_mask & BUTTON_MASK_MIDDLE) {
-
- if (nav_scheme == NAVIGATION_GODOT) {
-
- int mod = 0;
- if (m.mod.shift)
- mod = KEY_SHIFT;
- if (m.mod.alt)
- mod = KEY_ALT;
- if (m.mod.control)
- mod = KEY_CONTROL;
- if (m.mod.meta)
- mod = KEY_META;
-
- if (mod == _get_key_modifier("editors/3d/pan_modifier"))
- nav_mode = NAVIGATION_PAN;
- else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
- nav_mode = NAVIGATION_ZOOM;
- else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
- nav_mode = NAVIGATION_ORBIT;
-
- } else if (nav_scheme == NAVIGATION_MAYA) {
- if (m.mod.alt)
- nav_mode = NAVIGATION_PAN;
- }
+ } else if (m->get_button_mask() & BUTTON_MASK_MIDDLE) {
+
+ if (nav_scheme == NAVIGATION_GODOT) {
- } else if (EditorSettings::get_singleton()->get("editors/3d/emulate_3_button_mouse")) {
- // Handle trackpad (no external mouse) use case
int mod = 0;
- if (m.mod.shift)
+ if (m->get_shift())
mod = KEY_SHIFT;
- if (m.mod.alt)
+ if (m->get_alt())
mod = KEY_ALT;
- if (m.mod.control)
+ if (m->get_control())
mod = KEY_CONTROL;
- if (m.mod.meta)
+ if (m->get_metakey())
mod = KEY_META;
- if (mod) {
- if (mod == _get_key_modifier("editors/3d/pan_modifier"))
- nav_mode = NAVIGATION_PAN;
- else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
- nav_mode = NAVIGATION_ZOOM;
- else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
- nav_mode = NAVIGATION_ORBIT;
- }
+ if (mod == _get_key_modifier("editors/3d/pan_modifier"))
+ nav_mode = NAVIGATION_PAN;
+ else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
+ nav_mode = NAVIGATION_ZOOM;
+ else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
+ nav_mode = NAVIGATION_ORBIT;
+
+ } else if (nav_scheme == NAVIGATION_MAYA) {
+ if (m->get_alt())
+ nav_mode = NAVIGATION_PAN;
}
- switch (nav_mode) {
- case NAVIGATION_PAN: {
+ } else if (EditorSettings::get_singleton()->get("editors/3d/emulate_3_button_mouse")) {
+ // Handle trackpad (no external mouse) use case
+ int mod = 0;
+ if (m->get_shift())
+ mod = KEY_SHIFT;
+ if (m->get_alt())
+ mod = KEY_ALT;
+ if (m->get_control())
+ mod = KEY_CONTROL;
+ if (m->get_metakey())
+ mod = KEY_META;
+
+ if (mod) {
+ if (mod == _get_key_modifier("editors/3d/pan_modifier"))
+ nav_mode = NAVIGATION_PAN;
+ else if (mod == _get_key_modifier("editors/3d/zoom_modifier"))
+ nav_mode = NAVIGATION_ZOOM;
+ else if (mod == _get_key_modifier("editors/3d/orbit_modifier"))
+ nav_mode = NAVIGATION_ORBIT;
+ }
+ }
- real_t pan_speed = 1 / 150.0;
- int pan_speed_modifier = 10;
- if (nav_scheme == NAVIGATION_MAYA && m.mod.shift)
- pan_speed *= pan_speed_modifier;
+ switch (nav_mode) {
+ case NAVIGATION_PAN: {
- Point2i relative = _get_warped_mouse_motion(m);
+ real_t pan_speed = 1 / 150.0;
+ int pan_speed_modifier = 10;
+ if (nav_scheme == NAVIGATION_MAYA && m->get_shift())
+ pan_speed *= pan_speed_modifier;
- Transform camera_transform;
-
- camera_transform.translate(cursor.pos);
- camera_transform.basis.rotate(Vector3(1, 0, 0), -cursor.x_rot);
- camera_transform.basis.rotate(Vector3(0, 1, 0), -cursor.y_rot);
- Vector3 translation(-relative.x * pan_speed, relative.y * pan_speed, 0);
- translation *= cursor.distance / DISTANCE_DEFAULT;
- camera_transform.translate(translation);
- cursor.pos = camera_transform.origin;
-
- } break;
-
- case NAVIGATION_ZOOM: {
- real_t zoom_speed = 1 / 80.0;
- int zoom_speed_modifier = 10;
- if (nav_scheme == NAVIGATION_MAYA && m.mod.shift)
- zoom_speed *= zoom_speed_modifier;
-
- NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("editors/3d/zoom_style").operator int();
- if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) {
- if (m.relative_x > 0)
- scale_cursor_distance(1 - m.relative_x * zoom_speed);
- else if (m.relative_x < 0)
- scale_cursor_distance(1.0 / (1 + m.relative_x * zoom_speed));
- } else {
- if (m.relative_y > 0)
- scale_cursor_distance(1 + m.relative_y * zoom_speed);
- else if (m.relative_y < 0)
- scale_cursor_distance(1.0 / (1 - m.relative_y * zoom_speed));
- }
+ Point2i relative = _get_warped_mouse_motion(m);
+
+ Transform camera_transform;
+
+ camera_transform.translate(cursor.pos);
+ camera_transform.basis.rotate(Vector3(1, 0, 0), -cursor.x_rot);
+ camera_transform.basis.rotate(Vector3(0, 1, 0), -cursor.y_rot);
+ Vector3 translation(-relative.x * pan_speed, relative.y * pan_speed, 0);
+ translation *= cursor.distance / DISTANCE_DEFAULT;
+ camera_transform.translate(translation);
+ cursor.pos = camera_transform.origin;
+
+ } break;
+
+ case NAVIGATION_ZOOM: {
+ real_t zoom_speed = 1 / 80.0;
+ int zoom_speed_modifier = 10;
+ if (nav_scheme == NAVIGATION_MAYA && m->get_shift())
+ zoom_speed *= zoom_speed_modifier;
+
+ NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("editors/3d/zoom_style").operator int();
+ if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) {
+ if (m->get_relative().x > 0)
+ scale_cursor_distance(1 - m->get_relative().x * zoom_speed);
+ else if (m->get_relative().x < 0)
+ scale_cursor_distance(1.0 / (1 + m->get_relative().x * zoom_speed));
+ } else {
+ if (m->get_relative().y > 0)
+ scale_cursor_distance(1 + m->get_relative().y * zoom_speed);
+ else if (m->get_relative().y < 0)
+ scale_cursor_distance(1.0 / (1 - m->get_relative().y * zoom_speed));
+ }
+
+ } break;
- } break;
+ case NAVIGATION_ORBIT: {
+ Point2i relative = _get_warped_mouse_motion(m);
+ cursor.x_rot += relative.y / 80.0;
+ cursor.y_rot += relative.x / 80.0;
+ if (cursor.x_rot > Math_PI / 2.0)
+ cursor.x_rot = Math_PI / 2.0;
+ if (cursor.x_rot < -Math_PI / 2.0)
+ cursor.x_rot = -Math_PI / 2.0;
+ name = "";
+ _update_name();
+ } break;
- case NAVIGATION_ORBIT: {
+ case NAVIGATION_LOOK: {
+ // Freelook only works properly in perspective.
+ // It technically works too in ortho, but it's awful for a user due to fov being near zero
+ if (!orthogonal) {
Point2i relative = _get_warped_mouse_motion(m);
- cursor.x_rot += relative.y / 80.0;
- cursor.y_rot += relative.x / 80.0;
+ cursor.x_rot += relative.y / 120.0;
+ cursor.y_rot += relative.x / 120.0;
if (cursor.x_rot > Math_PI / 2.0)
cursor.x_rot = Math_PI / 2.0;
if (cursor.x_rot < -Math_PI / 2.0)
cursor.x_rot = -Math_PI / 2.0;
+
+ // Look is like Orbit, except the cursor translates, not the camera
+ Transform camera_transform = to_camera_transform(cursor);
+ Vector3 pos = camera_transform.xform(Vector3(0, 0, 0));
+ Vector3 diff = camera->get_translation() - pos;
+ cursor.pos += diff;
+
name = "";
_update_name();
- } break;
-
- case NAVIGATION_LOOK: {
- // Freelook only works properly in perspective.
- // It technically works too in ortho, but it's awful for a user due to fov being near zero
- if (!orthogonal) {
- Point2i relative = _get_warped_mouse_motion(m);
- cursor.x_rot += relative.y / 120.0;
- cursor.y_rot += relative.x / 120.0;
- if (cursor.x_rot > Math_PI / 2.0)
- cursor.x_rot = Math_PI / 2.0;
- if (cursor.x_rot < -Math_PI / 2.0)
- cursor.x_rot = -Math_PI / 2.0;
-
- // Look is like Orbit, except the cursor translates, not the camera
- Transform camera_transform = to_camera_transform(cursor);
- Vector3 pos = camera_transform.xform(Vector3(0, 0, 0));
- Vector3 diff = camera->get_translation() - pos;
- cursor.pos += diff;
-
- name = "";
- _update_name();
- }
+ }
- } break;
+ } break;
- default: {}
- }
- } break;
- case InputEvent::KEY: {
- const InputEventKey &k = p_event.key;
- if (!k.pressed)
- break;
+ default: {}
+ }
+ }
- if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) {
- if (_edit.mode != TRANSFORM_NONE) {
- _edit.snap = true;
- }
- }
- if (ED_IS_SHORTCUT("spatial_editor/bottom_view", p_event)) {
- cursor.y_rot = 0;
- cursor.x_rot = -Math_PI / 2.0;
- set_message(TTR("Bottom View."), 2);
- name = TTR("Bottom");
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/top_view", p_event)) {
- cursor.y_rot = 0;
- cursor.x_rot = Math_PI / 2.0;
- set_message(TTR("Top View."), 2);
- name = TTR("Top");
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/rear_view", p_event)) {
- cursor.x_rot = 0;
- cursor.y_rot = Math_PI;
- set_message(TTR("Rear View."), 2);
- name = TTR("Rear");
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/front_view", p_event)) {
- cursor.x_rot = 0;
- cursor.y_rot = 0;
- set_message(TTR("Front View."), 2);
- name = TTR("Front");
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/left_view", p_event)) {
- cursor.x_rot = 0;
- cursor.y_rot = Math_PI / 2.0;
- set_message(TTR("Left View."), 2);
- name = TTR("Left");
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/right_view", p_event)) {
- cursor.x_rot = 0;
- cursor.y_rot = -Math_PI / 2.0;
- set_message(TTR("Right View."), 2);
- name = TTR("Right");
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/switch_perspective_orthogonal", p_event)) {
- _menu_option(orthogonal ? VIEW_PERSPECTIVE : VIEW_ORTHOGONAL);
- _update_name();
- }
- if (ED_IS_SHORTCUT("spatial_editor/insert_anim_key", p_event)) {
- if (!get_selected_count() || _edit.mode != TRANSFORM_NONE)
- break;
+ Ref<InputEventKey> k = p_event;
- if (!AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) {
- set_message(TTR("Keying is disabled (no key inserted)."));
- break;
- }
+ if (k.is_valid()) {
+ if (!k->is_pressed())
+ return;
+
+ if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) {
+ if (_edit.mode != TRANSFORM_NONE) {
+ _edit.snap = true;
+ }
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/bottom_view", p_event)) {
+ cursor.y_rot = 0;
+ cursor.x_rot = -Math_PI / 2.0;
+ set_message(TTR("Bottom View."), 2);
+ name = TTR("Bottom");
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/top_view", p_event)) {
+ cursor.y_rot = 0;
+ cursor.x_rot = Math_PI / 2.0;
+ set_message(TTR("Top View."), 2);
+ name = TTR("Top");
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/rear_view", p_event)) {
+ cursor.x_rot = 0;
+ cursor.y_rot = Math_PI;
+ set_message(TTR("Rear View."), 2);
+ name = TTR("Rear");
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/front_view", p_event)) {
+ cursor.x_rot = 0;
+ cursor.y_rot = 0;
+ set_message(TTR("Front View."), 2);
+ name = TTR("Front");
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/left_view", p_event)) {
+ cursor.x_rot = 0;
+ cursor.y_rot = Math_PI / 2.0;
+ set_message(TTR("Left View."), 2);
+ name = TTR("Left");
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/right_view", p_event)) {
+ cursor.x_rot = 0;
+ cursor.y_rot = -Math_PI / 2.0;
+ set_message(TTR("Right View."), 2);
+ name = TTR("Right");
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/switch_perspective_orthogonal", p_event)) {
+ _menu_option(orthogonal ? VIEW_PERSPECTIVE : VIEW_ORTHOGONAL);
+ _update_name();
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/insert_anim_key", p_event)) {
+ if (!get_selected_count() || _edit.mode != TRANSFORM_NONE)
+ return;
- List<Node *> &selection = editor_selection->get_selected_node_list();
+ if (!AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) {
+ set_message(TTR("Keying is disabled (no key inserted)."));
+ return;
+ }
- for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
+ List<Node *> &selection = editor_selection->get_selected_node_list();
- Spatial *sp = E->get()->cast_to<Spatial>();
- if (!sp)
- continue;
+ for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- emit_signal("transform_key_request", sp, "", sp->get_transform());
- }
+ Spatial *sp = E->get()->cast_to<Spatial>();
+ if (!sp)
+ continue;
- set_message(TTR("Animation Key Inserted."));
+ emit_signal("transform_key_request", sp, "", sp->get_transform());
}
- if (k.scancode == KEY_SPACE) {
- if (!k.pressed) emit_signal("toggle_maximize_view", this);
- }
+ set_message(TTR("Animation Key Inserted."));
+ }
- } break;
+ if (k->get_scancode() == KEY_SPACE) {
+ if (!k->is_pressed()) emit_signal("toggle_maximize_view", this);
+ }
}
}
@@ -1526,12 +1528,12 @@ void SpatialEditorViewport::scale_cursor_distance(real_t scale) {
surface->update();
}
-Point2i SpatialEditorViewport::_get_warped_mouse_motion(const InputEventMouseMotion &p_ev_mouse_motion) const {
+Point2i SpatialEditorViewport::_get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const {
Point2i relative;
if (bool(EditorSettings::get_singleton()->get("editors/3d/warped_mouse_panning"))) {
relative = Input::get_singleton()->warp_mouse_motion(p_ev_mouse_motion, surface->get_global_rect());
} else {
- relative = Point2i(p_ev_mouse_motion.relative_x, p_ev_mouse_motion.relative_y);
+ relative = p_ev_mouse_motion->get_relative();
}
return relative;
}
@@ -1545,13 +1547,13 @@ void SpatialEditorViewport::_update_freelook(real_t delta) {
Vector3 right = camera->get_transform().basis.xform(Vector3(1, 0, 0));
Vector3 up = camera->get_transform().basis.xform(Vector3(0, 1, 0));
- int key_left = ED_SHORTCUT("spatial_editor/freelook_left", TTR("Freelook Left"), KEY_A)->get_shortcut().key.scancode;
- int key_right = ED_SHORTCUT("spatial_editor/freelook_right", TTR("Freelook Right"), KEY_D)->get_shortcut().key.scancode;
- int key_forward = ED_SHORTCUT("spatial_editor/freelook_forward", TTR("Freelook Forward"), KEY_W)->get_shortcut().key.scancode;
- int key_backwards = ED_SHORTCUT("spatial_editor/freelook_backwards", TTR("Freelook Backwards"), KEY_S)->get_shortcut().key.scancode;
- int key_up = ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), KEY_Q)->get_shortcut().key.scancode;
- int key_down = ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), KEY_E)->get_shortcut().key.scancode;
- int key_speed_modifier = ED_SHORTCUT("spatial_editor/freelook_speed_modifier", TTR("Freelook Speed Modifier"), KEY_SHIFT)->get_shortcut().key.scancode;
+ int key_left = ED_SHORTCUT("spatial_editor/freelook_left", TTR("Freelook Left"), KEY_A)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_right = ED_SHORTCUT("spatial_editor/freelook_right", TTR("Freelook Right"), KEY_D)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_forward = ED_SHORTCUT("spatial_editor/freelook_forward", TTR("Freelook Forward"), KEY_W)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_backwards = ED_SHORTCUT("spatial_editor/freelook_backwards", TTR("Freelook Backwards"), KEY_S)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_up = ED_SHORTCUT("spatial_editor/freelook_up", TTR("Freelook Up"), KEY_Q)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_down = ED_SHORTCUT("spatial_editor/freelook_down", TTR("Freelook Down"), KEY_E)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_speed_modifier = ED_SHORTCUT("spatial_editor/freelook_speed_modifier", TTR("Freelook Speed Modifier"), KEY_SHIFT)->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
Vector3 velocity;
bool pressed = false;
@@ -1766,7 +1768,7 @@ void SpatialEditorViewport::_draw() {
if (surface->has_focus()) {
Size2 size = surface->get_size();
Rect2 r = Rect2(Point2(), size);
- get_stylebox("EditorFocus", "EditorStyles")->draw(surface->get_canvas_item(), r);
+ get_stylebox("Focus", "EditorStyles")->draw(surface->get_canvas_item(), r);
}
RID ci = surface->get_canvas_item();
@@ -3274,7 +3276,7 @@ bool SpatialEditor::is_any_freelook_active() const {
return false;
}
-void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
+void SpatialEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
@@ -3294,43 +3296,39 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
}
#endif
- switch (p_event.type) {
-
- case InputEvent::KEY: {
+ Ref<InputEventKey> k = p_event;
- // Note: need to check is_echo because first person movement keys might still be held
- if (!is_any_freelook_active() && !p_event.is_echo()) {
+ if (k.is_valid()) {
- const InputEventKey &k = p_event.key;
+ // Note: need to check is_echo because first person movement keys might still be held
+ if (!is_any_freelook_active() && !p_event->is_echo()) {
- if (!k.pressed)
- break;
+ if (!k->is_pressed())
+ return;
- if (ED_IS_SHORTCUT("spatial_editor/tool_select", p_event))
- _menu_item_pressed(MENU_TOOL_SELECT);
+ if (ED_IS_SHORTCUT("spatial_editor/tool_select", p_event))
+ _menu_item_pressed(MENU_TOOL_SELECT);
- else if (ED_IS_SHORTCUT("spatial_editor/tool_move", p_event))
- _menu_item_pressed(MENU_TOOL_MOVE);
+ else if (ED_IS_SHORTCUT("spatial_editor/tool_move", p_event))
+ _menu_item_pressed(MENU_TOOL_MOVE);
- else if (ED_IS_SHORTCUT("spatial_editor/tool_rotate", p_event))
- _menu_item_pressed(MENU_TOOL_ROTATE);
+ else if (ED_IS_SHORTCUT("spatial_editor/tool_rotate", p_event))
+ _menu_item_pressed(MENU_TOOL_ROTATE);
- else if (ED_IS_SHORTCUT("spatial_editor/tool_scale", p_event))
- _menu_item_pressed(MENU_TOOL_SCALE);
+ else if (ED_IS_SHORTCUT("spatial_editor/tool_scale", p_event))
+ _menu_item_pressed(MENU_TOOL_SCALE);
- else if (ED_IS_SHORTCUT("spatial_editor/display_wireframe", p_event)) {
- if (k.mod.shift || k.mod.control || k.mod.command)
- break;
+ else if (ED_IS_SHORTCUT("spatial_editor/display_wireframe", p_event)) {
+ if (k->get_shift() || k->get_control() || k->get_command())
+ return;
- if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME))) {
- _menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL);
- } else {
- _menu_item_pressed(MENU_VIEW_DISPLAY_WIREFRAME);
- }
+ if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_DISPLAY_WIREFRAME))) {
+ _menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL);
+ } else {
+ _menu_item_pressed(MENU_VIEW_DISPLAY_WIREFRAME);
}
}
-
- } break;
+ }
}
}
void SpatialEditor::_notification(int p_what) {
@@ -3547,12 +3545,13 @@ void SpatialEditor::_update_default_light_angle() {
}
}
-void SpatialEditor::_default_light_angle_input(const InputEvent &p_event) {
+void SpatialEditor::_default_light_angle_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask & (0x1 | 0x2 | 0x4)) {
+ Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid() && mm->get_button_mask() & (0x1 | 0x2 | 0x4)) {
- settings_default_light_rot_y = Math::fposmod(settings_default_light_rot_y - p_event.mouse_motion.relative_x * 0.01, Math_PI * 2.0);
- settings_default_light_rot_x = Math::fposmod(settings_default_light_rot_x - p_event.mouse_motion.relative_y * 0.01, Math_PI * 2.0);
+ settings_default_light_rot_y = Math::fposmod(settings_default_light_rot_y - mm->get_relative().x * 0.01, Math_PI * 2.0);
+ settings_default_light_rot_x = Math::fposmod(settings_default_light_rot_x - mm->get_relative().y * 0.01, Math_PI * 2.0);
_update_default_light_angle();
}
}
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index 01435028ac..1f76d9bfb8 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -142,7 +142,7 @@ private:
Vector3 _get_screen_to_space(const Vector3 &p_vector3);
void _select_region();
- bool _gizmo_select(const Vector2 &p_screenpos, bool p_hilite_only = false);
+ bool _gizmo_select(const Vector2 &p_screenpos, bool p_highlight_only = false);
float get_znear() const;
float get_zfar() const;
@@ -236,7 +236,7 @@ private:
void _draw();
void _smouseenter();
- void _sinput(const InputEvent &p_ie);
+ void _sinput(const Ref<InputEvent> &p_ie);
void _update_freelook(real_t delta);
SpatialEditor *spatial_editor;
@@ -249,8 +249,8 @@ private:
void _finish_gizmo_instances();
void _selection_result_pressed(int);
void _selection_menu_hide();
- void _list_select(InputEventMouseButton b);
- Point2i _get_warped_mouse_motion(const InputEventMouseMotion &p_ev_mouse_motion) const;
+ void _list_select(Ref<InputEventMouseButton> b);
+ Point2i _get_warped_mouse_motion(const Ref<InputEventMouseMotion> &p_ev_mouse_motion) const;
protected:
void _notification(int p_what);
@@ -428,7 +428,7 @@ private:
ViewportContainer *settings_light_base;
Viewport *settings_light_vp;
ColorPickerButton *settings_ambient_color;
- Image settings_light_dir_image;
+ Ref<Image> settings_light_dir_image;
void _xform_dialog_action();
void _menu_item_pressed(int p_option);
@@ -464,14 +464,14 @@ private:
void _update_ambient_light_color(const Color &p_color);
void _update_default_light_angle();
- void _default_light_angle_input(const InputEvent &p_event);
+ void _default_light_angle_input(const Ref<InputEvent> &p_event);
bool is_any_freelook_active() const;
protected:
void _notification(int p_what);
//void _gui_input(InputEvent p_event);
- void _unhandled_key_input(InputEvent p_event);
+ void _unhandled_key_input(Ref<InputEvent> p_event);
static void _bind_methods();
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index c7c77fa960..d06c065f4f 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -34,7 +34,7 @@
#include "io/resource_loader.h"
#include "scene/3d/sprite_3d.h"
-void SpriteFramesEditor::_gui_input(InputEvent p_event) {
+void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {
}
void SpriteFramesEditor::_notification(int p_what) {
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 3778e4ca55..c9081c599a 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -100,7 +100,7 @@ class SpriteFramesEditor : public PanelContainer {
protected:
void _notification(int p_what);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
static void _bind_methods();
public:
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 62977d86ea..3b705aae24 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -33,7 +33,7 @@
#include "global_config.h"
#include "io/resource_loader.h"
-void TextureEditor::_gui_input(InputEvent p_event) {
+void TextureEditor::_gui_input(Ref<InputEvent> p_event) {
}
void TextureEditor::_notification(int p_what) {
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 8750ce4d5e..9382983538 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -42,7 +42,7 @@ class TextureEditor : public Control {
protected:
void _notification(int p_what);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
static void _bind_methods();
public:
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 4c49b467d8..799bfbf358 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -202,7 +202,7 @@ void TextureRegionEditor::_region_draw() {
}
}
-void TextureRegionEditor::_region_input(const InputEvent &p_input) {
+void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
Transform2D mtx;
mtx.elements[2] = -draw_ofs;
mtx.scale_basis(Vector2(draw_zoom, draw_zoom));
@@ -218,13 +218,12 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
mtx.xform(rect.pos + Vector2(0, rect.size.y / 2)) + Vector2(-4, 0)
};
- if (p_input.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb;
+ if (mb.is_valid()) {
- const InputEventMouseButton &mb = p_input.mouse_button;
+ if (mb->get_button_index() == BUTTON_LEFT) {
- if (mb.button_index == BUTTON_LEFT) {
-
- if (mb.pressed) {
+ if (mb->is_pressed()) {
if (node_patch9 || obj_styleBox.is_valid()) {
edited_margin = -1;
float margins[4];
@@ -245,26 +244,26 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
mtx.basis_xform(rect.pos + Vector2(margins[2], 0)) - draw_ofs,
mtx.basis_xform(rect.pos + rect.size - Vector2(margins[3], 0)) - draw_ofs
};
- if (Math::abs(mb.y - pos[0].y) < 8) {
+ if (Math::abs(mb->get_pos().y - pos[0].y) < 8) {
edited_margin = 0;
prev_margin = margins[0];
- } else if (Math::abs(mb.y - pos[1].y) < 8) {
+ } else if (Math::abs(mb->get_pos().y - pos[1].y) < 8) {
edited_margin = 1;
prev_margin = margins[1];
- } else if (Math::abs(mb.x - pos[2].x) < 8) {
+ } else if (Math::abs(mb->get_pos().x - pos[2].x) < 8) {
edited_margin = 2;
prev_margin = margins[2];
- } else if (Math::abs(mb.x - pos[3].x) < 8) {
+ } else if (Math::abs(mb->get_pos().x - pos[3].x) < 8) {
edited_margin = 3;
prev_margin = margins[3];
}
if (edited_margin >= 0) {
- drag_from = Vector2(mb.x, mb.y);
+ drag_from = Vector2(mb->get_pos().x, mb->get_pos().y);
drag = true;
}
}
if (edited_margin < 0 && snap_mode == SNAP_AUTOSLICE) {
- Vector2 point = mtx.affine_inverse().xform(Vector2(mb.x, mb.y));
+ Vector2 point = mtx.affine_inverse().xform(Vector2(mb->get_pos().x, mb->get_pos().y));
for (List<Rect2>::Element *E = autoslice_cache.front(); E; E = E->next()) {
if (E->get().has_point(point)) {
rect = E->get();
@@ -302,7 +301,7 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
}
}
} else if (edited_margin < 0) {
- drag_from = mtx.affine_inverse().xform(Vector2(mb.x, mb.y));
+ drag_from = mtx.affine_inverse().xform(Vector2(mb->get_pos().x, mb->get_pos().y));
if (snap_mode == SNAP_PIXEL)
drag_from = drag_from.snapped(Vector2(1, 1));
else if (snap_mode == SNAP_GRID)
@@ -319,7 +318,7 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
for (int i = 0; i < 8; i++) {
Vector2 tuv = endpoints[i];
- if (tuv.distance_to(Vector2(mb.x, mb.y)) < 8) {
+ if (tuv.distance_to(Vector2(mb->get_pos().x, mb->get_pos().y)) < 8) {
drag_index = i;
}
}
@@ -369,7 +368,7 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
creating = false;
}
- } else if (mb.button_index == BUTTON_RIGHT && mb.pressed) {
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
if (drag) {
drag = false;
@@ -387,18 +386,20 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
drag_index = -1;
}
}
- } else if (mb.button_index == BUTTON_WHEEL_UP && mb.pressed) {
+ } else if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
_zoom_in();
- } else if (mb.button_index == BUTTON_WHEEL_DOWN && mb.pressed) {
+ } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
_zoom_out();
}
- } else if (p_input.type == InputEvent::MOUSE_MOTION) {
+ }
+
+ Ref<InputEventMouseMotion> mm = p_input;
- const InputEventMouseMotion &mm = p_input.mouse_motion;
+ if (mm.is_valid()) {
- if (mm.button_mask & BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
+ if (mm->get_button_mask() & BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
- Vector2 draged(mm.relative_x, mm.relative_y);
+ Vector2 draged(mm->get_relative().x, mm->get_relative().y);
hscroll->set_value(hscroll->get_value() - draged.x);
vscroll->set_value(vscroll->get_value() - draged.y);
@@ -407,13 +408,13 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
if (edited_margin >= 0) {
float new_margin;
if (edited_margin == 0)
- new_margin = prev_margin + (mm.y - drag_from.y) / draw_zoom;
+ new_margin = prev_margin + (mm->get_pos().y - drag_from.y) / draw_zoom;
else if (edited_margin == 1)
- new_margin = prev_margin - (mm.y - drag_from.y) / draw_zoom;
+ new_margin = prev_margin - (mm->get_pos().y - drag_from.y) / draw_zoom;
else if (edited_margin == 2)
- new_margin = prev_margin + (mm.x - drag_from.x) / draw_zoom;
+ new_margin = prev_margin + (mm->get_pos().x - drag_from.x) / draw_zoom;
else if (edited_margin == 3)
- new_margin = prev_margin - (mm.x - drag_from.x) / draw_zoom;
+ new_margin = prev_margin - (mm->get_pos().x - drag_from.x) / draw_zoom;
if (new_margin < 0)
new_margin = 0;
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
@@ -422,7 +423,7 @@ void TextureRegionEditor::_region_input(const InputEvent &p_input) {
if (obj_styleBox.is_valid())
obj_styleBox->set_margin_size(m[edited_margin], new_margin);
} else {
- Vector2 new_pos = mtx.affine_inverse().xform(Vector2(mm.x, mm.y));
+ Vector2 new_pos = mtx.affine_inverse().xform(mm->get_pos());
if (snap_mode == SNAP_PIXEL)
new_pos = new_pos.snapped(Vector2(1, 1));
else if (snap_mode == SNAP_GRID)
@@ -678,12 +679,13 @@ void TextureRegionEditor::_edit_region() {
}
autoslice_cache.clear();
- Image i;
- if (i.load(texture->get_path()) == OK) {
+ Ref<Image> i;
+ i.instance();
+ if (i->load(texture->get_path()) == OK) {
BitMap bm;
bm.create_from_image_alpha(i);
- for (int y = 0; y < i.get_height(); y++) {
- for (int x = 0; x < i.get_width(); x++) {
+ for (int y = 0; y < i->get_height(); y++) {
+ for (int x = 0; x < i->get_width(); x++) {
if (bm.get_bit(Point2(x, y))) {
bool found = false;
for (List<Rect2>::Element *E = autoslice_cache.front(); E; E = E->next()) {
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 093e2f7d01..cb0b9fc372 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -122,7 +122,7 @@ protected:
public:
void _edit_region();
void _region_draw();
- void _region_input(const InputEvent &p_input);
+ void _region_input(const Ref<InputEvent> &p_input);
void _scroll_changed(float);
void edit(Object *p_obj);
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 9f99a9b978..9f7a41b8b6 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -179,14 +179,16 @@ void TileMapEditor::_text_changed(const String &p_text) {
_update_palette();
}
-void TileMapEditor::_sbox_input(const InputEvent &p_ie) {
+void TileMapEditor::_sbox_input(const Ref<InputEvent> &p_ie) {
- if (p_ie.type == InputEvent::KEY && (p_ie.key.scancode == KEY_UP ||
- p_ie.key.scancode == KEY_DOWN ||
- p_ie.key.scancode == KEY_PAGEUP ||
- p_ie.key.scancode == KEY_PAGEDOWN)) {
+ Ref<InputEventKey> k = p_ie;
- palette->call("_gui_input", p_ie);
+ if (k.is_valid() && (k->get_scancode() == KEY_UP ||
+ k->get_scancode() == KEY_DOWN ||
+ k->get_scancode() == KEY_PAGEUP ||
+ k->get_scancode() == KEY_PAGEDOWN)) {
+
+ palette->call("_gui_input", k);
search_box->accept_event();
}
}
@@ -622,7 +624,7 @@ static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) {
return points;
}
-bool TileMapEditor::forward_gui_input(const InputEvent &p_event) {
+bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (!node || !node->get_tileset().is_valid() || !node->is_visible_in_tree())
return false;
@@ -630,464 +632,459 @@ bool TileMapEditor::forward_gui_input(const InputEvent &p_event) {
Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();
Transform2D xform_inv = xform.affine_inverse();
- switch (p_event.type) {
-
- case InputEvent::MOUSE_BUTTON: {
-
- const InputEventMouseButton &mb = p_event.mouse_button;
-
- if (mb.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
- if (mb.pressed) {
+ if (mb.is_valid()) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
- if (Input::get_singleton()->is_key_pressed(KEY_SPACE))
- return false; //drag
+ if (mb->is_pressed()) {
- if (tool == TOOL_NONE) {
+ if (Input::get_singleton()->is_key_pressed(KEY_SPACE))
+ return false; //drag
- if (mb.mod.shift) {
+ if (tool == TOOL_NONE) {
- if (mb.mod.control)
- tool = TOOL_RECTANGLE_PAINT;
- else
- tool = TOOL_LINE_PAINT;
+ if (mb->get_shift()) {
- selection_active = false;
- rectangle_begin = over_tile;
+ if (mb->get_control())
+ tool = TOOL_RECTANGLE_PAINT;
+ else
+ tool = TOOL_LINE_PAINT;
- return true;
- }
+ selection_active = false;
+ rectangle_begin = over_tile;
- if (mb.mod.control) {
+ return true;
+ }
- tool = TOOL_PICKING;
- _pick_tile(over_tile);
+ if (mb->get_control()) {
- return true;
- }
+ tool = TOOL_PICKING;
+ _pick_tile(over_tile);
- tool = TOOL_PAINTING;
+ return true;
}
- if (tool == TOOL_PAINTING) {
-
- int id = get_selected_tile();
+ tool = TOOL_PAINTING;
+ }
- if (id != TileMap::INVALID_CELL) {
+ if (tool == TOOL_PAINTING) {
- tool = TOOL_PAINTING;
+ int id = get_selected_tile();
- paint_undo.clear();
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
+ if (id != TileMap::INVALID_CELL) {
- _set_cell(over_tile, id, flip_h, flip_v, transpose);
- }
- } else if (tool == TOOL_PICKING) {
+ tool = TOOL_PAINTING;
- _pick_tile(over_tile);
- } else if (tool == TOOL_SELECTING) {
+ paint_undo.clear();
+ paint_undo[over_tile] = _get_op_from_cell(over_tile);
- selection_active = true;
- rectangle_begin = over_tile;
+ _set_cell(over_tile, id, flip_h, flip_v, transpose);
}
+ } else if (tool == TOOL_PICKING) {
- return true;
+ _pick_tile(over_tile);
+ } else if (tool == TOOL_SELECTING) {
- } else {
+ selection_active = true;
+ rectangle_begin = over_tile;
+ }
+
+ return true;
- if (tool != TOOL_NONE) {
+ } else {
- if (tool == TOOL_PAINTING) {
+ if (tool != TOOL_NONE) {
- int id = get_selected_tile();
+ if (tool == TOOL_PAINTING) {
- if (id != TileMap::INVALID_CELL && paint_undo.size()) {
+ int id = get_selected_tile();
- undo_redo->create_action(TTR("Paint TileMap"));
- for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+ if (id != TileMap::INVALID_CELL && paint_undo.size()) {
- Point2 p = E->key();
- undo_redo->add_do_method(node, "set_cellv", p, id, flip_h, flip_v, transpose);
- undo_redo->add_undo_method(node, "set_cellv", p, E->get().idx, E->get().xf, E->get().yf, E->get().tr);
- }
- undo_redo->commit_action();
+ undo_redo->create_action(TTR("Paint TileMap"));
+ for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
- paint_undo.clear();
+ Point2 p = E->key();
+ undo_redo->add_do_method(node, "set_cellv", p, id, flip_h, flip_v, transpose);
+ undo_redo->add_undo_method(node, "set_cellv", p, E->get().idx, E->get().xf, E->get().yf, E->get().tr);
}
- } else if (tool == TOOL_LINE_PAINT) {
-
- int id = get_selected_tile();
+ undo_redo->commit_action();
- if (id != TileMap::INVALID_CELL) {
+ paint_undo.clear();
+ }
+ } else if (tool == TOOL_LINE_PAINT) {
- undo_redo->create_action("Line Draw");
- for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+ int id = get_selected_tile();
- _set_cell(E->key(), id, flip_h, flip_v, transpose, true);
- }
- undo_redo->commit_action();
+ if (id != TileMap::INVALID_CELL) {
- paint_undo.clear();
+ undo_redo->create_action("Line Draw");
+ for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
- canvas_item_editor->update();
+ _set_cell(E->key(), id, flip_h, flip_v, transpose, true);
}
- } else if (tool == TOOL_RECTANGLE_PAINT) {
-
- int id = get_selected_tile();
-
- if (id != TileMap::INVALID_CELL) {
+ undo_redo->commit_action();
- undo_redo->create_action("Rectangle Paint");
- for (int i = rectangle.pos.y; i <= rectangle.pos.y + rectangle.size.y; i++) {
- for (int j = rectangle.pos.x; j <= rectangle.pos.x + rectangle.size.x; j++) {
+ paint_undo.clear();
- _set_cell(Point2i(j, i), id, flip_h, flip_v, transpose, true);
- }
- }
- undo_redo->commit_action();
+ canvas_item_editor->update();
+ }
+ } else if (tool == TOOL_RECTANGLE_PAINT) {
- canvas_item_editor->update();
- }
- } else if (tool == TOOL_DUPLICATING) {
+ int id = get_selected_tile();
- Point2 ofs = over_tile - rectangle.pos;
+ if (id != TileMap::INVALID_CELL) {
- undo_redo->create_action(TTR("Duplicate"));
- for (List<TileData>::Element *E = copydata.front(); E; E = E->next()) {
+ undo_redo->create_action("Rectangle Paint");
+ for (int i = rectangle.pos.y; i <= rectangle.pos.y + rectangle.size.y; i++) {
+ for (int j = rectangle.pos.x; j <= rectangle.pos.x + rectangle.size.x; j++) {
- _set_cell(E->get().pos + ofs, E->get().cell, E->get().flip_h, E->get().flip_v, E->get().transpose, true);
+ _set_cell(Point2i(j, i), id, flip_h, flip_v, transpose, true);
+ }
}
undo_redo->commit_action();
- copydata.clear();
-
canvas_item_editor->update();
+ }
+ } else if (tool == TOOL_DUPLICATING) {
- } else if (tool == TOOL_SELECTING) {
+ Point2 ofs = over_tile - rectangle.pos;
- canvas_item_editor->update();
+ undo_redo->create_action(TTR("Duplicate"));
+ for (List<TileData>::Element *E = copydata.front(); E; E = E->next()) {
- } else if (tool == TOOL_BUCKET) {
+ _set_cell(E->get().pos + ofs, E->get().cell, E->get().flip_h, E->get().flip_v, E->get().transpose, true);
+ }
+ undo_redo->commit_action();
- Dictionary pop;
- pop["id"] = node->get_cell(over_tile.x, over_tile.y);
- pop["flip_h"] = node->is_cell_x_flipped(over_tile.x, over_tile.y);
- pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
- pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
+ copydata.clear();
+
+ canvas_item_editor->update();
- PoolVector<Vector2> points = _bucket_fill(over_tile);
+ } else if (tool == TOOL_SELECTING) {
- if (points.size() == 0)
- return false;
+ canvas_item_editor->update();
- Dictionary op;
- op["id"] = get_selected_tile();
- op["flip_h"] = flip_h;
- op["flip_v"] = flip_v;
- op["transpose"] = transpose;
+ } else if (tool == TOOL_BUCKET) {
- undo_redo->create_action("Bucket Fill");
+ Dictionary pop;
+ pop["id"] = node->get_cell(over_tile.x, over_tile.y);
+ pop["flip_h"] = node->is_cell_x_flipped(over_tile.x, over_tile.y);
+ pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
+ pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
- undo_redo->add_do_method(this, "_fill_points", points, op);
- undo_redo->add_undo_method(this, "_fill_points", points, pop);
+ PoolVector<Vector2> points = _bucket_fill(over_tile);
- undo_redo->commit_action();
- }
+ if (points.size() == 0)
+ return false;
- tool = TOOL_NONE;
+ Dictionary op;
+ op["id"] = get_selected_tile();
+ op["flip_h"] = flip_h;
+ op["flip_v"] = flip_v;
+ op["transpose"] = transpose;
- return true;
+ undo_redo->create_action("Bucket Fill");
+
+ undo_redo->add_do_method(this, "_fill_points", points, op);
+ undo_redo->add_undo_method(this, "_fill_points", points, pop);
+
+ undo_redo->commit_action();
}
- }
- } else if (mb.button_index == BUTTON_RIGHT) {
- if (mb.pressed) {
+ tool = TOOL_NONE;
- if (tool == TOOL_SELECTING || selection_active) {
+ return true;
+ }
+ }
+ } else if (mb->get_button_index() == BUTTON_RIGHT) {
- tool = TOOL_NONE;
- selection_active = false;
+ if (mb->is_pressed()) {
- canvas_item_editor->update();
+ if (tool == TOOL_SELECTING || selection_active) {
- return true;
- }
+ tool = TOOL_NONE;
+ selection_active = false;
- if (tool == TOOL_DUPLICATING) {
+ canvas_item_editor->update();
- tool = TOOL_NONE;
- copydata.clear();
+ return true;
+ }
- canvas_item_editor->update();
+ if (tool == TOOL_DUPLICATING) {
- return true;
- }
+ tool = TOOL_NONE;
+ copydata.clear();
- if (tool == TOOL_NONE) {
+ canvas_item_editor->update();
- paint_undo.clear();
+ return true;
+ }
- Point2 local = node->world_to_map(xform_inv.xform(Point2(mb.x, mb.y)));
+ if (tool == TOOL_NONE) {
- if (mb.mod.shift) {
+ paint_undo.clear();
- if (mb.mod.control)
- tool = TOOL_RECTANGLE_ERASE;
- else
- tool = TOOL_LINE_ERASE;
+ Point2 local = node->world_to_map(xform_inv.xform(mb->get_pos()));
- selection_active = false;
- rectangle_begin = local;
- } else {
+ if (mb->get_shift()) {
- tool = TOOL_ERASING;
+ if (mb->get_control())
+ tool = TOOL_RECTANGLE_ERASE;
+ else
+ tool = TOOL_LINE_ERASE;
- paint_undo[local] = _get_op_from_cell(local);
- _set_cell(local, TileMap::INVALID_CELL);
- }
+ selection_active = false;
+ rectangle_begin = local;
+ } else {
- return true;
+ tool = TOOL_ERASING;
+
+ paint_undo[local] = _get_op_from_cell(local);
+ _set_cell(local, TileMap::INVALID_CELL);
}
- } else {
- if (tool == TOOL_ERASING || tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
+ return true;
+ }
- if (paint_undo.size()) {
- undo_redo->create_action(TTR("Erase TileMap"));
- for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+ } else {
+ if (tool == TOOL_ERASING || tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
- Point2 p = E->key();
- undo_redo->add_do_method(node, "set_cellv", p, TileMap::INVALID_CELL, false, false, false);
- undo_redo->add_undo_method(node, "set_cellv", p, E->get().idx, E->get().xf, E->get().yf, E->get().tr);
- }
+ if (paint_undo.size()) {
+ undo_redo->create_action(TTR("Erase TileMap"));
+ for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
- undo_redo->commit_action();
- paint_undo.clear();
+ Point2 p = E->key();
+ undo_redo->add_do_method(node, "set_cellv", p, TileMap::INVALID_CELL, false, false, false);
+ undo_redo->add_undo_method(node, "set_cellv", p, E->get().idx, E->get().xf, E->get().yf, E->get().tr);
}
- if (tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
- canvas_item_editor->update();
- }
+ undo_redo->commit_action();
+ paint_undo.clear();
+ }
- tool = TOOL_NONE;
+ if (tool == TOOL_RECTANGLE_ERASE || tool == TOOL_LINE_ERASE) {
+ canvas_item_editor->update();
+ }
- return true;
+ tool = TOOL_NONE;
- } else if (tool == TOOL_BUCKET) {
+ return true;
- Dictionary pop;
- pop["id"] = node->get_cell(over_tile.x, over_tile.y);
- pop["flip_h"] = node->is_cell_x_flipped(over_tile.x, over_tile.y);
- pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
- pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
+ } else if (tool == TOOL_BUCKET) {
- PoolVector<Vector2> points = _bucket_fill(over_tile, true);
+ Dictionary pop;
+ pop["id"] = node->get_cell(over_tile.x, over_tile.y);
+ pop["flip_h"] = node->is_cell_x_flipped(over_tile.x, over_tile.y);
+ pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
+ pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
- if (points.size() == 0)
- return false;
+ PoolVector<Vector2> points = _bucket_fill(over_tile, true);
- undo_redo->create_action("Bucket Fill");
+ if (points.size() == 0)
+ return false;
- undo_redo->add_do_method(this, "_erase_points", points);
- undo_redo->add_undo_method(this, "_fill_points", points, pop);
+ undo_redo->create_action("Bucket Fill");
- undo_redo->commit_action();
- }
+ undo_redo->add_do_method(this, "_erase_points", points);
+ undo_redo->add_undo_method(this, "_fill_points", points, pop);
+
+ undo_redo->commit_action();
}
}
- } break;
- case InputEvent::MOUSE_MOTION: {
+ }
+ }
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ Ref<InputEventMouseMotion> mm = p_event;
- Point2i new_over_tile = node->world_to_map(xform_inv.xform(Point2(mm.x, mm.y)));
+ if (mm.is_valid()) {
- if (new_over_tile != over_tile) {
+ Point2i new_over_tile = node->world_to_map(xform_inv.xform(mm->get_pos()));
- over_tile = new_over_tile;
- canvas_item_editor->update();
- }
+ if (new_over_tile != over_tile) {
- int tile_under = node->get_cell(over_tile.x, over_tile.y);
- String tile_name = "none";
+ over_tile = new_over_tile;
+ canvas_item_editor->update();
+ }
- if (node->get_tileset()->has_tile(tile_under))
- tile_name = node->get_tileset()->tile_get_name(tile_under);
- tile_info->set_text(String::num(over_tile.x) + ", " + String::num(over_tile.y) + " [" + tile_name + "]");
+ int tile_under = node->get_cell(over_tile.x, over_tile.y);
+ String tile_name = "none";
- if (tool == TOOL_PAINTING) {
+ if (node->get_tileset()->has_tile(tile_under))
+ tile_name = node->get_tileset()->tile_get_name(tile_under);
+ tile_info->set_text(String::num(over_tile.x) + ", " + String::num(over_tile.y) + " [" + tile_name + "]");
- int id = get_selected_tile();
- if (id != TileMap::INVALID_CELL) {
+ if (tool == TOOL_PAINTING) {
- if (!paint_undo.has(over_tile)) {
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
- }
-
- _set_cell(over_tile, id, flip_h, flip_v, transpose);
+ int id = get_selected_tile();
+ if (id != TileMap::INVALID_CELL) {
- return true;
+ if (!paint_undo.has(over_tile)) {
+ paint_undo[over_tile] = _get_op_from_cell(over_tile);
}
- }
- if (tool == TOOL_SELECTING) {
-
- _select(rectangle_begin, over_tile);
+ _set_cell(over_tile, id, flip_h, flip_v, transpose);
return true;
}
+ }
- if (tool == TOOL_LINE_PAINT || tool == TOOL_LINE_ERASE) {
+ if (tool == TOOL_SELECTING) {
- int id = get_selected_tile();
- bool erasing = (tool == TOOL_LINE_ERASE);
+ _select(rectangle_begin, over_tile);
- if (erasing && paint_undo.size()) {
+ return true;
+ }
- for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+ if (tool == TOOL_LINE_PAINT || tool == TOOL_LINE_ERASE) {
- _set_cell(E->key(), E->get().idx, E->get().xf, E->get().yf, E->get().tr);
- }
- }
+ int id = get_selected_tile();
+ bool erasing = (tool == TOOL_LINE_ERASE);
- paint_undo.clear();
+ if (erasing && paint_undo.size()) {
+
+ for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+
+ _set_cell(E->key(), E->get().idx, E->get().xf, E->get().yf, E->get().tr);
+ }
+ }
- if (id != TileMap::INVALID_CELL) {
+ paint_undo.clear();
- Vector<Point2i> points = line(rectangle_begin.x, over_tile.x, rectangle_begin.y, over_tile.y);
+ if (id != TileMap::INVALID_CELL) {
- for (int i = 0; i < points.size(); i++) {
+ Vector<Point2i> points = line(rectangle_begin.x, over_tile.x, rectangle_begin.y, over_tile.y);
- paint_undo[points[i]] = _get_op_from_cell(points[i]);
+ for (int i = 0; i < points.size(); i++) {
- if (erasing)
- _set_cell(points[i], TileMap::INVALID_CELL);
- }
+ paint_undo[points[i]] = _get_op_from_cell(points[i]);
- canvas_item_editor->update();
+ if (erasing)
+ _set_cell(points[i], TileMap::INVALID_CELL);
}
- return true;
+ canvas_item_editor->update();
}
- if (tool == TOOL_RECTANGLE_PAINT || tool == TOOL_RECTANGLE_ERASE) {
- _select(rectangle_begin, over_tile);
+ return true;
+ }
+ if (tool == TOOL_RECTANGLE_PAINT || tool == TOOL_RECTANGLE_ERASE) {
- if (tool == TOOL_RECTANGLE_ERASE) {
+ _select(rectangle_begin, over_tile);
- if (paint_undo.size()) {
+ if (tool == TOOL_RECTANGLE_ERASE) {
- for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+ if (paint_undo.size()) {
- _set_cell(E->key(), E->get().idx, E->get().xf, E->get().yf, E->get().tr);
- }
+ for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
+
+ _set_cell(E->key(), E->get().idx, E->get().xf, E->get().yf, E->get().tr);
}
+ }
- paint_undo.clear();
+ paint_undo.clear();
- for (int i = rectangle.pos.y; i <= rectangle.pos.y + rectangle.size.y; i++) {
- for (int j = rectangle.pos.x; j <= rectangle.pos.x + rectangle.size.x; j++) {
+ for (int i = rectangle.pos.y; i <= rectangle.pos.y + rectangle.size.y; i++) {
+ for (int j = rectangle.pos.x; j <= rectangle.pos.x + rectangle.size.x; j++) {
- Point2i tile = Point2i(j, i);
- paint_undo[tile] = _get_op_from_cell(tile);
+ Point2i tile = Point2i(j, i);
+ paint_undo[tile] = _get_op_from_cell(tile);
- _set_cell(tile, TileMap::INVALID_CELL);
- }
+ _set_cell(tile, TileMap::INVALID_CELL);
}
}
-
- return true;
}
- if (tool == TOOL_ERASING) {
-
- if (!paint_undo.has(over_tile)) {
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
- }
- _set_cell(over_tile, TileMap::INVALID_CELL);
+ return true;
+ }
+ if (tool == TOOL_ERASING) {
- return true;
+ if (!paint_undo.has(over_tile)) {
+ paint_undo[over_tile] = _get_op_from_cell(over_tile);
}
- if (tool == TOOL_PICKING && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
- _pick_tile(over_tile);
+ _set_cell(over_tile, TileMap::INVALID_CELL);
- return true;
- }
- } break;
- case InputEvent::KEY: {
+ return true;
+ }
+ if (tool == TOOL_PICKING && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
- const InputEventKey &k = p_event.key;
+ _pick_tile(over_tile);
- if (!k.pressed)
- break;
+ return true;
+ }
+ }
- if (k.scancode == KEY_ESCAPE) {
+ Ref<InputEventKey> k = p_event;
- if (tool == TOOL_DUPLICATING)
- copydata.clear();
- else if (tool == TOOL_SELECTING || selection_active)
- selection_active = false;
+ if (k.is_valid() && k->is_pressed()) {
- tool = TOOL_NONE;
+ if (k->get_scancode() == KEY_ESCAPE) {
- canvas_item_editor->update();
+ if (tool == TOOL_DUPLICATING)
+ copydata.clear();
+ else if (tool == TOOL_SELECTING || selection_active)
+ selection_active = false;
- return true;
- }
+ tool = TOOL_NONE;
- if (tool != TOOL_NONE || !mouse_over)
- return false;
+ canvas_item_editor->update();
- if (ED_IS_SHORTCUT("tile_map_editor/erase_selection", p_event)) {
- _menu_option(OPTION_ERASE_SELECTION);
+ return true;
+ }
- return true;
- }
- if (ED_IS_SHORTCUT("tile_map_editor/select", p_event)) {
- tool = TOOL_SELECTING;
- selection_active = false;
+ if (tool != TOOL_NONE || !mouse_over)
+ return false;
- canvas_item_editor->update();
+ if (ED_IS_SHORTCUT("tile_map_editor/erase_selection", p_event)) {
+ _menu_option(OPTION_ERASE_SELECTION);
- return true;
- }
- if (ED_IS_SHORTCUT("tile_map_editor/duplicate_selection", p_event)) {
- _update_copydata();
+ return true;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/select", p_event)) {
+ tool = TOOL_SELECTING;
+ selection_active = false;
- if (selection_active) {
- tool = TOOL_DUPLICATING;
+ canvas_item_editor->update();
- canvas_item_editor->update();
+ return true;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/duplicate_selection", p_event)) {
+ _update_copydata();
- return true;
- }
- }
- if (ED_IS_SHORTCUT("tile_map_editor/find_tile", p_event)) {
- search_box->select_all();
- search_box->grab_focus();
+ if (selection_active) {
+ tool = TOOL_DUPLICATING;
- return true;
- }
- if (ED_IS_SHORTCUT("tile_map_editor/mirror_x", p_event)) {
- flip_h = !flip_h;
- mirror_x->set_pressed(flip_h);
- canvas_item_editor->update();
- return true;
- }
- if (ED_IS_SHORTCUT("tile_map_editor/mirror_y", p_event)) {
- flip_v = !flip_v;
- mirror_y->set_pressed(flip_v);
- canvas_item_editor->update();
- return true;
- }
- if (ED_IS_SHORTCUT("tile_map_editor/transpose", p_event)) {
- transpose = !transpose;
- transp->set_pressed(transpose);
canvas_item_editor->update();
+
return true;
}
- } break;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/find_tile", p_event)) {
+ search_box->select_all();
+ search_box->grab_focus();
+
+ return true;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/mirror_x", p_event)) {
+ flip_h = !flip_h;
+ mirror_x->set_pressed(flip_h);
+ canvas_item_editor->update();
+ return true;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/mirror_y", p_event)) {
+ flip_v = !flip_v;
+ mirror_y->set_pressed(flip_v);
+ canvas_item_editor->update();
+ return true;
+ }
+ if (ED_IS_SHORTCUT("tile_map_editor/transpose", p_event)) {
+ transpose = !transpose;
+ transp->set_pressed(transpose);
+ canvas_item_editor->update();
+ return true;
+ }
}
return false;
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index 3eedb6c941..981d5c66a1 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -158,7 +158,7 @@ class TileMapEditor : public VBoxContainer {
void _text_entered(const String &p_text);
void _text_changed(const String &p_text);
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _update_palette();
void _canvas_draw();
void _menu_option(int p_option);
@@ -179,7 +179,7 @@ protected:
public:
HBoxContainer *get_toolbar() const { return toolbar; }
- bool forward_gui_input(const InputEvent &p_event);
+ bool forward_gui_input(const Ref<InputEvent> &p_event);
void edit(Node *p_tile_map);
TileMapEditor(EditorNode *p_editor);
@@ -193,7 +193,7 @@ class TileMapEditorPlugin : public EditorPlugin {
TileMapEditor *tile_map_editor;
public:
- virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const InputEvent &p_event) { return tile_map_editor->forward_gui_input(p_event); }
+ virtual bool forward_canvas_gui_input(const Transform2D &p_canvas_xform, const Ref<InputEvent> &p_event) { return tile_map_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "TileMap"; }
bool has_main_screen() const { return false; }
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index e79cbd0d35..0b088f7171 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -37,24 +37,18 @@ void TileSetEditor::edit(const Ref<TileSet> &p_tileset) {
tileset = p_tileset;
}
-void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_merge) {
-
- if (!p_merge)
- p_library->clear();
+void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
- for (int i = 0; i < scene->get_child_count(); i++) {
+ for (int i = 0; i < p_node->get_child_count(); i++) {
- Node *child = scene->get_child(i);
+ Node *child = p_node->get_child(i);
if (!child->cast_to<Sprite>()) {
if (child->get_child_count() > 0) {
- child = child->get_child(0);
- if (!child->cast_to<Sprite>()) {
- continue;
- }
+ _import_node(child, p_library);
+ }
- } else
- continue;
+ continue;
}
Sprite *mi = child->cast_to<Sprite>();
@@ -138,6 +132,14 @@ void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_me
}
}
+void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_merge) {
+
+ if (!p_merge)
+ p_library->clear();
+
+ _import_node(scene, p_library);
+}
+
void TileSetEditor::_menu_confirm() {
switch (option) {
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index 42084c05a3..d04ebc7197 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -59,6 +59,7 @@ class TileSetEditor : public Control {
void _menu_confirm();
void _name_dialog_confirm(const String &name);
+ static void _import_node(Node *p_node, Ref<TileSet> p_library);
static void _import_scene(Node *p_scene, Ref<TileSet> p_library, bool p_merge);
protected:
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 40ffb8e246..d58454a223 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -754,6 +754,7 @@ ProjectExportDialog::ProjectExportDialog() {
settings_vb->add_child(runnable);
sections = memnew(TabContainer);
+ sections->set_tab_align(TabContainer::ALIGN_LEFT);
settings_vb->add_child(sections);
sections->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 289655e9da..50b518afba 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -503,14 +503,16 @@ void ProjectManager::_update_project_buttons() {
run_btn->set_disabled(!has_runnable_scene);
}
-void ProjectManager::_panel_input(const InputEvent &p_ev, Node *p_hb) {
+void ProjectManager::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
- if (p_ev.type == InputEvent::MOUSE_BUTTON && p_ev.mouse_button.pressed && p_ev.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_ev;
+
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
String clicked = p_hb->get_meta("name");
String clicked_main_scene = p_hb->get_meta("main_scene");
- if (p_ev.key.mod.shift && selected_list.size() > 0 && last_clicked != "" && clicked != last_clicked) {
+ if (mb->get_shift() && selected_list.size() > 0 && last_clicked != "" && clicked != last_clicked) {
int clicked_id = -1;
int last_clicked_id = -1;
@@ -527,7 +529,7 @@ void ProjectManager::_panel_input(const InputEvent &p_ev, Node *p_hb) {
for (int i = 0; i < scroll_childs->get_child_count(); ++i) {
HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
if (!hb) continue;
- if (i != clicked_id && (i < min || i > max) && !p_ev.key.mod.control) {
+ if (i != clicked_id && (i < min || i > max) && !mb->get_control()) {
selected_list.erase(hb->get_meta("name"));
} else if (i >= min && i <= max) {
selected_list.insert(hb->get_meta("name"), hb->get_meta("main_scene"));
@@ -535,14 +537,14 @@ void ProjectManager::_panel_input(const InputEvent &p_ev, Node *p_hb) {
}
}
- } else if (selected_list.has(clicked) && p_ev.key.mod.control) {
+ } else if (selected_list.has(clicked) && mb->get_control()) {
selected_list.erase(clicked);
} else {
last_clicked = clicked;
- if (p_ev.key.mod.control || selected_list.size() == 0) {
+ if (mb->get_control() || selected_list.size() == 0) {
selected_list.insert(clicked, clicked_main_scene);
} else {
selected_list.clear();
@@ -552,23 +554,23 @@ void ProjectManager::_panel_input(const InputEvent &p_ev, Node *p_hb) {
_update_project_buttons();
- if (p_ev.mouse_button.doubleclick)
+ if (mb->is_doubleclick())
_open_project(); //open if doubleclicked
}
}
-void ProjectManager::_unhandled_input(const InputEvent &p_ev) {
+void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
- if (p_ev.type == InputEvent::KEY) {
+ Ref<InputEventKey> k = p_ev;
- const InputEventKey &k = p_ev.key;
+ if (k.is_valid()) {
- if (!k.pressed)
+ if (!k->is_pressed())
return;
bool scancode_handled = true;
- switch (k.scancode) {
+ switch (k->get_scancode()) {
case KEY_RETURN: {
@@ -606,7 +608,7 @@ void ProjectManager::_unhandled_input(const InputEvent &p_ev) {
} break;
case KEY_UP: {
- if (k.mod.shift)
+ if (k->get_shift())
break;
if (selected_list.size()) {
@@ -645,7 +647,7 @@ void ProjectManager::_unhandled_input(const InputEvent &p_ev) {
}
case KEY_DOWN: {
- if (k.mod.shift)
+ if (k->get_shift())
break;
bool found = selected_list.empty();
@@ -679,7 +681,7 @@ void ProjectManager::_unhandled_input(const InputEvent &p_ev) {
} break;
case KEY_F: {
- if (k.mod.command)
+ if (k->get_command())
this->project_filter->search_box->grab_focus();
else
scancode_handled = false;
@@ -806,11 +808,12 @@ void ProjectManager::_load_recent_projects() {
if (cf->has_section_key("application", "icon")) {
String appicon = cf->get_value("application", "icon");
if (appicon != "") {
- Image img;
- Error err = img.load(appicon.replace_first("res://", path + "/"));
+ Ref<Image> img;
+ img.instance();
+ Error err = img->load(appicon.replace_first("res://", path + "/"));
if (err == OK) {
- img.resize(64, 64);
+ img->resize(64, 64);
Ref<ImageTexture> it = memnew(ImageTexture);
it->create_from_image(img);
icon = it;
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 5be28ce2f0..27886132c5 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -91,8 +91,8 @@ class ProjectManager : public Control {
void _install_project(const String &p_zip_path, const String &p_title);
void _panel_draw(Node *p_hb);
- void _panel_input(const InputEvent &p_ev, Node *p_hb);
- void _unhandled_input(const InputEvent &p_ev);
+ void _panel_input(const Ref<InputEvent> &p_ev, Node *p_hb);
+ void _unhandled_input(const Ref<InputEvent> &p_ev);
void _favorite_pressed(Node *p_hb);
void _files_dropped(PoolStringArray p_files, int p_screen);
void _scan_multiple_folders(PoolStringArray p_files);
diff --git a/editor/project_settings.cpp b/editor/project_settings.cpp
index 152e72ca44..1c4ca3cb58 100644
--- a/editor/project_settings.cpp
+++ b/editor/project_settings.cpp
@@ -78,15 +78,15 @@ void ProjectSettings::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
globals_editor->edit(GlobalConfig::get_singleton());
- search_button->set_icon(get_icon("Search", "EditorIcons"));
+ search_button->set_icon(get_icon("Zoom", "EditorIcons"));
clear_button->set_icon(get_icon("Close", "EditorIcons"));
translation_list->connect("button_pressed", this, "_translation_delete");
_update_actions();
- popup_add->add_icon_item(get_icon("Keyboard", "EditorIcons"), TTR("Key "), InputEvent::KEY); //"Key " - because the word 'key' has already been used as a key animation
- popup_add->add_icon_item(get_icon("JoyButton", "EditorIcons"), TTR("Joy Button"), InputEvent::JOYPAD_BUTTON);
- popup_add->add_icon_item(get_icon("JoyAxis", "EditorIcons"), TTR("Joy Axis"), InputEvent::JOYPAD_MOTION);
- popup_add->add_icon_item(get_icon("Mouse", "EditorIcons"), TTR("Mouse Button"), InputEvent::MOUSE_BUTTON);
+ popup_add->add_icon_item(get_icon("Keyboard", "EditorIcons"), TTR("Key "), INPUT_KEY); //"Key " - because the word 'key' has already been used as a key animation
+ popup_add->add_icon_item(get_icon("JoyButton", "EditorIcons"), TTR("Joy Button"), INPUT_JOY_BUTTON);
+ popup_add->add_icon_item(get_icon("JoyAxis", "EditorIcons"), TTR("Joy Axis"), INPUT_JOY_MOTION);
+ popup_add->add_icon_item(get_icon("Mouse", "EditorIcons"), TTR("Mouse Button"), INPUT_MOUSE_BUTTON);
List<String> tfn;
ResourceLoader::get_recognized_extensions_for_type("Translation", &tfn);
@@ -106,6 +106,9 @@ void ProjectSettings::_notification(int p_what) {
case NOTIFICATION_POPUP_HIDE: {
EditorSettings::get_singleton()->set("interface/dialogs/project_settings_bounds", get_rect());
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ _update_actions();
+ } break;
}
}
@@ -175,54 +178,74 @@ void ProjectSettings::_action_edited() {
void ProjectSettings::_device_input_add() {
- InputEvent ie;
+ Ref<InputEvent> ie;
String name = add_at;
Variant old_val = GlobalConfig::get_singleton()->get(name);
Array arr = old_val;
- ie.device = device_id->get_value();
-
- ie.type = add_type;
+ // ie.device = device_id->get_value();
+ // ie.type = add_type;
switch (add_type) {
- case InputEvent::MOUSE_BUTTON: {
+ case INPUT_MOUSE_BUTTON: {
- ie.mouse_button.button_index = device_index->get_selected() + 1;
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+ mb->set_button_index(device_index->get_selected() + 1);
+ mb->set_device(device_id->get_value());
for (int i = 0; i < arr.size(); i++) {
- InputEvent aie = arr[i];
- if (aie.device == ie.device && aie.type == InputEvent::MOUSE_BUTTON && aie.mouse_button.button_index == ie.mouse_button.button_index) {
+ Ref<InputEventMouseButton> aie = arr[i];
+ if (aie.is_null())
+ continue;
+ if (aie->get_device() == mb->get_device() && aie->get_button_index() == mb->get_button_index()) {
return;
}
}
+ ie = mb;
+
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case INPUT_JOY_MOTION: {
- ie.joy_motion.axis = device_index->get_selected() >> 1;
- ie.joy_motion.axis_value = device_index->get_selected() & 1 ? 1 : -1;
+ Ref<InputEventJoypadMotion> jm;
+ jm.instance();
+ jm->set_axis(device_index->get_selected() >> 1);
+ jm->set_axis_value(device_index->get_selected() & 1 ? 1 : -1);
+ jm->set_device(device_id->get_value());
for (int i = 0; i < arr.size(); i++) {
- InputEvent aie = arr[i];
- if (aie.device == ie.device && aie.type == InputEvent::JOYPAD_MOTION && aie.joy_motion.axis == ie.joy_motion.axis && aie.joy_motion.axis_value == ie.joy_motion.axis_value) {
+ Ref<InputEventJoypadMotion> aie = arr[i];
+ if (aie.is_null())
+ continue;
+ if (aie->get_device() == jm->get_device() && aie->get_axis() == jm->get_axis() && aie->get_axis_value() == jm->get_axis_value()) {
return;
}
}
+ ie = jm;
+
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case INPUT_JOY_BUTTON: {
+
+ Ref<InputEventJoypadButton> jb;
+ jb.instance();
- ie.joy_button.button_index = device_index->get_selected();
+ jb->set_button_index(device_index->get_selected());
+ jb->set_device(device_id->get_value());
for (int i = 0; i < arr.size(); i++) {
- InputEvent aie = arr[i];
- if (aie.device == ie.device && aie.type == InputEvent::JOYPAD_BUTTON && aie.joy_button.button_index == ie.joy_button.button_index) {
+ Ref<InputEventJoypadButton> aie = arr[i];
+ if (aie.is_null())
+ continue;
+ if (aie->get_device() == jb->get_device() && aie->get_button_index() == jb->get_button_index()) {
return;
}
}
+ ie = jb;
} break;
default: {}
@@ -244,13 +267,17 @@ void ProjectSettings::_device_input_add() {
void ProjectSettings::_press_a_key_confirm() {
- if (last_wait_for_key.type != InputEvent::KEY)
+ if (last_wait_for_key.is_null())
return;
- InputEvent ie;
- ie.type = InputEvent::KEY;
- ie.key.scancode = last_wait_for_key.key.scancode;
- ie.key.mod = last_wait_for_key.key.mod;
+ Ref<InputEventKey> ie;
+ ie.instance();
+ ie->set_scancode(last_wait_for_key->get_scancode());
+ ie->set_shift(last_wait_for_key->get_shift());
+ ie->set_alt(last_wait_for_key->get_alt());
+ ie->set_control(last_wait_for_key->get_control());
+ ie->set_metakey(last_wait_for_key->get_metakey());
+
String name = add_at;
Variant old_val = GlobalConfig::get_singleton()->get(name);
@@ -258,8 +285,10 @@ void ProjectSettings::_press_a_key_confirm() {
for (int i = 0; i < arr.size(); i++) {
- InputEvent aie = arr[i];
- if (aie.type == InputEvent::KEY && aie.key.scancode == ie.key.scancode && aie.key.mod == ie.key.mod) {
+ Ref<InputEventKey> aie = arr[i];
+ if (aie.is_null())
+ continue;
+ if (aie->get_scancode_with_modifiers() == ie->get_scancode_with_modifiers()) {
return;
}
}
@@ -278,7 +307,7 @@ void ProjectSettings::_press_a_key_confirm() {
_show_last_added(ie, name);
}
-void ProjectSettings::_show_last_added(const InputEvent &p_event, const String &p_name) {
+void ProjectSettings::_show_last_added(const Ref<InputEvent> &p_event, const String &p_name) {
TreeItem *r = input_editor->get_root();
String name = p_name;
@@ -311,19 +340,21 @@ void ProjectSettings::_show_last_added(const InputEvent &p_event, const String &
if (found) input_editor->ensure_cursor_is_visible();
}
-void ProjectSettings::_wait_for_key(const InputEvent &p_event) {
+void ProjectSettings::_wait_for_key(const Ref<InputEvent> &p_event) {
+
+ Ref<InputEventKey> k = p_event;
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode != 0) {
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) {
last_wait_for_key = p_event;
- String str = keycode_get_string(p_event.key.scancode).capitalize();
- if (p_event.key.mod.meta)
+ String str = keycode_get_string(k->get_scancode()).capitalize();
+ if (k->get_metakey())
str = TTR("Meta+") + str;
- if (p_event.key.mod.shift)
+ if (k->get_shift())
str = TTR("Shift+") + str;
- if (p_event.key.mod.alt)
+ if (k->get_alt())
str = TTR("Alt+") + str;
- if (p_event.key.mod.control)
+ if (k->get_control())
str = TTR("Control+") + str;
press_a_key_label->set_text(str);
@@ -333,18 +364,18 @@ void ProjectSettings::_wait_for_key(const InputEvent &p_event) {
void ProjectSettings::_add_item(int p_item) {
- add_type = InputEvent::Type(p_item);
+ add_type = InputType(p_item);
switch (add_type) {
- case InputEvent::KEY: {
+ case INPUT_KEY: {
press_a_key_label->set_text(TTR("Press a Key.."));
- last_wait_for_key = InputEvent();
+ last_wait_for_key = Ref<InputEvent>();
press_a_key->popup_centered(Size2(250, 80) * EDSCALE);
press_a_key->grab_focus();
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case INPUT_MOUSE_BUTTON: {
device_id->set_value(0);
device_index_label->set_text(TTR("Mouse Button Index:"));
@@ -360,7 +391,7 @@ void ProjectSettings::_add_item(int p_item) {
device_index->add_item(TTR("Button 9"));
device_input->popup_centered_minsize(Size2(350, 95));
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case INPUT_JOY_MOTION: {
device_id->set_value(0);
device_index_label->set_text(TTR("Joypad Axis Index:"));
@@ -373,7 +404,7 @@ void ProjectSettings::_add_item(int p_item) {
device_input->popup_centered_minsize(Size2(350, 95));
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case INPUT_JOY_BUTTON: {
device_id->set_value(0);
device_index_label->set_text(TTR("Joypad Button Index:"));
@@ -493,65 +524,70 @@ void ProjectSettings::_update_actions() {
for (int i = 0; i < actions.size(); i++) {
- if (actions[i].get_type() != Variant::INPUT_EVENT)
+ Ref<InputEvent> ie = actions[i];
+ if (ie.is_null())
continue;
- InputEvent ie = actions[i];
TreeItem *action = input_editor->create_item(item);
- switch (ie.type) {
-
- case InputEvent::KEY: {
-
- String str = keycode_get_string(ie.key.scancode).capitalize();
- if (ie.key.mod.meta)
- str = TTR("Meta+") + str;
- if (ie.key.mod.shift)
- str = TTR("Shift+") + str;
- if (ie.key.mod.alt)
- str = TTR("Alt+") + str;
- if (ie.key.mod.control)
- str = TTR("Control+") + str;
-
- action->set_text(0, str);
- action->set_icon(0, get_icon("Keyboard", "EditorIcons"));
-
- } break;
- case InputEvent::JOYPAD_BUTTON: {
-
- String str = TTR("Device") + " " + itos(ie.device) + ", " + TTR("Button") + " " + itos(ie.joy_button.button_index);
- if (ie.joy_button.button_index >= 0 && ie.joy_button.button_index < JOY_BUTTON_MAX)
- str += String() + " (" + _button_names[ie.joy_button.button_index] + ").";
- else
- str += ".";
-
- action->set_text(0, str);
- action->set_icon(0, get_icon("JoyButton", "EditorIcons"));
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- String str = TTR("Device") + " " + itos(ie.device) + ", ";
- switch (ie.mouse_button.button_index) {
- case BUTTON_LEFT: str += TTR("Left Button."); break;
- case BUTTON_RIGHT: str += TTR("Right Button."); break;
- case BUTTON_MIDDLE: str += TTR("Middle Button."); break;
- case BUTTON_WHEEL_UP: str += TTR("Wheel Up."); break;
- case BUTTON_WHEEL_DOWN: str += TTR("Wheel Down."); break;
- default: str += TTR("Button") + " " + itos(ie.mouse_button.button_index) + ".";
- }
-
- action->set_text(0, str);
- action->set_icon(0, get_icon("Mouse", "EditorIcons"));
- } break;
- case InputEvent::JOYPAD_MOTION: {
-
- int ax = ie.joy_motion.axis;
- int n = 2 * ax + (ie.joy_motion.axis_value < 0 ? 0 : 1);
- String desc = _axis_names[n];
- String str = TTR("Device") + " " + itos(ie.device) + ", " + TTR("Axis") + " " + itos(ax) + " " + (ie.joy_motion.axis_value < 0 ? "-" : "+") + desc + ".";
- action->set_text(0, str);
- action->set_icon(0, get_icon("JoyAxis", "EditorIcons"));
- } break;
+ Ref<InputEventKey> k = ie;
+ if (k.is_valid()) {
+
+ String str = keycode_get_string(k->get_scancode()).capitalize();
+ if (k->get_metakey())
+ str = TTR("Meta+") + str;
+ if (k->get_shift())
+ str = TTR("Shift+") + str;
+ if (k->get_alt())
+ str = TTR("Alt+") + str;
+ if (k->get_control())
+ str = TTR("Control+") + str;
+
+ action->set_text(0, str);
+ action->set_icon(0, get_icon("Keyboard", "EditorIcons"));
+ }
+
+ Ref<InputEventJoypadButton> jb = ie;
+
+ if (jb.is_valid()) {
+
+ String str = TTR("Device") + " " + itos(jb->get_device()) + ", " + TTR("Button") + " " + itos(jb->get_button_index());
+ if (jb->get_button_index() >= 0 && jb->get_button_index() < JOY_BUTTON_MAX)
+ str += String() + " (" + _button_names[jb->get_button_index()] + ").";
+ else
+ str += ".";
+
+ action->set_text(0, str);
+ action->set_icon(0, get_icon("JoyButton", "EditorIcons"));
+ }
+
+ Ref<InputEventMouseButton> mb = ie;
+
+ if (mb.is_valid()) {
+ String str = TTR("Device") + " " + itos(mb->get_device()) + ", ";
+ switch (mb->get_button_index()) {
+ case BUTTON_LEFT: str += TTR("Left Button."); break;
+ case BUTTON_RIGHT: str += TTR("Right Button."); break;
+ case BUTTON_MIDDLE: str += TTR("Middle Button."); break;
+ case BUTTON_WHEEL_UP: str += TTR("Wheel Up."); break;
+ case BUTTON_WHEEL_DOWN: str += TTR("Wheel Down."); break;
+ default: str += TTR("Button") + " " + itos(mb->get_button_index()) + ".";
+ }
+
+ action->set_text(0, str);
+ action->set_icon(0, get_icon("Mouse", "EditorIcons"));
+ }
+
+ Ref<InputEventJoypadMotion> jm = ie;
+
+ if (jm.is_valid()) {
+
+ int ax = jm->get_axis();
+ int n = 2 * ax + (jm->get_axis_value() < 0 ? 0 : 1);
+ String desc = _axis_names[n];
+ String str = TTR("Device") + " " + itos(jm->get_device()) + ", " + TTR("Axis") + " " + itos(ax) + " " + (jm->get_axis_value() < 0 ? "-" : "+") + desc + ".";
+ action->set_text(0, str);
+ action->set_icon(0, get_icon("JoyAxis", "EditorIcons"));
}
action->add_button(0, get_icon("Remove", "EditorIcons"), 2, false, TTR("Remove"));
action->set_metadata(0, i);
@@ -1174,6 +1210,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
data = p_data;
tab_container = memnew(TabContainer);
+ tab_container->set_tab_align(TabContainer::ALIGN_LEFT);
add_child(tab_container);
//set_child_rect(tab_container);
@@ -1415,6 +1452,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
//translations
TabContainer *translations = memnew(TabContainer);
+ translations->set_tab_align(TabContainer::ALIGN_LEFT);
translations->set_name(TTR("Localization"));
tab_container->add_child(translations);
diff --git a/editor/project_settings.h b/editor/project_settings.h
index a5a9e04250..47fb45cf8e 100644
--- a/editor/project_settings.h
+++ b/editor/project_settings.h
@@ -43,10 +43,17 @@
class ProjectSettings : public AcceptDialog {
GDCLASS(ProjectSettings, AcceptDialog);
+ enum InputType {
+ INPUT_KEY,
+ INPUT_JOY_BUTTON,
+ INPUT_JOY_MOTION,
+ INPUT_MOUSE_BUTTON
+ };
+
TabContainer *tab_container;
Timer *timer;
- InputEvent::Type add_type;
+ InputType add_type;
String add_at;
EditorData *data;
@@ -77,7 +84,7 @@ class ProjectSettings : public AcceptDialog {
bool setting;
bool updating_translations;
- InputEvent last_wait_for_key;
+ Ref<InputEventKey> last_wait_for_key;
EditorFileDialog *translation_file_open;
Tree *translation_list;
@@ -108,9 +115,9 @@ class ProjectSettings : public AcceptDialog {
void _action_selected();
void _action_edited();
void _action_button_pressed(Object *p_obj, int p_column, int p_id);
- void _wait_for_key(const InputEvent &p_event);
+ void _wait_for_key(const Ref<InputEvent> &p_event);
void _press_a_key_confirm();
- void _show_last_added(const InputEvent &p_event, const String &p_name);
+ void _show_last_added(const Ref<InputEvent> &p_event, const String &p_name);
void _settings_prop_edited(const String &p_name);
void _settings_changed();
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 3dd9ba080c..1c8a1c0ee0 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -609,12 +609,9 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
type = Variant::Type(Variant::Type(i));
}
}
- InputEvent::Type iet = InputEvent::NONE;
- if (hint_text.find(".") != -1) {
- iet = InputEvent::Type(int(hint_text.get_slice(".", 1).to_int()));
- }
+
if (type)
- property_select->select_property_from_basic_type(type, iet, v);
+ property_select->select_property_from_basic_type(type, v);
updating = false;
return false;
@@ -861,15 +858,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
*/
} break;
- case Variant::IMAGE: {
-
- List<String> names;
- names.push_back(TTR("New"));
- names.push_back(TTR("Load"));
- names.push_back(TTR("Clear"));
- config_action_buttons(names);
- } break;
case Variant::NODE_PATH: {
List<String> names;
@@ -987,9 +976,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return false;
} break;
- case Variant::INPUT_EVENT: {
-
- } break;
case Variant::DICTIONARY: {
} break;
@@ -1061,16 +1047,6 @@ void CustomPropertyEditor::_file_selected(String p_file) {
emit_signal("variant_changed");
hide();
} break;
- case Variant::IMAGE: {
-
- Image image;
- Error err = ImageLoader::load_image(p_file, &image);
- ERR_EXPLAIN(TTR("Couldn't load image"));
- ERR_FAIL_COND(err);
- v = image;
- emit_signal("variant_changed");
- hide();
- } break;
default: {}
}
}
@@ -1387,36 +1363,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
}
} break;
- case Variant::IMAGE: {
-
- if (p_which == 0) {
- //new image too difficult
- ERR_PRINT("New Image Unimplemented");
- } else if (p_which == 1) {
-
- file->set_access(EditorFileDialog::ACCESS_RESOURCES);
- file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- List<String> extensions;
- ImageLoader::get_recognized_extensions(&extensions);
-
- file->clear_filters();
-
- for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
-
- file->add_filter("*." + E->get() + " ; " + E->get().to_upper());
- }
-
- file->popup_centered_ratio();
-
- } else if (p_which == 2) {
-
- v = Image();
- emit_signal("variant_changed");
- hide();
- }
-
- } break;
default: {};
}
}
@@ -1448,11 +1395,13 @@ void CustomPropertyEditor::_scroll_modified(double p_value) {
*/
}
-void CustomPropertyEditor::_drag_easing(const InputEvent &p_ev) {
+void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
+
+ Ref<InputEventMouseMotion> mm = p_ev;
- if (p_ev.type == InputEvent::MOUSE_MOTION && p_ev.mouse_motion.button_mask & BUTTON_MASK_LEFT) {
+ if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
- float rel = p_ev.mouse_motion.relative_x;
+ float rel = mm->get_relative().x;
if (rel == 0)
return;
@@ -1481,8 +1430,8 @@ void CustomPropertyEditor::_drag_easing(const InputEvent &p_ev) {
//emit_signal("variant_changed");
emit_signal("variant_changed");
}
- if (p_ev.type == InputEvent::MOUSE_BUTTON && p_ev.mouse_button.button_index == BUTTON_LEFT) {
- }
+ // if (p_ev.type == Ref<InputEvent>::MOUSE_BUTTON && p_ev->get_button_index() == BUTTON_LEFT) {
+ // }
}
void CustomPropertyEditor::_draw_easing() {
@@ -1756,17 +1705,12 @@ void CustomPropertyEditor::_modified(String p_string) {
emit_signal("variant_changed");
*/
} break;
- case Variant::IMAGE: {
- } break;
case Variant::NODE_PATH: {
v = NodePath(value_editor[0]->get_text());
emit_signal("variant_changed");
} break;
- case Variant::INPUT_EVENT: {
-
- } break;
case Variant::DICTIONARY: {
} break;
@@ -2357,15 +2301,6 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p
//p_item->set_text(1,obj->get(p_name));
} break;
- case Variant::IMAGE: {
-
- Image img = obj->get(p_name);
- if (img.empty())
- p_item->set_text(1, "[Image (empty)]");
- else
- p_item->set_text(1, "[Image " + itos(img.get_width()) + "x" + itos(img.get_height()) + "-" + String(Image::get_format_name(img.get_format())) + "]");
-
- } break;
case Variant::NODE_PATH: {
p_item->set_text(1, obj->get(p_name));
@@ -2750,6 +2685,10 @@ void PropertyEditor::_notification(int p_what) {
changing = false;
}
+
+ if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+ update_tree();
+ }
}
TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeItem *> &item_paths, TreeItem *root) {
@@ -3588,19 +3527,7 @@ void PropertyEditor::update_tree() {
item->set_icon(0, get_icon("Color", "EditorIcons"));
} break;
- case Variant::IMAGE: {
-
- item->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
- item->set_editable(1, !read_only);
- Image img = obj->get(p.name);
- if (img.empty())
- item->set_text(1, "[Image (empty)]");
- else
- item->set_text(1, "[Image " + itos(img.get_width()) + "x" + itos(img.get_height()) + "-" + String(Image::get_format_name(img.get_format())) + "]");
- if (show_type_icons)
- item->set_icon(0, get_icon("Image", "EditorIcons"));
- } break;
case Variant::NODE_PATH: {
item->set_cell_mode(1, TreeItem::CELL_MODE_STRING);
@@ -3922,17 +3849,12 @@ void PropertyEditor::_item_edited() {
case Variant::COLOR: {
//_edit_set(name,item->get_custom_bg_color(0));
} break;
- case Variant::IMAGE: {
- } break;
case Variant::NODE_PATH: {
_edit_set(name, NodePath(item->get_text(1)), refresh_all);
} break;
- case Variant::INPUT_EVENT: {
-
- } break;
case Variant::DICTIONARY: {
} break;
diff --git a/editor/property_editor.h b/editor/property_editor.h
index b88ba38e19..c02c301acf 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -134,7 +134,7 @@ class CustomPropertyEditor : public Popup {
void _draw_easing();
void _menu_option(int p_which);
- void _drag_easing(const InputEvent &p_ev);
+ void _drag_easing(const Ref<InputEvent> &p_ev);
void _node_path_selected(NodePath p_path);
void show_value_editors(int p_amount);
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 565d25e0e5..47e5994e3f 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -37,17 +37,19 @@ void PropertySelector::_text_changed(const String &p_newtext) {
_update_search();
}
-void PropertySelector::_sbox_input(const InputEvent &p_ie) {
+void PropertySelector::_sbox_input(const Ref<InputEvent> &p_ie) {
- if (p_ie.type == InputEvent::KEY) {
+ Ref<InputEventKey> k = p_ie;
- switch (p_ie.key.scancode) {
+ if (k.is_valid()) {
+
+ switch (k->get_scancode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", p_ie);
+ search_options->call("_gui_input", k);
search_box->accept_event();
TreeItem *root = search_options->get_root();
@@ -89,14 +91,8 @@ void PropertySelector::_update_search() {
instance->get_property_list(&props, true);
} else if (type != Variant::NIL) {
Variant v;
- if (type == Variant::INPUT_EVENT) {
- InputEvent ie;
- ie.type = event_type;
- v = ie;
- } else {
- Variant::CallError ce;
- v = Variant::construct(type, NULL, 0, ce);
- }
+ Variant::CallError ce;
+ v = Variant::construct(type, NULL, 0, ce);
v.get_property_list(&props);
} else {
@@ -136,11 +132,9 @@ void PropertySelector::_update_search() {
Control::get_icon("MiniMatrix3", "EditorIcons"),
Control::get_icon("MiniTransform", "EditorIcons"),
Control::get_icon("MiniColor", "EditorIcons"),
- Control::get_icon("MiniImage", "EditorIcons"),
Control::get_icon("MiniPath", "EditorIcons"),
Control::get_icon("MiniRid", "EditorIcons"),
Control::get_icon("MiniObject", "EditorIcons"),
- Control::get_icon("MiniInput", "EditorIcons"),
Control::get_icon("MiniDictionary", "EditorIcons"),
Control::get_icon("MiniArray", "EditorIcons"),
Control::get_icon("MiniRawArray", "EditorIcons"),
@@ -326,22 +320,7 @@ void PropertySelector::_item_selected() {
String name = item->get_metadata(0);
String class_type;
- if (properties && type == Variant::INPUT_EVENT) {
-
- switch (event_type) {
- case InputEvent::NONE: class_type = "InputEvent"; break;
- case InputEvent::KEY: class_type = "InputEventKey"; break;
- case InputEvent::MOUSE_MOTION: class_type = "InputEventMouseMotion"; break;
- case InputEvent::MOUSE_BUTTON: class_type = "InputEventMouseButton"; break;
- case InputEvent::JOYPAD_MOTION: class_type = "InputEventJoypadMotion"; break;
- case InputEvent::JOYPAD_BUTTON: class_type = "InputEventJoypadButton"; break;
- case InputEvent::SCREEN_TOUCH: class_type = "InputEventScreenTouch"; break;
- case InputEvent::SCREEN_DRAG: class_type = "InputEventScreenDrag"; break;
- case InputEvent::ACTION: class_type = "InputEventAction"; break;
- default: {}
- }
-
- } else if (type) {
+ if (type) {
class_type = Variant::get_type_name(type);
} else {
@@ -515,13 +494,12 @@ void PropertySelector::select_property_from_script(const Ref<Script> &p_script,
search_box->grab_focus();
_update_search();
}
-void PropertySelector::select_property_from_basic_type(Variant::Type p_type, InputEvent::Type p_event_type, const String &p_current) {
+void PropertySelector::select_property_from_basic_type(Variant::Type p_type, const String &p_current) {
ERR_FAIL_COND(p_type == Variant::NIL);
base_type = "";
selected = p_current;
type = p_type;
- event_type = p_event_type;
script = 0;
properties = true;
instance = NULL;
diff --git a/editor/property_selector.h b/editor/property_selector.h
index 6dc2592176..def791a3fd 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -42,7 +42,7 @@ class PropertySelector : public ConfirmationDialog {
void _update_search();
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _confirmed();
void _text_changed(const String &p_newtext);
@@ -52,7 +52,6 @@ class PropertySelector : public ConfirmationDialog {
bool properties;
String selected;
Variant::Type type;
- InputEvent::Type event_type;
String base_type;
ObjectID script;
Object *instance;
@@ -71,7 +70,7 @@ public:
void select_property_from_base_type(const String &p_base, const String &p_current = "");
void select_property_from_script(const Ref<Script> &p_script, const String &p_current = "");
- void select_property_from_basic_type(Variant::Type p_type, InputEvent::Type p_event_type, const String &p_current = "");
+ void select_property_from_basic_type(Variant::Type p_type, const String &p_current = "");
void select_property_from_instance(Object *p_instance, const String &p_current = "");
PropertySelector();
diff --git a/editor/pvrtc_compress.cpp b/editor/pvrtc_compress.cpp
index 6edcd60188..ef875bbead 100644
--- a/editor/pvrtc_compress.cpp
+++ b/editor/pvrtc_compress.cpp
@@ -89,7 +89,7 @@ static void _compress_image(Image::CompressMode p_mode, Image *p_image) {
args.push_back("-m");
Ref<ImageTexture> t = memnew(ImageTexture);
- t->create_from_image(*p_image, 0);
+ t->create_from_image(Ref<Image>(p_image), 0);
ResourceSaver::save(src_img, t);
Error err = OS::get_singleton()->execute(ttpath, args, true);
@@ -101,7 +101,7 @@ static void _compress_image(Image::CompressMode p_mode, Image *p_image) {
ERR_EXPLAIN(TTR("Can't load back converted image using PVRTC tool:") + " " + dst_img);
ERR_FAIL_COND(t.is_null());
- *p_image = t->get_data();
+ p_image->copy_internals_from(t->get_data());
}
static void _compress_pvrtc2(Image *p_image) {
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index 7fce485f3a..7fb9666afb 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -77,17 +77,18 @@ void EditorQuickOpen::_text_changed(const String &p_newtext) {
_update_search();
}
-void EditorQuickOpen::_sbox_input(const InputEvent &p_ie) {
+void EditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_ie) {
- if (p_ie.type == InputEvent::KEY) {
+ Ref<InputEventKey> k = p_ie;
+ if (k.is_valid()) {
- switch (p_ie.key.scancode) {
+ switch (k->get_scancode()) {
case KEY_UP:
case KEY_DOWN:
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_gui_input", p_ie);
+ search_options->call("_gui_input", k);
search_box->accept_event();
TreeItem *root = search_options->get_root();
diff --git a/editor/quick_open.h b/editor/quick_open.h
index 0e5766033f..44f8c025e6 100644
--- a/editor/quick_open.h
+++ b/editor/quick_open.h
@@ -47,7 +47,7 @@ class EditorQuickOpen : public ConfirmationDialog {
void _update_search();
- void _sbox_input(const InputEvent &p_ie);
+ void _sbox_input(const Ref<InputEvent> &p_ie);
void _parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<String, Ref<Texture> > > &list);
float _path_cmp(String search, String path) const;
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 835243e401..0f05cc79ff 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -52,19 +52,21 @@ void SceneTreeDock::_nodes_drag_begin() {
}
}
-void SceneTreeDock::_input(InputEvent p_event) {
+void SceneTreeDock::_input(Ref<InputEvent> p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && !p_event.mouse_button.pressed && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
restore_script_editor_on_drag = false; //lost chance
}
}
-void SceneTreeDock::_unhandled_key_input(InputEvent p_event) {
+void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) {
if (get_viewport()->get_modal_stack_top())
return; //ignore because of modal window
- if (!p_event.key.pressed || p_event.key.echo)
+ if (!p_event->is_pressed() || p_event->is_echo())
return;
if (ED_IS_SHORTCUT("scene_tree/add_child_node", p_event)) {
@@ -680,8 +682,6 @@ void SceneTreeDock::_notification(int p_what) {
button_create_script->set_icon(get_icon("ScriptCreate", "EditorIcons"));
button_clear_script->set_icon(get_icon("ScriptRemove", "EditorIcons"));
- filter_icon->set_texture(get_icon("Zoom", "EditorIcons"));
-
filter_icon->set_texture(get_icon("Search", "EditorIcons"));
EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", this, "_selection_changed");
@@ -1829,6 +1829,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter_hbc->add_child(filter);
filter_icon = memnew(TextureRect);
+ filter_icon->set_custom_minimum_size(Size2(24 * EDSCALE, 0));
filter_hbc->add_child(filter_icon);
filter_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
filter->connect("text_changed", this, "_filter_changed");
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index de6b81d44a..f190025dd6 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -133,8 +133,8 @@ class SceneTreeDock : public VBoxContainer {
void _node_prerenamed(Node *p_node, const String &p_new_name);
void _nodes_drag_begin();
- void _input(InputEvent p_event);
- void _unhandled_key_input(InputEvent p_event);
+ void _input(Ref<InputEvent> p_event);
+ void _unhandled_key_input(Ref<InputEvent> p_event);
void _import_subscene();
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 1e86d8db4b..2220e3330f 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -539,10 +539,12 @@ ScriptCreateDialog::ScriptCreateDialog() {
/* Margins */
empty_h = memnew(Control);
+ empty_h->set_name("empty_h"); //duplicate() doesn't like nodes without a name
empty_h->set_h_size_flags(Control::SIZE_EXPAND_FILL);
empty_h->set_v_size_flags(Control::SIZE_EXPAND_FILL);
empty_h->set_custom_minimum_size(Size2(0, 10 * EDSCALE));
empty_v = memnew(Control);
+ empty_v->set_name("empty_v");
empty_v->set_h_size_flags(Control::SIZE_EXPAND_FILL);
empty_v->set_v_size_flags(Control::SIZE_EXPAND_FILL);
empty_v->set_custom_minimum_size(Size2(10, 0 * EDSCALE));
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index ebf4b1cf3a..a2bb3a0879 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -1019,6 +1019,11 @@ void ScriptEditorDebugger::_notification(int p_what) {
}
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
+ tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
+ tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
+ } break;
}
}
@@ -1574,9 +1579,10 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
editor = p_editor;
tabs = memnew(TabContainer);
- tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("EditorPanelDebugger", "EditorStyles"));
- tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("EditorTabFGDebugger", "EditorStyles"));
- tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("EditorTabBGDebugger", "EditorStyles"));
+ tabs->set_tab_align(TabContainer::ALIGN_LEFT);
+ tabs->add_style_override("panel", editor->get_gui_base()->get_stylebox("DebuggerPanel", "EditorStyles"));
+ tabs->add_style_override("tab_fg", editor->get_gui_base()->get_stylebox("DebuggerTabFG", "EditorStyles"));
+ tabs->add_style_override("tab_bg", editor->get_gui_base()->get_stylebox("DebuggerTabBG", "EditorStyles"));
tabs->set_v_size_flags(SIZE_EXPAND_FILL);
tabs->set_area_as_parent_rect();
add_child(tabs);
@@ -1601,13 +1607,11 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
hbc->add_child(memnew(VSeparator));
step = memnew(Button);
- step->set_flat(true);
hbc->add_child(step);
step->set_tooltip(TTR("Step Into"));
step->connect("pressed", this, "debug_step");
next = memnew(Button);
- next->set_flat(true);
hbc->add_child(next);
next->set_tooltip(TTR("Step Over"));
next->connect("pressed", this, "debug_next");
@@ -1615,13 +1619,11 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
hbc->add_child(memnew(VSeparator));
dobreak = memnew(Button);
- dobreak->set_flat(true);
hbc->add_child(dobreak);
dobreak->set_tooltip(TTR("Break"));
dobreak->connect("pressed", this, "debug_break");
docontinue = memnew(Button);
- docontinue->set_flat(true);
hbc->add_child(docontinue);
docontinue->set_tooltip(TTR("Continue"));
docontinue->connect("pressed", this, "debug_continue");
@@ -1629,13 +1631,11 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
//hbc->add_child( memnew( VSeparator) );
back = memnew(Button);
- back->set_flat(true);
hbc->add_child(back);
back->set_tooltip(TTR("Inspect Previous Instance"));
back->hide();
forward = memnew(Button);
- forward->set_flat(true);
hbc->add_child(forward);
forward->set_tooltip(TTR("Inspect Next Instance"));
forward->hide();
@@ -1798,7 +1798,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
vmem_total->set_custom_minimum_size(Size2(100, 1) * EDSCALE);
vmem_hb->add_child(vmem_total);
vmem_refresh = memnew(Button);
- vmem_refresh->set_flat(true);
vmem_hb->add_child(vmem_refresh);
vmem_vb->add_child(vmem_hb);
vmem_refresh->connect("pressed", this, "_video_mem_request");
@@ -1831,35 +1830,30 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
}
{ // misc
-
- GridContainer *grid_cont = memnew(GridContainer);
- grid_cont->set_h_size_flags(SIZE_EXPAND_FILL);
- grid_cont->set_name(TTR("Misc"));
- grid_cont->set_columns(2);
- tabs->add_child(grid_cont);
-
- grid_cont->add_child(memnew(Label(TTR("Clicked Control:"))));
+ VBoxContainer *info_left = memnew(VBoxContainer);
+ info_left->set_h_size_flags(SIZE_EXPAND_FILL);
+ info_left->set_name(TTR("Misc"));
+ tabs->add_child(info_left);
clicked_ctrl = memnew(LineEdit);
- grid_cont->add_child(clicked_ctrl);
-
- grid_cont->add_child(memnew(Label(TTR("Clicked Control Type:"))));
+ info_left->add_margin_child(TTR("Clicked Control:"), clicked_ctrl);
clicked_ctrl_type = memnew(LineEdit);
- grid_cont->add_child(clicked_ctrl_type);
+ info_left->add_margin_child(TTR("Clicked Control Type:"), clicked_ctrl_type);
live_edit_root = memnew(LineEdit);
- live_edit_root->set_h_size_flags(SIZE_EXPAND_FILL);
{
- grid_cont->add_child(memnew(Label(TTR("Live Edit Root:"))));
-
HBoxContainer *lehb = memnew(HBoxContainer);
- lehb->set_h_size_flags(SIZE_EXPAND_FILL);
- lehb->add_child(live_edit_root);
+ Label *l = memnew(Label(TTR("Live Edit Root:")));
+ lehb->add_child(l);
+ l->set_h_size_flags(SIZE_EXPAND_FILL);
le_set = memnew(Button(TTR("Set From Tree")));
lehb->add_child(le_set);
le_clear = memnew(Button(TTR("Clear")));
lehb->add_child(le_clear);
- grid_cont->add_child(lehb);
+ info_left->add_child(lehb);
+ MarginContainer *mc = memnew(MarginContainer);
+ mc->add_child(live_edit_root);
+ info_left->add_child(mc);
le_set->set_disabled(true);
le_clear->set_disabled(true);
}
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 8c87857944..563de78415 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -148,7 +148,7 @@ void EditorSettingsDialog::_update_shortcuts() {
if (!sc->has_meta("original"))
continue;
- InputEvent original = sc->get_meta("original");
+ Ref<InputEvent> original = sc->get_meta("original");
String section_name = E->get().get_slice("/", 0);
@@ -170,7 +170,7 @@ void EditorSettingsDialog::_update_shortcuts() {
item->set_text(0, sc->get_name());
item->set_text(1, sc->get_as_text());
- if (!sc->is_shortcut(original) && !(sc->get_shortcut().type == InputEvent::NONE && original.type == InputEvent::NONE)) {
+ if (!sc->is_shortcut(original) && !(sc->get_shortcut().is_null() && original.is_null())) {
item->add_button(1, get_icon("Reload", "EditorIcons"), 2);
}
item->add_button(1, get_icon("Edit", "EditorIcons"), 0);
@@ -199,7 +199,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
if (p_idx == 0) {
press_a_key_label->set_text(TTR("Press a Key.."));
- last_wait_for_key = InputEvent();
+ last_wait_for_key = Ref<InputEventKey>();
press_a_key->popup_centered(Size2(250, 80) * EDSCALE);
press_a_key->grab_focus();
press_a_key->get_ok()->set_focus_mode(FOCUS_NONE);
@@ -212,7 +212,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
ur->create_action("Erase Shortcut");
- ur->add_do_method(sc.ptr(), "set_shortcut", InputEvent());
+ ur->add_do_method(sc.ptr(), "set_shortcut", Ref<InputEvent>());
ur->add_undo_method(sc.ptr(), "set_shortcut", sc->get_shortcut());
ur->add_do_method(this, "_update_shortcuts");
ur->add_undo_method(this, "_update_shortcuts");
@@ -223,7 +223,7 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
if (!sc.is_valid())
return; //pointless, there is nothing
- InputEvent original = sc->get_meta("original");
+ Ref<InputEvent> original = sc->get_meta("original");
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
ur->create_action("Restore Shortcut");
@@ -237,19 +237,21 @@ void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column
}
}
-void EditorSettingsDialog::_wait_for_key(const InputEvent &p_event) {
+void EditorSettingsDialog::_wait_for_key(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode != 0) {
+ Ref<InputEventKey> k = p_event;
- last_wait_for_key = p_event;
- String str = keycode_get_string(p_event.key.scancode).capitalize();
- if (p_event.key.mod.meta)
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() != 0) {
+
+ last_wait_for_key = k;
+ String str = keycode_get_string(k->get_scancode()).capitalize();
+ if (k->get_metakey())
str = TTR("Meta+") + str;
- if (p_event.key.mod.shift)
+ if (k->get_shift())
str = TTR("Shift+") + str;
- if (p_event.key.mod.alt)
+ if (k->get_alt())
str = TTR("Alt+") + str;
- if (p_event.key.mod.control)
+ if (k->get_control())
str = TTR("Control+") + str;
press_a_key_label->set_text(str);
@@ -259,13 +261,16 @@ void EditorSettingsDialog::_wait_for_key(const InputEvent &p_event) {
void EditorSettingsDialog::_press_a_key_confirm() {
- if (last_wait_for_key.type != InputEvent::KEY)
+ if (last_wait_for_key.is_null())
return;
- InputEvent ie;
- ie.type = InputEvent::KEY;
- ie.key.scancode = last_wait_for_key.key.scancode;
- ie.key.mod = last_wait_for_key.key.mod;
+ Ref<InputEventKey> ie;
+ ie.instance();
+ ie->set_scancode(last_wait_for_key->get_scancode());
+ ie->set_shift(last_wait_for_key->get_shift());
+ ie->set_control(last_wait_for_key->get_control());
+ ie->set_alt(last_wait_for_key->get_alt());
+ ie->set_metakey(last_wait_for_key->get_metakey());
Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(shortcut_configured);
@@ -300,6 +305,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
set_resizable(true);
tabs = memnew(TabContainer);
+ tabs->set_tab_align(TabContainer::ALIGN_LEFT);
add_child(tabs);
//set_child_rect(tabs);
diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h
index 7b6e8862dc..cda191ac36 100644
--- a/editor/settings_config_dialog.h
+++ b/editor/settings_config_dialog.h
@@ -54,7 +54,7 @@ class EditorSettingsDialog : public AcceptDialog {
ConfirmationDialog *press_a_key;
Label *press_a_key_label;
- InputEvent last_wait_for_key;
+ Ref<InputEventKey> last_wait_for_key;
String shortcut_configured;
String shortcut_filter;
@@ -68,7 +68,7 @@ class EditorSettingsDialog : public AcceptDialog {
void _notification(int p_what);
void _press_a_key_confirm();
- void _wait_for_key(const InputEvent &p_event);
+ void _wait_for_key(const Ref<InputEvent> &p_event);
void _clear_shortcut_search_box();
void _clear_search_box();
diff --git a/icon.png b/icon.png
index 7abb58ca7b..29c4a7b8fc 100644
--- a/icon.png
+++ b/icon.png
Binary files differ
diff --git a/icon.svg b/icon.svg
index 34747d34fe..5d075125e3 100644
--- a/icon.svg
+++ b/icon.svg
@@ -13,11 +13,11 @@
height="1024"
id="svg3030"
version="1.1"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92.1 r15371"
sodipodi:docname="icon.svg"
inkscape:export-filename="/home/akien/Projects/godot/godot.git/icon.png"
- inkscape:export-xdpi="22.5"
- inkscape:export-ydpi="22.5">
+ inkscape:export-xdpi="24"
+ inkscape:export-ydpi="24">
<defs
id="defs3032" />
<sodipodi:namedview
@@ -28,13 +28,13 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
- inkscape:cx="-560.15123"
- inkscape:cy="190.62119"
+ inkscape:cx="707.24666"
+ inkscape:cy="14.063809"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
- inkscape:window-height="1015"
+ inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
@@ -54,79 +54,86 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(0,-28.362183)">
+ transform="translate(0,-98.519719)">
<g
- id="g4149"
- transform="matrix(1.0688992,0,0,1.1334985,-45.061194,-81.689066)">
+ id="g78"
+ transform="matrix(4.162611,0,0,-4.162611,919.24059,771.67186)"
+ style="stroke-width:0.32031175">
<path
- sodipodi:nodetypes="cccccccccc"
- inkscape:connector-curvature="0"
- id="path3239"
- d="m 116.99388,715.36604 43.13957,-74.51381 75.99672,-171.42666 271.088,-13.63746 282.06373,14.1696 138.45065,255.56931 -25.0756,66.96734 -376.12685,53.39482 -367.70391,-40.32222 z"
- style="fill:#ffffff;fill-opacity:1;stroke:none" />
- <g
- transform="matrix(12.995388,0,0,-12.995388,898.37246,704.73082)"
- id="g3412">
- <path
- id="path3414"
- style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 0,-3.942 c 0,-0.39 -0.25,-0.734 -0.621,-0.852 L -6.835,-6.8 c -0.273,-0.091 -0.57,-0.042 -0.8,0.128 -0.232,0.168 -0.37,0.437 -0.37,0.721 l 0,4.305 -5.818,-1.108 0,-4.381 c 0,-0.447 -0.332,-0.824 -0.775,-0.885 l -8.41,-1.152 c -0.039,-0.003 -0.081,-0.008 -0.121,-0.008 -0.214,0 -0.424,0.078 -0.588,0.22 -0.195,0.172 -0.306,0.416 -0.306,0.676 l 0,4.638 -4.341,-0.018 0,-10e-4 -0.318,10e-4 -0.319,-10e-4 0,10e-4 -4.34,0.018 0,-4.638 c 0,-0.26 -0.112,-0.504 -0.307,-0.676 -0.164,-0.142 -0.374,-0.22 -0.587,-0.22 -0.041,0 -0.082,0.005 -0.123,0.008 l -8.41,1.152 c -0.442,0.061 -0.774,0.438 -0.774,0.885 l 0,4.381 -5.819,1.108 0,-4.305 c 0,-0.284 -0.137,-0.553 -0.368,-0.721 -0.232,-0.17 -0.529,-0.219 -0.802,-0.128 l -6.215,2.006 c -0.369,0.118 -0.619,0.462 -0.619,0.852 l 0,3.942 -3.837,1.29 c -0.19,-0.811 -0.295,-1.642 -0.295,-2.481 0,-10.301 14.512,-18.252 32.448,-18.309 l 0.022,0 0.023,0 c 17.936,0.057 32.448,8.008 32.448,18.309 0,0.766 -0.088,1.521 -0.247,2.266 L 0,0 Z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(12.995388,0,0,-12.995388,140.10982,467.34929)"
- id="g3416">
- <path
- id="path3418"
- style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 0,-16.047 2.163,-0.729 c 0.364,-0.122 0.61,-0.462 0.61,-0.847 l 0,-3.936 4.426,-1.428 0,4.154 c 0,0.27 0.118,0.52 0.323,0.689 0.206,0.172 0.474,0.241 0.739,0.192 l 7.608,-1.452 c 0.422,-0.079 0.728,-0.448 0.728,-0.877 l 0,-4.338 6.62,-0.904 0,4.509 c 0,0.241 0.096,0.467 0.264,0.635 0.167,0.166 0.394,0.259 0.633,0.259 l 0.002,0 5.551,-0.022 5.549,0.022 c 0.245,-10e-4 0.468,-0.093 0.635,-0.259 0.169,-0.168 0.264,-0.394 0.264,-0.635 l 0,-4.509 6.621,0.904 0,4.338 c 0,0.429 0.304,0.798 0.726,0.877 l 7.609,1.452 c 0.262,0.049 0.533,-0.02 0.738,-0.192 0.205,-0.169 0.325,-0.419 0.325,-0.689 l 0,-4.154 4.425,1.428 0,3.936 c 0,0.385 0.245,0.725 0.609,0.847 l 1.475,0.497 0,16.279 0.04,0 c 1.437,1.834 2.767,3.767 4.042,5.828 -1.694,2.883 -3.768,5.459 -5.986,7.846 -2.057,-1.035 -4.055,-2.208 -5.942,-3.456 -0.944,0.938 -2.008,1.706 -3.052,2.509 -1.027,0.824 -2.183,1.428 -3.281,2.132 0.327,2.433 0.489,4.828 0.554,7.327 -2.831,1.424 -5.85,2.369 -8.903,3.047 -1.219,-2.048 -2.334,-4.267 -3.304,-6.436 -1.152,0.192 -2.309,0.264 -3.467,0.277 l 0,0.002 c -0.008,0 -0.015,-0.002 -0.022,-0.002 -0.008,0 -0.015,0.002 -0.022,0.002 l 0,-0.002 c -1.16,-0.013 -2.316,-0.085 -3.468,-0.277 -0.97,2.169 -2.084,4.388 -3.305,6.436 C 19.475,24.555 16.456,23.61 13.626,22.186 13.69,19.687 13.852,17.292 14.18,14.859 13.081,14.155 11.925,13.551 10.898,12.727 9.855,11.924 8.79,11.156 7.846,10.218 5.958,11.466 3.961,12.639 1.904,13.674 -0.314,11.287 -2.388,8.711 -4.082,5.828 -2.807,3.767 -1.477,1.834 -0.04,0 L 0,0 Z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(12.995388,0,0,-12.995388,411.4457,567.42812)"
- id="g3420">
- <path
- id="path3422"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 c 0,-3.611 -2.926,-6.537 -6.537,-6.537 -3.608,0 -6.535,2.926 -6.535,6.537 0,3.609 2.927,6.533 6.535,6.533 C -2.926,6.533 0,3.609 0,0"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(12.995388,0,0,-12.995388,391.00655,572.46636)"
- id="g3424">
- <path
- id="path3426"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 c 0,-2.396 -1.941,-4.337 -4.339,-4.337 -2.396,0 -4.339,1.941 -4.339,4.337 0,2.396 1.943,4.339 4.339,4.339 C -1.941,4.339 0,2.396 0,0"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(12.995388,0,0,-12.995388,526.30933,660.10985)"
- id="g3428">
- <path
- id="path3430"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 c -1.162,0 -2.104,0.856 -2.104,1.912 l 0,6.018 c 0,1.054 0.942,1.912 2.104,1.912 1.162,0 2.106,-0.858 2.106,-1.912 l 0,-6.018 C 2.106,0.856 1.162,0 0,0"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(12.995388,0,0,-12.995388,641.18731,567.42812)"
- id="g3432">
- <path
- id="path3434"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 c 0,-3.611 2.926,-6.537 6.537,-6.537 3.609,0 6.535,2.926 6.535,6.537 0,3.609 -2.926,6.533 -6.535,6.533 C 2.926,6.533 0,3.609 0,0"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(12.995388,0,0,-12.995388,661.63165,572.46636)"
- id="g3436">
- <path
- id="path3438"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
- d="m 0,0 c 0,-2.396 1.941,-4.337 4.336,-4.337 2.398,0 4.339,1.941 4.339,4.337 0,2.396 -1.941,4.339 -4.339,4.339 C 1.941,4.339 0,2.396 0,0"
- inkscape:connector-curvature="0" />
- </g>
+ d="m 0,0 c 0,0 -0.325,1.994 -0.515,1.976 l -36.182,-3.491 c -2.879,-0.278 -5.115,-2.574 -5.317,-5.459 l -0.994,-14.247 -27.992,-1.997 -1.904,12.912 c -0.424,2.872 -2.932,5.037 -5.835,5.037 h -38.188 c -2.902,0 -5.41,-2.165 -5.834,-5.037 l -1.905,-12.912 -27.992,1.997 -0.994,14.247 c -0.202,2.886 -2.438,5.182 -5.317,5.46 l -36.2,3.49 c -0.187,0.018 -0.324,-1.978 -0.511,-1.978 l -0.049,-7.83 30.658,-4.944 1.004,-14.374 c 0.203,-2.91 2.551,-5.263 5.463,-5.472 l 38.551,-2.75 c 0.146,-0.01 0.29,-0.016 0.434,-0.016 2.897,0 5.401,2.166 5.825,5.038 l 1.959,13.286 h 28.005 l 1.959,-13.286 c 0.423,-2.871 2.93,-5.037 5.831,-5.037 0.142,0 0.284,0.005 0.423,0.015 l 38.556,2.75 c 2.911,0.209 5.26,2.562 5.463,5.472 l 1.003,14.374 30.645,4.966 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path80"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g82-3"
+ transform="matrix(4.162611,0,0,-4.162611,104.69892,525.90697)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 v -47.514 -6.035 -5.492 c 0.108,-0.001 0.216,-0.005 0.323,-0.015 l 36.196,-3.49 c 1.896,-0.183 3.382,-1.709 3.514,-3.609 l 1.116,-15.978 31.574,-2.253 2.175,14.747 c 0.282,1.912 1.922,3.329 3.856,3.329 h 38.188 c 1.933,0 3.573,-1.417 3.855,-3.329 l 2.175,-14.747 31.575,2.253 1.115,15.978 c 0.133,1.9 1.618,3.425 3.514,3.609 l 36.182,3.49 c 0.107,0.01 0.214,0.014 0.322,0.015 v 4.711 l 0.015,0.005 V 0 h 0.134 c 4.795,6.12 9.232,12.569 13.487,19.449 -5.651,9.62 -12.575,18.217 -19.976,26.182 -6.864,-3.455 -13.531,-7.369 -19.828,-11.534 -3.151,3.132 -6.7,5.694 -10.186,8.372 -3.425,2.751 -7.285,4.768 -10.946,7.118 1.09,8.117 1.629,16.108 1.846,24.448 -9.446,4.754 -19.519,7.906 -29.708,10.17 -4.068,-6.837 -7.788,-14.241 -11.028,-21.479 -3.842,0.642 -7.702,0.88 -11.567,0.926 v 0.006 c -0.027,0 -0.052,-0.006 -0.075,-0.006 -0.024,0 -0.049,0.006 -0.073,0.006 V 63.652 C 93.903,63.606 90.046,63.368 86.203,62.726 82.965,69.964 79.247,77.368 75.173,84.205 64.989,81.941 54.915,78.789 45.47,74.035 45.686,65.695 46.225,57.704 47.318,49.587 43.65,47.237 39.795,45.22 36.369,42.469 32.888,39.791 29.333,37.229 26.181,34.097 19.884,38.262 13.219,42.176 6.353,45.631 -1.048,37.666 -7.968,29.069 -13.621,19.449 -9.368,12.569 -4.928,6.12 -0.134,0 Z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path84-6"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g86-7"
+ transform="matrix(4.162611,0,0,-4.162611,784.07144,817.24284)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 -1.121,-16.063 c -0.135,-1.936 -1.675,-3.477 -3.611,-3.616 l -38.555,-2.751 c -0.094,-0.007 -0.188,-0.01 -0.281,-0.01 -1.916,0 -3.569,1.406 -3.852,3.33 l -2.211,14.994 H -81.09 l -2.211,-14.994 c -0.297,-2.018 -2.101,-3.469 -4.133,-3.32 l -38.555,2.751 c -1.936,0.139 -3.476,1.68 -3.611,3.616 L -130.721,0 -163.268,3.138 c 0.015,-3.498 0.06,-7.33 0.06,-8.093 0,-34.374 43.605,-50.896 97.781,-51.086 h 0.066 0.067 c 54.176,0.19 97.766,16.712 97.766,51.086 0,0.777 0.047,4.593 0.063,8.093 z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path88-5"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g90-3"
+ transform="matrix(4.162611,0,0,-4.162611,389.21484,625.67104)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 c 0,-12.052 -9.765,-21.815 -21.813,-21.815 -12.042,0 -21.81,9.763 -21.81,21.815 0,12.044 9.768,21.802 21.81,21.802 C -9.765,21.802 0,12.044 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path92-5"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g94-6"
+ transform="matrix(4.162611,0,0,-4.162611,367.36686,631.05679)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 c 0,-7.994 -6.479,-14.473 -14.479,-14.473 -7.996,0 -14.479,6.479 -14.479,14.473 0,7.994 6.483,14.479 14.479,14.479 C -6.479,14.479 0,7.994 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path96-2"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g98-9"
+ transform="matrix(4.162611,0,0,-4.162611,511.99336,724.73954)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 c -3.878,0 -7.021,2.858 -7.021,6.381 v 20.081 c 0,3.52 3.143,6.381 7.021,6.381 3.878,0 7.028,-2.861 7.028,-6.381 V 6.381 C 7.028,2.858 3.878,0 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path100-1"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g102-2"
+ transform="matrix(4.162611,0,0,-4.162611,634.78706,625.67104)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 c 0,-12.052 9.765,-21.815 21.815,-21.815 12.041,0 21.808,9.763 21.808,21.815 0,12.044 -9.767,21.802 -21.808,21.802 C 9.765,21.802 0,12.044 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path104-7"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g106-0"
+ transform="matrix(4.162611,0,0,-4.162611,656.64056,631.05679)"
+ style="stroke-width:0.32031175">
+ <path
+ d="m 0,0 c 0,-7.994 6.477,-14.473 14.471,-14.473 8.002,0 14.479,6.479 14.479,14.473 0,7.994 -6.477,14.479 -14.479,14.479 C 6.477,14.479 0,7.994 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.32031175"
+ id="path108-9"
+ inkscape:connector-curvature="0" />
</g>
</g>
</svg>
diff --git a/logo.png b/logo.png
index 94274e86a5..8cf3e15ebc 100644
--- a/logo.png
+++ b/logo.png
Binary files differ
diff --git a/logo.svg b/logo.svg
index 15de10c44e..865712b345 100644
--- a/logo.svg
+++ b/logo.svg
@@ -11,19 +11,22 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2"
version="1.1"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92.1 r15371"
xml:space="preserve"
- width="1052.3625"
- height="744.09497"
- viewBox="0 0 1052.3625 744.09497"
- sodipodi:docname="godot_logo3.svg"><metadata
+ width="1024"
+ height="414"
+ viewBox="0 0 959.99998 388.125"
+ sodipodi:docname="logo.svg"
+ inkscape:export-filename="/home/akien/Projects/godot/godot.git/logo.png"
+ inkscape:export-xdpi="48"
+ inkscape:export-ydpi="48"><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs6"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath16"><path
- d="m 0,595.276 841.89,0 L 841.89,0 0,0 0,595.276 Z"
+ d="M 0,595.276 H 841.89 V 0 H 0 Z"
id="path18"
inkscape:connector-curvature="0" /></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
@@ -34,157 +37,183 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:window-width="1855"
- inkscape:window-height="1056"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
id="namedview4"
showgrid="false"
inkscape:zoom="0.63432763"
- inkscape:cx="601.9743"
- inkscape:cy="324.47777"
- inkscape:window-x="65"
- inkscape:window-y="24"
+ inkscape:cx="166.44059"
+ inkscape:cy="101.14582"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
- inkscape:current-layer="g10" /><g
+ inkscape:current-layer="g14"
+ fit-margin-top="48"
+ fit-margin-left="48"
+ fit-margin-right="48"
+ fit-margin-bottom="48" /><g
id="g10"
inkscape:groupmode="layer"
inkscape:label="godot_engine_logo_2017_curves-01"
- transform="matrix(1.25,0,0,-1.25,0,744.095)"><g
+ transform="matrix(1.25,0,0,-1.25,-94.249997,597.49874)"><g
id="g12"><g
id="g14"
clip-path="url(#clipPath16)"><g
id="g20"
- transform="translate(482.779,337.7249)"><path
+ transform="matrix(1.1310535,0,0,1.1310535,531.44953,355.31567)"
+ style="stroke-width:0.88413143"><path
d="m 0,0 c -3.611,0 -6.636,-1.659 -9.09,-4.967 -2.441,-3.311 -3.668,-7.958 -3.668,-13.938 0,-5.993 1.166,-10.581 3.503,-13.778 2.333,-3.207 5.398,-4.804 9.2,-4.804 3.8,0 6.887,1.617 9.258,4.862 2.371,3.233 3.559,7.861 3.559,13.886 0,6.02 -1.227,10.654 -3.673,13.89 C 6.646,-1.617 3.616,0 0,0 m -0.055,-59.493 c -10.573,0 -19.195,3.46 -25.859,10.379 -6.655,6.925 -9.984,17.03 -9.984,30.314 0,13.292 3.367,23.356 10.101,30.209 6.736,6.844 15.431,10.269 26.082,10.269 10.649,0 19.251,-3.363 25.794,-10.109 6.555,-6.733 9.827,-16.94 9.827,-30.591 0,-13.661 -3.348,-23.822 -10.05,-30.49 -6.702,-6.654 -15.333,-9.981 -25.911,-9.981"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path22"
inkscape:connector-curvature="0" /></g><g
id="g24"
- transform="translate(550.3284,336.9427)"><path
- d="m 0,0 0,-33.768 c 0,-1.577 0.116,-2.571 0.342,-2.988 0.224,-0.415 0.903,-0.623 2.029,-0.623 4.144,0 7.283,1.548 9.429,4.634 2.151,3.083 3.215,8.216 3.215,15.405 0,7.192 -1.113,11.878 -3.325,14.055 C 9.467,-1.102 5.946,0 1.129,0 L 0,0 Z m -21.675,-52.392 0,67.735 c 0,1.883 0.468,3.369 1.413,4.471 0.939,1.085 2.161,1.636 3.671,1.636 l 18.854,0 c 11.965,0 21.053,-3.018 27.257,-9.04 6.215,-6.02 9.322,-15.499 9.322,-28.447 0,-27.7 -11.821,-41.547 -35.456,-41.547 l -19.302,0 c -3.836,0 -5.759,1.727 -5.759,5.192"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,607.8515,354.43097)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 v -33.768 c 0,-1.577 0.116,-2.571 0.342,-2.988 0.224,-0.415 0.903,-0.623 2.029,-0.623 4.144,0 7.283,1.548 9.429,4.634 2.151,3.083 3.215,8.216 3.215,15.405 0,7.192 -1.113,11.878 -3.325,14.055 C 9.467,-1.102 5.946,0 1.129,0 Z m -21.675,-52.392 v 67.735 c 0,1.883 0.468,3.369 1.413,4.471 0.939,1.085 2.161,1.636 3.671,1.636 H 2.263 c 11.965,0 21.053,-3.018 27.257,-9.04 6.215,-6.02 9.322,-15.499 9.322,-28.447 0,-27.7 -11.821,-41.547 -35.456,-41.547 h -19.302 c -3.836,0 -5.759,1.727 -5.759,5.192"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path26"
inkscape:connector-curvature="0" /></g><g
id="g28"
- transform="translate(632.5165,337.7249)"><path
+ transform="matrix(1.1310535,0,0,1.1310535,700.81066,355.31567)"
+ style="stroke-width:0.88413143"><path
d="m 0,0 c -3.612,0 -6.645,-1.659 -9.095,-4.967 -2.44,-3.311 -3.662,-7.958 -3.662,-13.938 0,-5.993 1.169,-10.581 3.499,-13.778 2.33,-3.207 5.398,-4.804 9.2,-4.804 3.801,0 6.89,1.617 9.258,4.862 2.372,3.233 3.56,7.861 3.56,13.886 0,6.02 -1.225,10.654 -3.671,13.89 C 6.642,-1.617 3.616,0 0,0 m -0.058,-59.493 c -10.577,0 -19.193,3.46 -25.851,10.379 -6.663,6.925 -9.993,17.03 -9.993,30.314 0,13.292 3.367,23.356 10.1,30.209 6.741,6.844 15.431,10.269 26.086,10.269 10.651,0 19.246,-3.363 25.797,-10.109 6.55,-6.733 9.822,-16.94 9.822,-30.591 0,-13.661 -3.349,-23.822 -10.05,-30.49 -6.699,-6.654 -15.338,-9.981 -25.911,-9.981"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path30"
inkscape:connector-curvature="0" /></g><g
id="g32"
- transform="translate(710.4975,281.1577)"><path
- d="m 0,0 c 0,-1.496 -3.721,-2.255 -11.176,-2.255 -7.448,0 -11.18,0.759 -11.18,2.255 l 0,56.681 -13.545,0 c -1.281,0 -2.185,1.727 -2.71,5.198 -0.226,1.652 -0.334,3.343 -0.334,5.077 0,1.724 0.108,3.422 0.334,5.077 0.525,3.462 1.429,5.202 2.71,5.202 l 49.112,0 c 1.279,0 2.179,-1.74 2.712,-5.202 0.221,-1.655 0.335,-3.353 0.335,-5.077 0,-1.734 -0.114,-3.425 -0.335,-5.077 C 15.39,58.408 14.49,56.681 13.211,56.681 L 0,56.681 0,0 Z"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,789.01132,291.33514)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c 0,-1.496 -3.721,-2.255 -11.176,-2.255 -7.448,0 -11.18,0.759 -11.18,2.255 v 56.681 h -13.545 c -1.281,0 -2.185,1.727 -2.71,5.198 -0.226,1.652 -0.334,3.343 -0.334,5.077 0,1.724 0.108,3.422 0.334,5.077 0.525,3.462 1.429,5.202 2.71,5.202 h 49.112 c 1.279,0 2.179,-1.74 2.712,-5.202 0.221,-1.655 0.335,-3.353 0.335,-5.077 0,-1.734 -0.114,-3.425 -0.335,-5.077 C 15.39,58.408 14.49,56.681 13.211,56.681 H 0 Z"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path34"
inkscape:connector-curvature="0" /></g><g
id="g36"
- transform="translate(426.916,321.2775)"><path
- d="m 0,0 c -6.078,0.094 -13.034,-1.173 -13.034,-1.173 l 0,-11.863 6.995,0 -0.078,-5.288 c 0,-1.959 -1.942,-2.943 -5.815,-2.943 -3.878,0 -7.303,1.642 -10.274,4.917 -2.978,3.279 -4.459,8.072 -4.459,14.388 0,6.329 1.447,10.995 4.345,14.006 2.892,3.008 6.683,4.517 11.346,4.517 1.959,0 3.987,-0.316 6.096,-0.961 2.11,-0.639 3.519,-1.238 4.238,-1.799 0.713,-0.577 1.391,-0.85 2.032,-0.85 0.638,0 1.671,0.746 3.1,2.255 1.431,1.505 2.713,3.786 3.844,6.827 1.126,3.057 1.69,5.4 1.69,7.062 0,1.649 -0.036,2.786 -0.109,3.386 -1.581,1.73 -4.499,3.102 -8.755,4.122 -4.248,1.017 -9.011,1.522 -14.28,1.522 -11.594,0 -20.66,-3.65 -27.207,-10.95 -6.552,-7.303 -9.822,-16.783 -9.822,-28.452 0,-13.701 3.347,-24.087 10.041,-31.162 6.706,-7.074 15.51,-10.607 26.425,-10.607 5.87,0 11.08,0.505 15.632,1.522 4.557,1.013 7.586,2.053 9.093,3.105 l 0.452,35.33 C 11.496,-1.036 6.078,-0.104 0,0"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,468.26549,336.71278)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c -6.078,0.094 -13.034,-1.173 -13.034,-1.173 v -11.863 h 6.995 l -0.078,-5.288 c 0,-1.959 -1.942,-2.943 -5.815,-2.943 -3.878,0 -7.303,1.642 -10.274,4.917 -2.978,3.279 -4.459,8.072 -4.459,14.388 0,6.329 1.447,10.995 4.345,14.006 2.892,3.008 6.683,4.517 11.346,4.517 1.959,0 3.987,-0.316 6.096,-0.961 2.11,-0.639 3.519,-1.238 4.238,-1.799 0.713,-0.577 1.391,-0.85 2.032,-0.85 0.638,0 1.671,0.746 3.1,2.255 1.431,1.505 2.713,3.786 3.844,6.827 1.126,3.057 1.69,5.4 1.69,7.062 0,1.649 -0.036,2.786 -0.109,3.386 -1.581,1.73 -4.499,3.102 -8.755,4.122 -4.248,1.017 -9.011,1.522 -14.28,1.522 -11.594,0 -20.66,-3.65 -27.207,-10.95 -6.552,-7.303 -9.822,-16.783 -9.822,-28.452 0,-13.701 3.347,-24.087 10.041,-31.162 6.706,-7.074 15.51,-10.607 26.425,-10.607 5.87,0 11.08,0.505 15.632,1.522 4.557,1.013 7.586,2.053 9.093,3.105 l 0.452,35.33 C 11.496,-1.036 6.078,-0.104 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path38"
inkscape:connector-curvature="0" /></g><g
id="g40"
- transform="translate(403.1167,232.0142)"><path
- d="m 0,0 c -0.624,-1.28 -1.771,-2.454 -3.449,-3.516 -1.676,-1.069 -3.805,-1.6 -6.391,-1.6 -3.412,0 -6.156,1.075 -8.24,3.249 -2.076,2.157 -3.116,5.266 -3.116,9.323 l 0,10.116 c 0,3.969 0.98,7.013 2.946,9.138 1.962,2.108 4.59,3.177 7.872,3.177 3.208,0 5.695,-0.844 7.455,-2.513 1.755,-1.675 2.677,-4.015 2.757,-7.003 l -0.044,-0.133 -2.619,0 c -0.094,2.29 -0.759,4.057 -2.01,5.305 -1.244,1.238 -3.095,1.864 -5.539,1.864 -2.473,0 -4.432,-0.837 -5.866,-2.516 -1.43,-1.675 -2.143,-4.103 -2.143,-7.293 l 0,-10.174 c 0,-3.308 0.771,-5.83 2.311,-7.567 1.54,-1.724 3.616,-2.588 6.236,-2.588 1.913,0 3.451,0.339 4.602,1.033 1.155,0.684 1.956,1.519 2.409,2.51 l 0,8.861 -7.06,0 0,2.463 9.889,0 L 0,0 Z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,441.34721,235.75121)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c -0.624,-1.28 -1.771,-2.454 -3.449,-3.516 -1.676,-1.069 -3.805,-1.6 -6.391,-1.6 -3.412,0 -6.156,1.075 -8.24,3.249 -2.076,2.157 -3.116,5.266 -3.116,9.323 v 10.116 c 0,3.969 0.98,7.013 2.946,9.138 1.962,2.108 4.59,3.177 7.872,3.177 3.208,0 5.695,-0.844 7.455,-2.513 1.755,-1.675 2.677,-4.015 2.757,-7.003 L -0.21,20.238 h -2.619 c -0.094,2.29 -0.759,4.057 -2.01,5.305 -1.244,1.238 -3.095,1.864 -5.539,1.864 -2.473,0 -4.432,-0.837 -5.866,-2.516 -1.43,-1.675 -2.143,-4.103 -2.143,-7.293 V 7.424 c 0,-3.308 0.771,-5.83 2.311,-7.567 1.54,-1.724 3.616,-2.588 6.236,-2.588 1.913,0 3.451,0.339 4.602,1.033 1.155,0.684 1.956,1.519 2.409,2.51 v 8.861 h -7.06 v 2.463 H 0 Z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path42"
inkscape:connector-curvature="0" /></g><g
id="g44"
- transform="translate(416.0852,229.427)"><path
- d="m 0,0 c 1.553,0 2.936,0.44 4.144,1.336 1.21,0.9 2.058,2.037 2.561,3.422 l 0,5.468 -4.492,0 c -1.91,0 -3.44,-0.541 -4.585,-1.623 C -3.52,7.528 -4.088,6.185 -4.088,4.588 -4.088,3.239 -3.733,2.131 -3.014,1.277 -2.296,0.42 -1.292,0 0,0 M 7.124,-2.04 C 6.984,-1.164 6.875,-0.453 6.806,0.104 6.739,0.671 6.705,1.235 6.705,1.808 5.938,0.554 4.948,-0.486 3.725,-1.301 2.504,-2.122 1.146,-2.529 -0.35,-2.529 c -2.092,0 -3.701,0.648 -4.84,1.946 -1.132,1.303 -1.704,3.059 -1.704,5.276 0,2.343 0.823,4.223 2.473,5.618 1.649,1.395 3.89,2.092 6.709,2.092 l 4.417,0 0,3.106 c 0,1.786 -0.456,3.193 -1.351,4.21 -0.914,1.004 -2.17,1.512 -3.791,1.512 -1.508,0 -2.752,-0.479 -3.728,-1.45 -0.973,-0.965 -1.456,-2.144 -1.456,-3.549 l -2.623,0.023 -0.046,0.137 c -0.074,1.906 0.647,3.591 2.168,5.084 1.515,1.489 3.459,2.229 5.825,2.229 2.338,0 4.22,-0.711 5.657,-2.128 1.429,-1.431 2.146,-3.471 2.146,-6.124 l 0,-12.396 c 0,-0.903 0.042,-1.78 0.121,-2.617 0.081,-0.848 0.212,-1.665 0.417,-2.48 l -2.92,0 z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,456.01527,232.82495)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c 1.553,0 2.936,0.44 4.144,1.336 1.21,0.9 2.058,2.037 2.561,3.422 v 5.468 H 2.213 c -1.91,0 -3.44,-0.541 -4.585,-1.623 C -3.52,7.528 -4.088,6.185 -4.088,4.588 -4.088,3.239 -3.733,2.131 -3.014,1.277 -2.296,0.42 -1.292,0 0,0 M 7.124,-2.04 C 6.984,-1.164 6.875,-0.453 6.806,0.104 6.739,0.671 6.705,1.235 6.705,1.808 5.938,0.554 4.948,-0.486 3.725,-1.301 2.504,-2.122 1.146,-2.529 -0.35,-2.529 c -2.092,0 -3.701,0.648 -4.84,1.946 -1.132,1.303 -1.704,3.059 -1.704,5.276 0,2.343 0.823,4.223 2.473,5.618 1.649,1.395 3.89,2.092 6.709,2.092 h 4.417 v 3.106 c 0,1.786 -0.456,3.193 -1.351,4.21 -0.914,1.004 -2.17,1.512 -3.791,1.512 -1.508,0 -2.752,-0.479 -3.728,-1.45 -0.973,-0.965 -1.456,-2.144 -1.456,-3.549 l -2.623,0.023 -0.046,0.137 c -0.074,1.906 0.647,3.591 2.168,5.084 1.515,1.489 3.459,2.229 5.825,2.229 2.338,0 4.22,-0.711 5.657,-2.128 1.429,-1.431 2.146,-3.471 2.146,-6.124 V 3.057 c 0,-0.903 0.042,-1.78 0.121,-2.617 0.081,-0.848 0.212,-1.665 0.417,-2.48 z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path46"
inkscape:connector-curvature="0" /></g><g
id="g48"
- transform="translate(434.4,252.6622)"><path
- d="m 0,0 0.24,-3.923 c 0.664,1.404 1.554,2.486 2.657,3.255 1.107,0.759 2.41,1.138 3.906,1.138 1.527,0 2.814,-0.444 3.852,-1.343 1.039,-0.896 1.805,-2.252 2.292,-4.074 0.623,1.682 1.505,3.011 2.65,3.973 1.145,0.964 2.534,1.444 4.143,1.444 2.217,0 3.937,-0.897 5.156,-2.692 1.224,-1.799 1.834,-4.559 1.834,-8.288 l 0,-14.765 -2.823,0 0,14.814 c 0,3.1 -0.429,5.283 -1.263,6.538 -0.839,1.257 -2.042,1.89 -3.598,1.89 -1.637,0 -2.915,-0.691 -3.834,-2.096 -0.914,-1.405 -1.478,-3.161 -1.683,-5.282 l 0,-0.655 0,-15.209 -2.809,0 0,14.798 c 0,3.027 -0.424,5.194 -1.292,6.488 -0.864,1.294 -2.066,1.936 -3.609,1.936 -1.475,0 -2.668,-0.45 -3.562,-1.342 -0.9,-0.897 -1.54,-2.125 -1.928,-3.683 l 0,-18.197 -2.806,0 L -2.477,0 0,0 Z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,476.7303,259.10521)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 0.24,-3.923 c 0.664,1.404 1.554,2.486 2.657,3.255 1.107,0.759 2.41,1.138 3.906,1.138 1.527,0 2.814,-0.444 3.852,-1.343 1.039,-0.896 1.805,-2.252 2.292,-4.074 0.623,1.682 1.505,3.011 2.65,3.973 1.145,0.964 2.534,1.444 4.143,1.444 2.217,0 3.937,-0.897 5.156,-2.692 1.224,-1.799 1.834,-4.559 1.834,-8.288 v -14.765 h -2.823 v 14.814 c 0,3.1 -0.429,5.283 -1.263,6.538 -0.839,1.257 -2.042,1.89 -3.598,1.89 -1.637,0 -2.915,-0.691 -3.834,-2.096 -0.914,-1.405 -1.478,-3.161 -1.683,-5.282 v -0.655 -15.209 H 10.72 v 14.798 c 0,3.027 -0.424,5.194 -1.292,6.488 -0.864,1.294 -2.066,1.936 -3.609,1.936 -1.475,0 -2.668,-0.45 -3.562,-1.342 -0.9,-0.897 -1.54,-2.125 -1.928,-3.683 V -25.275 H -2.477 V 0 Z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path50"
inkscape:connector-curvature="0" /></g><g
id="g52"
- transform="translate(475.1518,250.6583)"><path
- d="m 0,0 c -1.758,0 -3.202,-0.802 -4.334,-2.402 -1.133,-1.606 -1.718,-3.585 -1.765,-5.944 l 11.66,0 0,1.082 c 0,2.086 -0.489,3.823 -1.469,5.201 C 3.106,-0.684 1.745,0 0,0 m 0.397,-23.76 c -2.725,0 -4.954,1.026 -6.685,3.073 -1.726,2.043 -2.591,4.657 -2.591,7.841 l 0,4.197 c 0,3.19 0.867,5.85 2.602,7.965 1.739,2.105 3.828,3.158 6.277,3.158 2.648,0 4.699,-0.939 6.164,-2.823 1.468,-1.887 2.201,-4.422 2.201,-7.603 l 0,-2.773 -14.464,0 0,-2.102 c 0,-2.447 0.586,-4.484 1.752,-6.11 1.168,-1.63 2.755,-2.438 4.744,-2.438 1.382,0 2.585,0.244 3.588,0.724 1.003,0.491 1.863,1.179 2.578,2.082 l 1.149,-1.988 C 6.949,-21.525 5.96,-22.307 4.753,-22.887 3.549,-23.464 2.094,-23.76 0.397,-23.76"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,522.82277,256.83868)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c -1.758,0 -3.202,-0.802 -4.334,-2.402 -1.133,-1.606 -1.718,-3.585 -1.765,-5.944 h 11.66 v 1.082 c 0,2.086 -0.489,3.823 -1.469,5.201 C 3.106,-0.684 1.745,0 0,0 m 0.397,-23.76 c -2.725,0 -4.954,1.026 -6.685,3.073 -1.726,2.043 -2.591,4.657 -2.591,7.841 v 4.197 c 0,3.19 0.867,5.85 2.602,7.965 1.739,2.105 3.828,3.158 6.277,3.158 2.648,0 4.699,-0.939 6.164,-2.823 1.468,-1.887 2.201,-4.422 2.201,-7.603 v -2.773 H -6.099 v -2.102 c 0,-2.447 0.586,-4.484 1.752,-6.11 1.168,-1.63 2.755,-2.438 4.744,-2.438 1.382,0 2.585,0.244 3.588,0.724 1.003,0.491 1.863,1.179 2.578,2.082 l 1.149,-1.988 C 6.949,-21.525 5.96,-22.307 4.753,-22.887 3.549,-23.464 2.094,-23.76 0.397,-23.76"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path54"
inkscape:connector-curvature="0" /></g><g
id="g56"
- transform="translate(506.3243,250.6583)"><path
- d="m 0,0 c -1.763,0 -3.21,-0.802 -4.341,-2.402 -1.126,-1.606 -1.712,-3.585 -1.763,-5.944 l 11.663,0 0,1.082 c 0,2.086 -0.488,3.823 -1.474,5.201 C 3.104,-0.684 1.744,0 0,0 m 0.394,-23.76 c -2.726,0 -4.951,1.026 -6.679,3.073 -1.733,2.043 -2.6,4.657 -2.6,7.841 l 0,4.197 c 0,3.19 0.871,5.85 2.602,7.965 1.744,2.105 3.834,3.158 6.283,3.158 2.643,0 4.703,-0.939 6.164,-2.823 1.463,-1.887 2.197,-4.422 2.197,-7.603 l 0,-2.773 -14.465,0 0,-2.102 c 0,-2.447 0.587,-4.484 1.76,-6.11 1.162,-1.63 2.742,-2.438 4.738,-2.438 1.387,0 2.585,0.244 3.585,0.724 1.007,0.491 1.866,1.179 2.589,2.082 l 1.141,-1.988 c -0.764,-0.968 -1.75,-1.75 -2.959,-2.33 -1.204,-0.577 -2.658,-0.873 -4.356,-0.873"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,558.0805,256.83868)"
+ style="stroke-width:0.88413143"><path
+ d="M 0,0 C -1.763,0 -3.21,-0.802 -4.341,-2.402 -5.467,-4.008 -6.053,-5.987 -6.104,-8.346 H 5.559 v 1.082 c 0,2.086 -0.488,3.823 -1.474,5.201 C 3.104,-0.684 1.744,0 0,0 m 0.394,-23.76 c -2.726,0 -4.951,1.026 -6.679,3.073 -1.733,2.043 -2.6,4.657 -2.6,7.841 v 4.197 c 0,3.19 0.871,5.85 2.602,7.965 1.744,2.105 3.834,3.158 6.283,3.158 2.643,0 4.703,-0.939 6.164,-2.823 1.463,-1.887 2.197,-4.422 2.197,-7.603 v -2.773 H -6.104 v -2.102 c 0,-2.447 0.587,-4.484 1.76,-6.11 1.162,-1.63 2.742,-2.438 4.738,-2.438 1.387,0 2.585,0.244 3.585,0.724 1.007,0.491 1.866,1.179 2.589,2.082 l 1.141,-1.988 c -0.764,-0.968 -1.75,-1.75 -2.959,-2.33 -1.204,-0.577 -2.658,-0.873 -4.356,-0.873"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path58"
inkscape:connector-curvature="0" /></g><g
id="g60"
- transform="translate(522.0939,252.6622)"><path
- d="m 0,0 0.23,-4.178 c 0.674,1.483 1.564,2.634 2.682,3.435 1.108,0.805 2.413,1.213 3.914,1.213 2.258,0 3.988,-0.835 5.189,-2.513 1.214,-1.675 1.815,-4.279 1.815,-7.812 l 0,-15.42 -2.825,0 0,15.394 c 0,2.888 -0.423,4.905 -1.264,6.075 -0.836,1.17 -2.065,1.753 -3.665,1.753 -1.435,0 -2.638,-0.466 -3.603,-1.414 -0.969,-0.939 -1.691,-2.19 -2.172,-3.767 l 0,-18.041 -2.805,0 L -2.504,0 0,0 Z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,575.91679,259.10521)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 0.23,-4.178 c 0.674,1.483 1.564,2.634 2.682,3.435 1.108,0.805 2.413,1.213 3.914,1.213 2.258,0 3.988,-0.835 5.189,-2.513 1.214,-1.675 1.815,-4.279 1.815,-7.812 v -15.42 h -2.825 v 15.394 c 0,2.888 -0.423,4.905 -1.264,6.075 -0.836,1.17 -2.065,1.753 -3.665,1.753 -1.435,0 -2.638,-0.466 -3.603,-1.414 C 1.504,-4.406 0.782,-5.657 0.301,-7.234 V -25.275 H -2.504 V 0 Z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path62"
inkscape:connector-curvature="0" /></g><g
id="g64"
- transform="translate(544.1545,237.812)"><path
- d="m 0,0 c 0,-2.565 0.486,-4.605 1.472,-6.123 0.974,-1.532 2.457,-2.288 4.436,-2.288 1.356,0 2.498,0.361 3.435,1.101 0.934,0.74 1.672,1.77 2.218,3.077 l 0,12.52 c -0.525,1.346 -1.246,2.434 -2.157,3.272 -0.91,0.824 -2.062,1.238 -3.448,1.238 -1.975,0 -3.468,-0.86 -4.46,-2.587 C 0.497,8.48 0,6.224 0,3.454 L 0,0 Z m -2.833,3.454 c 0,3.582 0.723,6.459 2.177,8.627 1.442,2.157 3.448,3.239 6.004,3.239 1.419,0 2.664,-0.346 3.728,-1.04 1.066,-0.681 1.947,-1.678 2.654,-2.946 l 0.274,3.516 2.381,0 0,-25.298 c 0,-3.239 -0.751,-5.749 -2.26,-7.525 -1.511,-1.769 -3.657,-2.665 -6.428,-2.665 -0.996,0 -2.067,0.156 -3.212,0.459 -1.147,0.303 -2.162,0.701 -3.052,1.2 l 0.776,2.463 c 0.759,-0.492 1.608,-0.873 2.548,-1.141 0.932,-0.277 1.895,-0.41 2.894,-0.41 2.009,0 3.498,0.645 4.46,1.932 0.966,1.304 1.45,3.19 1.45,5.687 l 0,3.057 c -0.717,-1.138 -1.597,-2.011 -2.64,-2.614 -1.039,-0.606 -2.253,-0.909 -3.622,-0.909 -2.539,0 -4.53,0.994 -5.968,2.982 C -2.11,-5.948 -2.833,-3.301 -2.833,0 l 0,3.454 z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,600.8685,242.30884)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c 0,-2.565 0.486,-4.605 1.472,-6.123 0.974,-1.532 2.457,-2.288 4.436,-2.288 1.356,0 2.498,0.361 3.435,1.101 0.934,0.74 1.672,1.77 2.218,3.077 v 12.52 c -0.525,1.346 -1.246,2.434 -2.157,3.272 -0.91,0.824 -2.062,1.238 -3.448,1.238 -1.975,0 -3.468,-0.86 -4.46,-2.587 C 0.497,8.48 0,6.224 0,3.454 Z m -2.833,3.454 c 0,3.582 0.723,6.459 2.177,8.627 1.442,2.157 3.448,3.239 6.004,3.239 1.419,0 2.664,-0.346 3.728,-1.04 1.066,-0.681 1.947,-1.678 2.654,-2.946 l 0.274,3.516 h 2.381 v -25.298 c 0,-3.239 -0.751,-5.749 -2.26,-7.525 -1.511,-1.769 -3.657,-2.665 -6.428,-2.665 -0.996,0 -2.067,0.156 -3.212,0.459 -1.147,0.303 -2.162,0.701 -3.052,1.2 l 0.776,2.463 c 0.759,-0.492 1.608,-0.873 2.548,-1.141 0.932,-0.277 1.895,-0.41 2.894,-0.41 2.009,0 3.498,0.645 4.46,1.932 0.966,1.304 1.45,3.19 1.45,5.687 v 3.057 c -0.717,-1.138 -1.597,-2.011 -2.64,-2.614 -1.039,-0.606 -2.253,-0.909 -3.622,-0.909 -2.539,0 -4.53,0.994 -5.968,2.982 C -2.11,-5.948 -2.833,-3.301 -2.833,0 Z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path66"
inkscape:connector-curvature="0" /></g><path
- d="m 567.986,227.387 -2.83,0 0,25.275 2.83,0 0,-25.275 z m 0,32.471 -2.83,0 0,3.982 2.83,0 0,-3.982 z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ d="m 627.82321,230.5176 h -3.20089 v 28.58738 h 3.20089 z m 0,36.72644 h -3.20089 v 4.50385 h 3.20089 z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994"
id="path68"
inkscape:connector-curvature="0" /><g
id="g70"
- transform="translate(577.1196,252.6622)"><path
- d="m 0,0 0.23,-4.178 c 0.676,1.483 1.562,2.634 2.678,3.435 1.115,0.805 2.422,1.213 3.916,1.213 2.258,0 3.995,-0.835 5.199,-2.513 1.211,-1.675 1.807,-4.279 1.807,-7.812 l 0,-15.42 -2.825,0 0,15.394 c 0,2.888 -0.422,4.905 -1.261,6.075 -0.843,1.17 -2.063,1.753 -3.668,1.753 -1.434,0 -2.635,-0.466 -3.599,-1.414 C 1.51,-4.406 0.785,-5.657 0.306,-7.234 l 0,-18.041 -2.809,0 L -2.503,0 0,0 Z"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,638.15379,259.10521)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 0.23,-4.178 c 0.676,1.483 1.562,2.634 2.678,3.435 1.115,0.805 2.422,1.213 3.916,1.213 2.258,0 3.995,-0.835 5.199,-2.513 1.211,-1.675 1.807,-4.279 1.807,-7.812 v -15.42 h -2.825 v 15.394 c 0,2.888 -0.422,4.905 -1.261,6.075 -0.843,1.17 -2.063,1.753 -3.668,1.753 -1.434,0 -2.635,-0.466 -3.599,-1.414 C 1.51,-4.406 0.785,-5.657 0.306,-7.234 V -25.275 H -2.503 V 0 Z"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path72"
inkscape:connector-curvature="0" /></g><g
id="g74"
- transform="translate(605.0184,250.6583)"><path
- d="m 0,0 c -1.763,0 -3.208,-0.802 -4.334,-2.402 -1.129,-1.606 -1.718,-3.585 -1.768,-5.944 l 11.662,0 0,1.082 c 0,2.086 -0.486,3.823 -1.47,5.201 C 3.109,-0.684 1.747,0 0,0 m 0.401,-23.76 c -2.733,0 -4.958,1.026 -6.681,3.073 -1.73,2.043 -2.595,4.657 -2.595,7.841 l 0,4.197 c 0,3.19 0.865,5.85 2.6,7.965 1.739,2.105 3.831,3.158 6.275,3.158 2.646,0 4.706,-0.939 6.172,-2.823 1.462,-1.887 2.195,-4.422 2.195,-7.603 l 0,-2.773 -14.469,0 0,-2.102 c 0,-2.447 0.59,-4.484 1.757,-6.11 1.166,-1.63 2.748,-2.438 4.746,-2.438 1.382,0 2.579,0.244 3.578,0.724 1.012,0.491 1.869,1.179 2.591,2.082 l 1.147,-1.988 c -0.769,-0.968 -1.755,-1.75 -2.962,-2.33 -1.203,-0.577 -2.658,-0.873 -4.354,-0.873"
- style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,669.70883,256.83868)"
+ style="stroke-width:0.88413143"><path
+ d="M 0,0 C -1.763,0 -3.208,-0.802 -4.334,-2.402 -5.463,-4.008 -6.052,-5.987 -6.102,-8.346 H 5.56 v 1.082 c 0,2.086 -0.486,3.823 -1.47,5.201 C 3.109,-0.684 1.747,0 0,0 m 0.401,-23.76 c -2.733,0 -4.958,1.026 -6.681,3.073 -1.73,2.043 -2.595,4.657 -2.595,7.841 v 4.197 c 0,3.19 0.865,5.85 2.6,7.965 1.739,2.105 3.831,3.158 6.275,3.158 2.646,0 4.706,-0.939 6.172,-2.823 1.462,-1.887 2.195,-4.422 2.195,-7.603 v -2.773 H -6.102 v -2.102 c 0,-2.447 0.59,-4.484 1.757,-6.11 1.166,-1.63 2.748,-2.438 4.746,-2.438 1.382,0 2.579,0.244 3.578,0.724 1.012,0.491 1.869,1.179 2.591,2.082 l 1.147,-1.988 c -0.769,-0.968 -1.755,-1.75 -2.962,-2.33 -1.203,-0.577 -2.658,-0.873 -4.354,-0.873"
+ style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path76"
inkscape:connector-curvature="0" /></g><g
id="g78"
- transform="translate(320.7014,270.4877)"><path
- d="m 0,0 c 0,0 -0.325,1.994 -0.515,1.976 l -36.182,-3.491 c -2.879,-0.278 -5.115,-2.574 -5.317,-5.459 l -0.994,-14.247 -27.992,-1.997 -1.904,12.912 c -0.424,2.872 -2.932,5.037 -5.835,5.037 l -38.188,0 c -2.902,0 -5.41,-2.165 -5.834,-5.037 l -1.905,-12.912 -27.992,1.997 -0.994,14.247 c -0.202,2.886 -2.438,5.182 -5.317,5.46 l -36.2,3.49 c -0.187,0.018 -0.324,-1.978 -0.511,-1.978 l -0.049,-7.83 30.658,-4.944 1.004,-14.374 c 0.203,-2.91 2.551,-5.263 5.463,-5.472 l 38.551,-2.75 c 0.146,-0.01 0.29,-0.016 0.434,-0.016 2.897,0 5.401,2.166 5.825,5.038 l 1.959,13.286 28.005,0 1.959,-13.286 c 0.423,-2.871 2.93,-5.037 5.831,-5.037 0.142,0 0.284,0.005 0.423,0.015 l 38.556,2.75 c 2.911,0.209 5.26,2.562 5.463,5.472 l 1.003,14.374 L 0.05,-7.81 0,0 Z"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,348.13109,279.2668)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c 0,0 -0.325,1.994 -0.515,1.976 l -36.182,-3.491 c -2.879,-0.278 -5.115,-2.574 -5.317,-5.459 l -0.994,-14.247 -27.992,-1.997 -1.904,12.912 c -0.424,2.872 -2.932,5.037 -5.835,5.037 h -38.188 c -2.902,0 -5.41,-2.165 -5.834,-5.037 l -1.905,-12.912 -27.992,1.997 -0.994,14.247 c -0.202,2.886 -2.438,5.182 -5.317,5.46 l -36.2,3.49 c -0.187,0.018 -0.324,-1.978 -0.511,-1.978 l -0.049,-7.83 30.658,-4.944 1.004,-14.374 c 0.203,-2.91 2.551,-5.263 5.463,-5.472 l 38.551,-2.75 c 0.146,-0.01 0.29,-0.016 0.434,-0.016 2.897,0 5.401,2.166 5.825,5.038 l 1.959,13.286 h 28.005 l 1.959,-13.286 c 0.423,-2.871 2.93,-5.037 5.831,-5.037 0.142,0 0.284,0.005 0.423,0.015 l 38.556,2.75 c 2.911,0.209 5.26,2.562 5.463,5.472 l 1.003,14.374 30.645,4.966 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path80"
inkscape:connector-curvature="0" /></g><g
id="g82"
- transform="translate(125.021,329.5287)"><path
- d="m 0,0 0,-47.514 0,-6.035 0,-5.492 c 0.108,-0.001 0.216,-0.005 0.323,-0.015 l 36.196,-3.49 c 1.896,-0.183 3.382,-1.709 3.514,-3.609 l 1.116,-15.978 31.574,-2.253 2.175,14.747 c 0.282,1.912 1.922,3.329 3.856,3.329 l 38.188,0 c 1.933,0 3.573,-1.417 3.855,-3.329 l 2.175,-14.747 31.575,2.253 1.115,15.978 c 0.133,1.9 1.618,3.425 3.514,3.609 l 36.182,3.49 c 0.107,0.01 0.214,0.014 0.322,0.015 l 0,4.711 0.015,0.005 0,54.325 0.134,0 c 4.795,6.12 9.232,12.569 13.487,19.449 -5.651,9.62 -12.575,18.217 -19.976,26.182 -6.864,-3.455 -13.531,-7.369 -19.828,-11.534 -3.151,3.132 -6.7,5.694 -10.186,8.372 -3.425,2.751 -7.285,4.768 -10.946,7.118 1.09,8.117 1.629,16.108 1.846,24.448 -9.446,4.754 -19.519,7.906 -29.708,10.17 -4.068,-6.837 -7.788,-14.241 -11.028,-21.479 -3.842,0.642 -7.702,0.88 -11.567,0.926 l 0,0.006 c -0.027,0 -0.052,-0.006 -0.075,-0.006 -0.024,0 -0.049,0.006 -0.073,0.006 l 0,-0.006 C 93.903,63.606 90.046,63.368 86.203,62.726 82.965,69.964 79.247,77.368 75.173,84.205 64.989,81.941 54.915,78.789 45.47,74.035 45.686,65.695 46.225,57.704 47.318,49.587 43.65,47.237 39.795,45.22 36.369,42.469 32.888,39.791 29.333,37.229 26.181,34.097 19.884,38.262 13.219,42.176 6.353,45.631 -1.048,37.666 -7.968,29.069 -13.621,19.449 -9.368,12.569 -4.928,6.12 -0.134,0 L 0,0 Z"
- style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,126.80608,346.04533)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 v -47.514 -6.035 -5.492 c 0.108,-0.001 0.216,-0.005 0.323,-0.015 l 36.196,-3.49 c 1.896,-0.183 3.382,-1.709 3.514,-3.609 l 1.116,-15.978 31.574,-2.253 2.175,14.747 c 0.282,1.912 1.922,3.329 3.856,3.329 h 38.188 c 1.933,0 3.573,-1.417 3.855,-3.329 l 2.175,-14.747 31.575,2.253 1.115,15.978 c 0.133,1.9 1.618,3.425 3.514,3.609 l 36.182,3.49 c 0.107,0.01 0.214,0.014 0.322,0.015 v 4.711 l 0.015,0.005 V 0 h 0.134 c 4.795,6.12 9.232,12.569 13.487,19.449 -5.651,9.62 -12.575,18.217 -19.976,26.182 -6.864,-3.455 -13.531,-7.369 -19.828,-11.534 -3.151,3.132 -6.7,5.694 -10.186,8.372 -3.425,2.751 -7.285,4.768 -10.946,7.118 1.09,8.117 1.629,16.108 1.846,24.448 -9.446,4.754 -19.519,7.906 -29.708,10.17 -4.068,-6.837 -7.788,-14.241 -11.028,-21.479 -3.842,0.642 -7.702,0.88 -11.567,0.926 v 0.006 c -0.027,0 -0.052,-0.006 -0.075,-0.006 -0.024,0 -0.049,0.006 -0.073,0.006 V 63.652 C 93.903,63.606 90.046,63.368 86.203,62.726 82.965,69.964 79.247,77.368 75.173,84.205 64.989,81.941 54.915,78.789 45.47,74.035 45.686,65.695 46.225,57.704 47.318,49.587 43.65,47.237 39.795,45.22 36.369,42.469 32.888,39.791 29.333,37.229 26.181,34.097 19.884,38.262 13.219,42.176 6.353,45.631 -1.048,37.666 -7.968,29.069 -13.621,19.449 -9.368,12.569 -4.928,6.12 -0.134,0 Z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path84"
inkscape:connector-curvature="0" /></g><g
id="g86"
- transform="translate(288.2292,259.54)"><path
- d="m 0,0 -1.121,-16.063 c -0.135,-1.936 -1.675,-3.477 -3.611,-3.616 l -38.555,-2.751 c -0.094,-0.007 -0.188,-0.01 -0.281,-0.01 -1.916,0 -3.569,1.406 -3.852,3.33 l -2.211,14.994 -31.459,0 -2.211,-14.994 c -0.297,-2.018 -2.101,-3.469 -4.133,-3.32 l -38.555,2.751 c -1.936,0.139 -3.476,1.68 -3.611,3.616 L -130.721,0 -163.268,3.138 c 0.015,-3.498 0.06,-7.33 0.06,-8.093 0,-34.374 43.605,-50.896 97.781,-51.086 l 0.066,0 0.067,0 c 54.176,0.19 97.766,16.712 97.766,51.086 0,0.777 0.047,4.593 0.063,8.093 L 0,0 Z"
- style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,311.40329,266.88437)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 -1.121,-16.063 c -0.135,-1.936 -1.675,-3.477 -3.611,-3.616 l -38.555,-2.751 c -0.094,-0.007 -0.188,-0.01 -0.281,-0.01 -1.916,0 -3.569,1.406 -3.852,3.33 l -2.211,14.994 H -81.09 l -2.211,-14.994 c -0.297,-2.018 -2.101,-3.469 -4.133,-3.32 l -38.555,2.751 c -1.936,0.139 -3.476,1.68 -3.611,3.616 L -130.721,0 -163.268,3.138 c 0.015,-3.498 0.06,-7.33 0.06,-8.093 0,-34.374 43.605,-50.896 97.781,-51.086 h 0.066 0.067 c 54.176,0.19 97.766,16.712 97.766,51.086 0,0.777 0.047,4.593 0.063,8.093 z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path88"
inkscape:connector-curvature="0" /></g><g
id="g90"
- transform="translate(193.3713,305.562)"><path
+ transform="matrix(1.1310535,0,0,1.1310535,204.11393,318.93771)"
+ style="stroke-width:0.88413143"><path
d="m 0,0 c 0,-12.052 -9.765,-21.815 -21.813,-21.815 -12.042,0 -21.81,9.763 -21.81,21.815 0,12.044 9.768,21.802 21.81,21.802 C -9.765,21.802 0,12.044 0,0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path92"
inkscape:connector-curvature="0" /></g><g
id="g94"
- transform="translate(188.1227,304.2682)"><path
+ transform="matrix(1.1310535,0,0,1.1310535,198.17748,317.47435)"
+ style="stroke-width:0.88413143"><path
d="m 0,0 c 0,-7.994 -6.479,-14.473 -14.479,-14.473 -7.996,0 -14.479,6.479 -14.479,14.473 0,7.994 6.483,14.479 14.479,14.479 C -6.479,14.479 0,7.994 0,0"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path96"
inkscape:connector-curvature="0" /></g><g
id="g98"
- transform="translate(222.8669,281.7624)"><path
- d="m 0,0 c -3.878,0 -7.021,2.858 -7.021,6.381 l 0,20.081 c 0,3.52 3.143,6.381 7.021,6.381 3.878,0 7.028,-2.861 7.028,-6.381 l 0,-20.081 C 7.028,2.858 3.878,0 0,0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ transform="matrix(1.1310535,0,0,1.1310535,237.47503,292.01909)"
+ style="stroke-width:0.88413143"><path
+ d="m 0,0 c -3.878,0 -7.021,2.858 -7.021,6.381 v 20.081 c 0,3.52 3.143,6.381 7.021,6.381 3.878,0 7.028,-2.861 7.028,-6.381 V 6.381 C 7.028,2.858 3.878,0 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path100"
inkscape:connector-curvature="0" /></g><g
id="g102"
- transform="translate(252.3661,305.562)"><path
+ transform="matrix(1.1310535,0,0,1.1310535,270.84021,318.93771)"
+ style="stroke-width:0.88413143"><path
d="m 0,0 c 0,-12.052 9.765,-21.815 21.815,-21.815 12.041,0 21.808,9.763 21.808,21.815 0,12.044 -9.767,21.802 -21.808,21.802 C 9.765,21.802 0,12.044 0,0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path104"
inkscape:connector-curvature="0" /></g><g
id="g106"
- transform="translate(257.616,304.2682)"><path
+ transform="matrix(1.1310535,0,0,1.1310535,276.77813,317.47435)"
+ style="stroke-width:0.88413143"><path
d="m 0,0 c 0,-7.994 6.477,-14.473 14.471,-14.473 8.002,0 14.479,6.479 14.479,14.473 0,7.994 -6.477,14.479 -14.479,14.479 C 6.477,14.479 0,7.994 0,0"
- style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.88413143"
id="path108"
inkscape:connector-curvature="0" /></g></g></g></g></svg> \ No newline at end of file
diff --git a/main/app_icon.png b/main/app_icon.png
index eafae08d59..1d75cdc710 100644
--- a/main/app_icon.png
+++ b/main/app_icon.png
Binary files differ
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 8f0b8464eb..9e11a595dc 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -115,19 +115,19 @@ bool InputDefault::is_action_pressed(const StringName &p_action) const {
case InputEvent::KEY: {
const InputEventKey &iek=E->get().key;
- if ((keys_pressed.has(iek.scancode)))
+ if ((keys_pressed.has(iek->get_scancode())))
return true;
} break;
case InputEvent::MOUSE_BUTTON: {
const InputEventMouseButton &iemb=E->get().mouse_button;
- if(mouse_button_mask&(1<<iemb.button_index))
+ if(mouse_button_mask&(1<<iemb->get_button_index()))
return true;
} break;
case InputEvent::JOYPAD_BUTTON: {
const InputEventJoypadButton &iejb=E->get().joy_button;
- int c = _combine_device(iejb.button_index,device);
+ int c = _combine_device(iejb->get_button_index(),device);
if (joy_buttons_pressed.has(c))
return true;
} break;
@@ -297,94 +297,86 @@ Vector3 InputDefault::get_gyroscope() const {
return gyroscope;
}
-void InputDefault::parse_input_event(const InputEvent &p_event) {
+void InputDefault::parse_input_event(const Ref<InputEvent> &p_event) {
_THREAD_SAFE_METHOD_
- switch (p_event.type) {
-
- case InputEvent::KEY: {
-
- if (p_event.key.echo)
- break;
- if (p_event.key.scancode == 0)
- break;
-
- //print_line(p_event);
-
- if (p_event.key.pressed)
- keys_pressed.insert(p_event.key.scancode);
- else
- keys_pressed.erase(p_event.key.scancode);
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- if (p_event.mouse_button.doubleclick)
- break;
-
- if (p_event.mouse_button.pressed)
- mouse_button_mask |= (1 << p_event.mouse_button.button_index);
- else
- mouse_button_mask &= ~(1 << p_event.mouse_button.button_index);
-
- if (main_loop && emulate_touch && p_event.mouse_button.button_index == 1) {
- InputEventScreenTouch touch_event;
- touch_event.index = 0;
- touch_event.pressed = p_event.mouse_button.pressed;
- touch_event.x = p_event.mouse_button.x;
- touch_event.y = p_event.mouse_button.y;
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch = touch_event;
- main_loop->input_event(ev);
- }
- Point2 pos = Point2(p_event.mouse_button.global_x, p_event.mouse_button.global_y);
- if (mouse_pos != pos) {
- set_mouse_position(pos);
- }
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- if (main_loop && emulate_touch && p_event.mouse_motion.button_mask & 1) {
- InputEventScreenDrag drag_event;
- drag_event.index = 0;
- drag_event.x = p_event.mouse_motion.x;
- drag_event.y = p_event.mouse_motion.y;
- drag_event.relative_x = p_event.mouse_motion.relative_x;
- drag_event.relative_y = p_event.mouse_motion.relative_y;
- drag_event.speed_x = p_event.mouse_motion.speed_x;
- drag_event.speed_y = p_event.mouse_motion.speed_y;
-
- InputEvent ev;
- ev.type = InputEvent::SCREEN_DRAG;
- ev.screen_drag = drag_event;
-
- main_loop->input_event(ev);
- }
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && !k->is_echo() && k->get_scancode() != 0) {
+
+ //print_line(p_event);
+
+ if (k->is_pressed())
+ keys_pressed.insert(k->get_scancode());
+ else
+ keys_pressed.erase(k->get_scancode());
+ }
+
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (mb.is_valid() && !mb->is_doubleclick()) {
+
+ if (mb->is_pressed())
+ mouse_button_mask |= (1 << mb->get_button_index());
+ else
+ mouse_button_mask &= ~(1 << mb->get_button_index());
+
+ if (main_loop && emulate_touch && mb->get_button_index() == 1) {
+ Ref<InputEventScreenTouch> touch_event;
+ touch_event.instance();
+ touch_event->set_pressed(mb->is_pressed());
+ touch_event->set_pos(mb->get_pos());
+ main_loop->input_event(touch_event);
+ }
+
+ Point2 pos = mb->get_global_pos();
+ if (mouse_pos != pos) {
+ set_mouse_position(pos);
+ }
+ }
+
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
+
+ if (main_loop && emulate_touch && mm->get_button_mask() & 1) {
+ Ref<InputEventScreenDrag> drag_event;
+ drag_event.instance();
- } break;
- case InputEvent::JOYPAD_BUTTON: {
+ drag_event->set_pos(mm->get_pos());
+ drag_event->set_relative(mm->get_relative());
+ drag_event->set_speed(mm->get_speed());
+
+ main_loop->input_event(drag_event);
+ }
+ }
+
+ Ref<InputEventJoypadButton> jb = p_event;
+
+ if (jb.is_valid()) {
+
+ int c = _combine_device(jb->get_button_index(), jb->get_device());
+
+ if (jb->is_pressed())
+ joy_buttons_pressed.insert(c);
+ else
+ joy_buttons_pressed.erase(c);
+ }
- int c = _combine_device(p_event.joy_button.button_index, p_event.device);
+ Ref<InputEventJoypadMotion> jm = p_event;
- if (p_event.joy_button.pressed)
- joy_buttons_pressed.insert(c);
- else
- joy_buttons_pressed.erase(c);
- } break;
- case InputEvent::JOYPAD_MOTION: {
- set_joy_axis(p_event.device, p_event.joy_motion.axis, p_event.joy_motion.axis_value);
- } break;
+ if (jm.is_valid()) {
+ set_joy_axis(jm->get_device(), jm->get_axis(), jm->get_axis_value());
}
- if (!p_event.is_echo()) {
+ if (p_event->is_echo()) {
for (const Map<StringName, InputMap::Action>::Element *E = InputMap::get_singleton()->get_action_map().front(); E; E = E->next()) {
- if (InputMap::get_singleton()->event_is_action(p_event, E->key()) && is_action_pressed(E->key()) != p_event.is_pressed()) {
+ if (InputMap::get_singleton()->event_is_action(p_event, E->key()) && is_action_pressed(E->key()) != p_event->is_pressed()) {
Action action;
action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
- action.pressed = p_event.is_pressed();
+ action.pressed = p_event->is_pressed();
action_state[E->key()] = action;
}
}
@@ -484,7 +476,7 @@ void InputDefault::warp_mouse_pos(const Vector2 &p_to) {
OS::get_singleton()->warp_mouse_pos(p_to);
}
-Point2i InputDefault::warp_mouse_motion(const InputEventMouseMotion &p_motion, const Rect2 &p_rect) {
+Point2i InputDefault::warp_mouse_motion(const Ref<InputEventMouseMotion> &p_motion, const Rect2 &p_rect) {
// The relative distance reported for the next event after a warp is in the boundaries of the
// size of the rect on that axis, but it may be greater, in which case there's not problem as fmod()
@@ -495,13 +487,13 @@ Point2i InputDefault::warp_mouse_motion(const InputEventMouseMotion &p_motion, c
// detect the warp: if the relative distance is greater than the half of the size of the relevant rect
// (checked per each axis), it will be considered as the consequence of a former pointer warp.
- const Point2i rel_sgn(p_motion.relative_x >= 0.0f ? 1 : -1, p_motion.relative_y >= 0.0 ? 1 : -1);
+ const Point2i rel_sgn(p_motion->get_relative().x >= 0.0f ? 1 : -1, p_motion->get_relative().y >= 0.0 ? 1 : -1);
const Size2i warp_margin = p_rect.size * 0.5f;
const Point2i rel_warped(
- Math::fmod(p_motion.relative_x + rel_sgn.x * warp_margin.x, p_rect.size.x) - rel_sgn.x * warp_margin.x,
- Math::fmod(p_motion.relative_y + rel_sgn.y * warp_margin.y, p_rect.size.y) - rel_sgn.y * warp_margin.y);
+ Math::fmod(p_motion->get_relative().x + rel_sgn.x * warp_margin.x, p_rect.size.x) - rel_sgn.x * warp_margin.x,
+ Math::fmod(p_motion->get_relative().y + rel_sgn.y * warp_margin.y, p_rect.size.y) - rel_sgn.y * warp_margin.y);
- const Point2i pos_local = Point2i(p_motion.global_x, p_motion.global_y) - p_rect.pos;
+ const Point2i pos_local = p_motion->get_global_pos() - p_rect.pos;
const Point2i pos_warped(Math::fposmod(pos_local.x, p_rect.size.x), Math::fposmod(pos_local.y, p_rect.size.y));
if (pos_warped != pos_local) {
OS::get_singleton()->warp_mouse_pos(pos_warped + p_rect.pos);
@@ -1020,22 +1012,22 @@ void InputDefault::joy_hat(int p_device, int p_val) {
void InputDefault::_button_event(int p_device, int p_index, bool p_pressed) {
- InputEvent ievent;
- ievent.type = InputEvent::JOYPAD_BUTTON;
- ievent.device = p_device;
- ievent.joy_button.button_index = p_index;
- ievent.joy_button.pressed = p_pressed;
+ Ref<InputEventJoypadButton> ievent;
+ ievent.instance();
+ ievent->set_device(p_device);
+ ievent->set_button_index(p_index);
+ ievent->set_pressed(p_pressed);
parse_input_event(ievent);
};
void InputDefault::_axis_event(int p_device, int p_axis, float p_value) {
- InputEvent ievent;
- ievent.type = InputEvent::JOYPAD_MOTION;
- ievent.device = p_device;
- ievent.joy_motion.axis = p_axis;
- ievent.joy_motion.axis_value = p_value;
+ Ref<InputEventJoypadMotion> ievent;
+ ievent.instance();
+ ievent->set_device(p_device);
+ ievent->set_axis(p_axis);
+ ievent->set_axis_value(p_value);
parse_input_event(ievent);
};
diff --git a/main/input_default.h b/main/input_default.h
index 55b7555ef9..35e841a488 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -201,9 +201,9 @@ public:
virtual int get_mouse_button_mask() const;
virtual void warp_mouse_pos(const Vector2 &p_to);
- virtual Point2i warp_mouse_motion(const InputEventMouseMotion &p_motion, const Rect2 &p_rect);
+ virtual Point2i warp_mouse_motion(const Ref<InputEventMouseMotion> &p_motion, const Rect2 &p_rect);
- virtual void parse_input_event(const InputEvent &p_event);
+ virtual void parse_input_event(const Ref<InputEvent> &p_event);
void set_gravity(const Vector3 &p_gravity);
void set_accelerometer(const Vector3 &p_accel);
diff --git a/main/main.cpp b/main/main.cpp
index ea7d8e075c..e13fb8d3db 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -917,18 +917,19 @@ Error Main::setup2() {
bool boot_logo_scale = GLOBAL_DEF("application/boot_splash_fullsize", true);
GlobalConfig::get_singleton()->set_custom_property_info("application/boot_splash", PropertyInfo(Variant::STRING, "application/boot_splash", PROPERTY_HINT_FILE, "*.png"));
- Image boot_logo;
+ Ref<Image> boot_logo;
boot_logo_path = boot_logo_path.strip_edges();
if (boot_logo_path != String() /*&& FileAccess::exists(boot_logo_path)*/) {
print_line("Boot splash path: " + boot_logo_path);
- Error err = boot_logo.load(boot_logo_path);
+ boot_logo.instance();
+ Error err = boot_logo->load(boot_logo_path);
if (err)
ERR_PRINTS("Non-existing or invalid boot splash at: " + boot_logo_path + ". Loading default splash.");
}
- if (!boot_logo.empty()) {
+ if (boot_logo.is_valid()) {
OS::get_singleton()->_msec_splash = OS::get_singleton()->get_ticks_msec();
Color boot_bg = GLOBAL_DEF("application/boot_bg_color", clear);
VisualServer::get_singleton()->set_boot_image(boot_logo, boot_bg, boot_logo_scale);
@@ -941,7 +942,7 @@ Error Main::setup2() {
#ifndef NO_DEFAULT_BOOT_LOGO
MAIN_PRINT("Main: Create bootsplash");
- Image splash(boot_splash_png);
+ Ref<Image> splash = memnew(Image(boot_splash_png));
MAIN_PRINT("Main: ClearColor");
VisualServer::get_singleton()->set_default_clear_color(boot_splash_bg_color);
@@ -950,7 +951,7 @@ Error Main::setup2() {
#endif
}
- Image icon(app_icon_png);
+ Ref<Image> icon = memnew(Image(app_icon_png));
OS::get_singleton()->set_icon(icon);
}
@@ -1464,8 +1465,8 @@ bool Main::start() {
String iconpath = GLOBAL_DEF("application/icon", "Variant()");
if (iconpath != "") {
- Image icon;
- if (icon.load(iconpath) == OK)
+ Ref<Image> icon;
+ if (icon->load(iconpath) == OK)
OS::get_singleton()->set_icon(icon);
}
}
diff --git a/main/splash.png b/main/splash.png
index 01ca2152ce..894a7d7aba 100644
--- a/main/splash.png
+++ b/main/splash.png
Binary files differ
diff --git a/main/tests/test_containers.cpp b/main/tests/test_containers.cpp
index 890599385a..956be5d169 100644
--- a/main/tests/test_containers.cpp
+++ b/main/tests/test_containers.cpp
@@ -55,18 +55,6 @@ MainLoop *test() {
{
- Image img;
- img.create(default_mouse_cursor_xpm);
-
- {
- for (int i = 0; i < 8; i++) {
-
- Image mipmap;
- //img.make_mipmap(mipmap);
- img = mipmap;
- if (img.get_width() <= 4) break;
- };
- };
};
#if 0
diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp
index aff3bae417..0b120f87d5 100644
--- a/main/tests/test_image.cpp
+++ b/main/tests/test_image.cpp
@@ -41,7 +41,7 @@ class TestMainLoop : public MainLoop {
bool quit;
public:
- virtual void input_event(const InputEvent &p_event) {
+ virtual void input_event(const Ref<InputEvent> &p_event) {
}
virtual void init() {
@@ -63,11 +63,6 @@ public:
MainLoop *test() {
- Image img;
- ImageLoader::load_image("as1.png", &img);
-
- img.resize(512, 512);
-
return memnew(TestMainLoop);
}
}
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index d32756937a..5a233e818e 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -263,18 +263,19 @@ protected:
}
public:
- virtual void input_event(const InputEvent &p_event) {
+ virtual void input_event(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask & 4) {
+ Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid() && mm->get_button_mask() & 4) {
- ofs_y -= p_event.mouse_motion.relative_y / 200.0;
- ofs_x += p_event.mouse_motion.relative_x / 200.0;
+ ofs_y -= mm->get_relative().y / 200.0;
+ ofs_x += mm->get_relative().x / 200.0;
}
- if (p_event.type == InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask & 1) {
+ if (mm.is_valid() && mm->get_button_mask() & 1) {
- float y = -p_event.mouse_motion.relative_y / 20.0;
- float x = p_event.mouse_motion.relative_x / 20.0;
+ float y = -mm->get_relative().y / 20.0;
+ float x = mm->get_relative().x / 20.0;
if (mover.is_valid()) {
@@ -285,19 +286,6 @@ public:
ps->body_set_state(mover, PhysicsServer::BODY_STATE_TRANSFORM, t);
}
}
-
- if (p_event.type == InputEvent::JOYPAD_MOTION) {
-
- if (p_event.joy_motion.axis == 0) {
-
- joy_direction.x = p_event.joy_motion.axis_value;
- };
-
- if (p_event.joy_motion.axis == 1) {
-
- joy_direction.y = p_event.joy_motion.axis_value;
- };
- };
}
virtual void request_quit() {
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 1476e45fcc..5f57275503 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -82,7 +82,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 2, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 2, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_SEGMENT].image = vs->texture_create_from_image(image);
@@ -109,7 +109,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 32, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_CIRCLE].image = vs->texture_create_from_image(image);
@@ -136,7 +136,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 32, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 32, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_RECTANGLE].image = vs->texture_create_from_image(image);
@@ -164,7 +164,7 @@ class TestPhysics2DMainLoop : public MainLoop {
}
}
- Image image(32, 64, 0, Image::FORMAT_LA8, pixels);
+ Ref<Image> image = memnew(Image(32, 64, 0, Image::FORMAT_LA8, pixels));
body_shape_data[Physics2DServer::SHAPE_CAPSULE].image = vs->texture_create_from_image(image);
@@ -178,7 +178,7 @@ class TestPhysics2DMainLoop : public MainLoop {
{
- Image image(convex_png);
+ Ref<Image> image = memnew(Image(convex_png));
body_shape_data[Physics2DServer::SHAPE_CONVEX_POLYGON].image = vs->texture_create_from_image(image);
@@ -208,35 +208,36 @@ class TestPhysics2DMainLoop : public MainLoop {
}
protected:
- void input_event(const InputEvent &p_event) {
+ void input_event(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb = p_event;
- const InputEventMouseButton &mb = p_event.mouse_button;
+ if (mb.is_valid()) {
- if (mb.pressed) {
+ if (mb->is_pressed()) {
- Point2 p(mb.x, mb.y);
+ Point2 p(mb->get_pos().x, mb->get_pos().y);
- if (mb.button_index == 1) {
+ if (mb->get_button_index() == 1) {
ray_to = p;
_do_ray_query();
- } else if (mb.button_index == 2) {
+ } else if (mb->get_button_index() == 2) {
ray_from = p;
_do_ray_query();
}
}
}
- if (p_event.type == InputEvent::MOUSE_MOTION) {
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ Ref<InputEventMouseMotion> mm = p_event;
- Point2 p(mm.x, mm.y);
+ if (mm.is_valid()) {
- if (mm.button_mask & BUTTON_MASK_LEFT) {
+ Point2 p = mm->get_pos();
+
+ if (mm->get_button_mask() & BUTTON_MASK_LEFT) {
ray_to = p;
_do_ray_query();
- } else if (mm.button_mask & BUTTON_MASK_RIGHT) {
+ } else if (mm->get_button_mask() & BUTTON_MASK_RIGHT) {
ray_from = p;
_do_ray_query();
}
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index 89bd5db60f..74f7453d1b 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -64,9 +64,9 @@ class TestMainLoop : public MainLoop {
protected:
public:
- virtual void input_event(const InputEvent &p_event) {
+ virtual void input_event(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && p_event.key.pressed)
+ if (p_event->is_pressed())
quit = true;
}
diff --git a/methods.py b/methods.py
index cad87ad775..5af6c6aed0 100644
--- a/methods.py
+++ b/methods.py
@@ -1594,34 +1594,69 @@ def detect_visual_c_compiler_version(tools_env):
vc_chosen_compiler_index = -1
vc_chosen_compiler_str = ""
- # find() works with -1 so big ifs bellow are needed... the simplest solution, in fact
- # First test if amd64 and amd64_x86 compilers are present in the path
- vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64;")
- if(vc_amd64_compiler_detection_index > -1):
- vc_chosen_compiler_index = vc_amd64_compiler_detection_index
- vc_chosen_compiler_str = "amd64"
-
- vc_amd64_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64_x86;")
- if(vc_amd64_x86_compiler_detection_index > -1
- and (vc_chosen_compiler_index == -1
- or vc_chosen_compiler_index > vc_amd64_x86_compiler_detection_index)):
- vc_chosen_compiler_index = vc_amd64_x86_compiler_detection_index
- vc_chosen_compiler_str = "amd64_x86"
-
- # Now check the 32 bit compilers
- vc_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN;")
- if(vc_x86_compiler_detection_index > -1
- and (vc_chosen_compiler_index == -1
- or vc_chosen_compiler_index > vc_x86_compiler_detection_index)):
- vc_chosen_compiler_index = vc_x86_compiler_detection_index
- vc_chosen_compiler_str = "x86"
-
- vc_x86_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env['VCINSTALLDIR'] + "BIN\\x86_amd64;")
- if(vc_x86_amd64_compiler_detection_index > -1
- and (vc_chosen_compiler_index == -1
- or vc_chosen_compiler_index > vc_x86_amd64_compiler_detection_index)):
- vc_chosen_compiler_index = vc_x86_amd64_compiler_detection_index
- vc_chosen_compiler_str = "x86_amd64"
+ # Start with Pre VS 2017 checks which uses VCINSTALLDIR:
+ if 'VCINSTALLDIR' in tools_env:
+ # print "Checking VCINSTALLDIR"
+
+ # find() works with -1 so big ifs bellow are needed... the simplest solution, in fact
+ # First test if amd64 and amd64_x86 compilers are present in the path
+ vc_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64;")
+ if(vc_amd64_compiler_detection_index > -1):
+ vc_chosen_compiler_index = vc_amd64_compiler_detection_index
+ vc_chosen_compiler_str = "amd64"
+
+ vc_amd64_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN\\amd64_x86;")
+ if(vc_amd64_x86_compiler_detection_index > -1
+ and (vc_chosen_compiler_index == -1
+ or vc_chosen_compiler_index > vc_amd64_x86_compiler_detection_index)):
+ vc_chosen_compiler_index = vc_amd64_x86_compiler_detection_index
+ vc_chosen_compiler_str = "amd64_x86"
+
+ # Now check the 32 bit compilers
+ vc_x86_compiler_detection_index = tools_env["PATH"].find(tools_env["VCINSTALLDIR"] + "BIN;")
+ if(vc_x86_compiler_detection_index > -1
+ and (vc_chosen_compiler_index == -1
+ or vc_chosen_compiler_index > vc_x86_compiler_detection_index)):
+ vc_chosen_compiler_index = vc_x86_compiler_detection_index
+ vc_chosen_compiler_str = "x86"
+
+ vc_x86_amd64_compiler_detection_index = tools_env["PATH"].find(tools_env['VCINSTALLDIR'] + "BIN\\x86_amd64;")
+ if(vc_x86_amd64_compiler_detection_index > -1
+ and (vc_chosen_compiler_index == -1
+ or vc_chosen_compiler_index > vc_x86_amd64_compiler_detection_index)):
+ vc_chosen_compiler_index = vc_x86_amd64_compiler_detection_index
+ vc_chosen_compiler_str = "x86_amd64"
+
+ # and for VS 2017 and newer we check VCTOOLSINSTALLDIR:
+ if 'VCTOOLSINSTALLDIR' in tools_env:
+ # print "Checking VCTOOLSINSTALLDIR"
+
+ # Newer versions have a different path available
+ vc_amd64_compiler_detection_index = tools_env["PATH"].upper().find(tools_env['VCTOOLSINSTALLDIR'].upper() + "BIN\\HOSTX64\\X64;")
+ if(vc_amd64_compiler_detection_index > -1):
+ vc_chosen_compiler_index = vc_amd64_compiler_detection_index
+ vc_chosen_compiler_str = "amd64"
+
+ vc_amd64_x86_compiler_detection_index = tools_env["PATH"].upper().find(tools_env['VCTOOLSINSTALLDIR'].upper() + "BIN\\HOSTX64\\X86;")
+ if(vc_amd64_x86_compiler_detection_index > -1
+ and (vc_chosen_compiler_index == -1
+ or vc_chosen_compiler_index > vc_amd64_x86_compiler_detection_index)):
+ vc_chosen_compiler_index = vc_amd64_x86_compiler_detection_index
+ vc_chosen_compiler_str = "amd64_x86"
+
+ vc_x86_compiler_detection_index = tools_env["PATH"].upper().find(tools_env['VCTOOLSINSTALLDIR'].upper() + "BIN\\HOSTX86\\X86;")
+ if(vc_x86_compiler_detection_index > -1
+ and (vc_chosen_compiler_index == -1
+ or vc_chosen_compiler_index > vc_x86_compiler_detection_index)):
+ vc_chosen_compiler_index = vc_x86_compiler_detection_index
+ vc_chosen_compiler_str = "x86"
+
+ vc_x86_amd64_compiler_detection_index = tools_env["PATH"].upper().find(tools_env['VCTOOLSINSTALLDIR'].upper() + "BIN\\HOSTX86\\X64;")
+ if(vc_x86_amd64_compiler_detection_index > -1
+ and (vc_chosen_compiler_index == -1
+ or vc_chosen_compiler_index > vc_x86_amd64_compiler_detection_index)):
+ vc_chosen_compiler_index = vc_x86_amd64_compiler_detection_index
+ vc_chosen_compiler_str = "x86_amd64"
# debug help
# print vc_amd64_compiler_detection_index
diff --git a/misc/dist/project_icon.svg b/misc/dist/project_icon.svg
new file mode 100644
index 0000000000..650c71fd12
--- /dev/null
+++ b/misc/dist/project_icon.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg3030"
+ version="1.1"
+ inkscape:version="0.92.1 r15371"
+ sodipodi:docname="icon_default_project_icon.svg"
+ inkscape:export-filename="/home/akien/Projects/godot/godot.git/icon3.png"
+ inkscape:export-xdpi="6"
+ inkscape:export-ydpi="6">
+ <defs
+ id="defs3032" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.5"
+ inkscape:cx="601.35476"
+ inkscape:cy="346.09731"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata3035">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-98.519719)">
+ <rect
+ style="fill:#1e1a21;fill-opacity:1;stroke:#2e2832;stroke-width:16;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect33"
+ width="1008"
+ height="1008"
+ x="8"
+ y="106.51972"
+ rx="176.28572"
+ ry="176.28572" />
+ <g
+ id="g82-3"
+ transform="matrix(4.2343801,0,0,-4.2343764,97.676491,522.86238)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 v -47.514 -6.035 -5.492 c 0.108,-0.001 0.216,-0.005 0.323,-0.015 l 36.196,-3.49 c 1.896,-0.183 3.382,-1.709 3.514,-3.609 l 1.116,-15.978 31.574,-2.253 2.175,14.747 c 0.282,1.912 1.922,3.329 3.856,3.329 h 38.188 c 1.933,0 3.573,-1.417 3.855,-3.329 l 2.175,-14.747 31.575,2.253 1.115,15.978 c 0.133,1.9 1.618,3.425 3.514,3.609 l 36.182,3.49 c 0.107,0.01 0.214,0.014 0.322,0.015 v 4.711 l 0.015,0.005 V 0 h 0.134 c 4.795,6.12 9.232,12.569 13.487,19.449 -5.651,9.62 -12.575,18.217 -19.976,26.182 -6.864,-3.455 -13.531,-7.369 -19.828,-11.534 -3.151,3.132 -6.7,5.694 -10.186,8.372 -3.425,2.751 -7.285,4.768 -10.946,7.118 1.09,8.117 1.629,16.108 1.846,24.448 -9.446,4.754 -19.519,7.906 -29.708,10.17 -4.068,-6.837 -7.788,-14.241 -11.028,-21.479 -3.842,0.642 -7.702,0.88 -11.567,0.926 v 0.006 c -0.027,0 -0.052,-0.006 -0.075,-0.006 -0.024,0 -0.049,0.006 -0.073,0.006 V 63.652 C 93.903,63.606 90.046,63.368 86.203,62.726 82.965,69.964 79.247,77.368 75.173,84.205 64.989,81.941 54.915,78.789 45.47,74.035 45.686,65.695 46.225,57.704 47.318,49.587 43.65,47.237 39.795,45.22 36.369,42.469 32.888,39.791 29.333,37.229 26.181,34.097 19.884,38.262 13.219,42.176 6.353,45.631 -1.048,37.666 -7.968,29.069 -13.621,19.449 -9.368,12.569 -4.928,6.12 -0.134,0 Z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path84-6"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g86-7"
+ transform="matrix(4.2343801,0,0,-4.2343764,788.7623,819.22103)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 -1.121,-16.063 c -0.135,-1.936 -1.675,-3.477 -3.611,-3.616 l -38.555,-2.751 c -0.094,-0.007 -0.188,-0.01 -0.281,-0.01 -1.916,0 -3.569,1.406 -3.852,3.33 l -2.211,14.994 H -81.09 l -2.211,-14.994 c -0.297,-2.018 -2.101,-3.469 -4.133,-3.32 l -38.555,2.751 c -1.936,0.139 -3.476,1.68 -3.611,3.616 L -130.721,0 -163.268,3.138 c 0.015,-3.498 0.06,-7.33 0.06,-8.093 0,-34.374 43.605,-50.896 97.781,-51.086 h 0.066 0.067 c 54.176,0.19 97.766,16.712 97.766,51.086 0,0.777 0.047,4.593 0.063,8.093 z"
+ style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path88-5"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g90-3"
+ transform="matrix(4.2343801,0,0,-4.2343764,387.09785,624.34645)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 c 0,-12.052 -9.765,-21.815 -21.813,-21.815 -12.042,0 -21.81,9.763 -21.81,21.815 0,12.044 9.768,21.802 21.81,21.802 C -9.765,21.802 0,12.044 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path92-5"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g94-6"
+ transform="matrix(4.2343801,0,0,-4.2343764,364.87318,629.82505)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 c 0,-7.994 -6.479,-14.473 -14.479,-14.473 -7.996,0 -14.479,6.479 -14.479,14.473 0,7.994 6.483,14.479 14.479,14.479 C -6.479,14.479 0,7.994 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path96-2"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g98-9"
+ transform="matrix(4.2343801,0,0,-4.2343764,511.99324,725.12292)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 c -3.878,0 -7.021,2.858 -7.021,6.381 v 20.081 c 0,3.52 3.143,6.381 7.021,6.381 3.878,0 7.028,-2.861 7.028,-6.381 V 6.381 C 7.028,2.858 3.878,0 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path100-1"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g102-2"
+ transform="matrix(4.2343801,0,0,-4.2343764,636.90407,624.34645)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 c 0,-12.052 9.765,-21.815 21.815,-21.815 12.041,0 21.808,9.763 21.808,21.815 0,12.044 -9.767,21.802 -21.808,21.802 C 9.765,21.802 0,12.044 0,0"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path104-7"
+ inkscape:connector-curvature="0" />
+ </g>
+ <g
+ id="g106-0"
+ transform="matrix(4.2343801,0,0,-4.2343764,659.13434,629.82505)"
+ style="stroke-width:0.31488276">
+ <path
+ d="m 0,0 c 0,-7.994 6.477,-14.473 14.471,-14.473 8.002,0 14.479,6.479 14.479,14.473 0,7.994 -6.477,14.479 -14.479,14.479 C 6.477,14.479 0,7.994 0,0"
+ style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.31488276"
+ id="path108-9"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+</svg>
diff --git a/misc/scripts/svgs_2_pngs.py b/misc/scripts/svgs_2_pngs.py
index 0459f63bfa..b24324dcd7 100644
--- a/misc/scripts/svgs_2_pngs.py
+++ b/misc/scripts/svgs_2_pngs.py
@@ -16,7 +16,7 @@ last_svg_data = None
SCRIPT_FOLDER = dirname(realpath(__file__)) + '/'
theme_dir_base = SCRIPT_FOLDER + '../../scene/resources/default_theme/'
theme_dir_source = theme_dir_base + 'source/'
-icons_dir_base = SCRIPT_FOLDER + '../../editor/icons/'
+icons_dir_base = SCRIPT_FOLDER + '../editor/icons/'
icons_dir_2x = icons_dir_base + '2x/'
icons_dir_source = icons_dir_base + 'source/'
@@ -54,14 +54,14 @@ def export_icons():
out_icon_names = [name_only] # export to a png with the same file name
theme_out_icon_names = []
# special cases
- if special_icons.get(name_only):
+ if special_icons.has_key(name_only):
special_icon = special_icons[name_only]
if type(special_icon) is dict:
if special_icon.get('avoid_self'):
out_icon_names = []
- if special_icon.get('output_names'):
+ if special_icon.has_key('output_names'):
out_icon_names += special_icon['output_names']
- if special_icon.get('theme_output_names'):
+ if special_icon.has_key('theme_output_names'):
theme_out_icon_names += special_icon['theme_output_names']
source_path = '%s%s.svg' % (svgs_path, name_only)
@@ -83,10 +83,10 @@ def export_theme():
out_icon_names = [name_only] # export to a png with the same file name
# special cases
- if theme_icons.get(name_only):
+ if theme_icons.has_key(name_only):
special_icon = theme_icons[name_only]
if type(special_icon) is dict:
- if special_icon.get('output_names'):
+ if special_icon.has_key('output_names'):
out_icon_names += special_icon['output_names']
source_path = '%s%s.svg' % (svgs_path, name_only)
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index d79b7685d1..4448c80387 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -441,7 +441,7 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
wb = PoolVector<uint8_t>::Write();
}
- Image img(width, height, mipmaps - 1, info.format, src_data);
+ Ref<Image> img = memnew(Image(width, height, mipmaps - 1, info.format, src_data));
Ref<ImageTexture> texture = memnew(ImageTexture);
texture->create_from_image(img);
diff --git a/modules/etc1/image_etc.cpp b/modules/etc1/image_etc.cpp
index 60544594f6..121f50684d 100644
--- a/modules/etc1/image_etc.cpp
+++ b/modules/etc1/image_etc.cpp
@@ -88,25 +88,26 @@ static void _decompress_etc(Image *p_img) {
r = PoolVector<uint8_t>::Read();
//print_line("Re Creating ETC into regular image: w "+itos(p_img->get_width())+" h "+itos(p_img->get_height())+" mm "+itos(p_img->get_mipmaps()));
- *p_img = Image(p_img->get_width(), p_img->get_height(), p_img->has_mipmaps(), Image::FORMAT_RGB8, dst);
- if (p_img->has_mipmaps())
+ bool needs_mipmaps = p_img->has_mipmaps();
+ p_img->create(p_img->get_width(), p_img->get_height(), p_img->has_mipmaps(), Image::FORMAT_RGB8, dst);
+ if (needs_mipmaps)
p_img->generate_mipmaps();
}
static void _compress_etc(Image *p_img) {
- Image img = *p_img;
+ Ref<Image> img = p_img->duplicate();
- int imgw = img.get_width(), imgh = img.get_height();
+ int imgw = img->get_width(), imgh = img->get_height();
ERR_FAIL_COND(nearest_power_of_2(imgw) != imgw || nearest_power_of_2(imgh) != imgh);
- if (img.get_format() != Image::FORMAT_RGB8)
- img.convert(Image::FORMAT_RGB8);
+ if (img->get_format() != Image::FORMAT_RGB8)
+ img->convert(Image::FORMAT_RGB8);
PoolVector<uint8_t> res_data;
PoolVector<uint8_t> dst_data;
- PoolVector<uint8_t>::Read r = img.get_data().read();
+ PoolVector<uint8_t>::Read r = img->get_data().read();
int target_size = Image::get_image_data_size(p_img->get_width(), p_img->get_height(), Image::FORMAT_ETC, p_img->has_mipmaps() ? -1 : 0);
int mmc = p_img->has_mipmaps() ? Image::get_image_required_mipmaps(p_img->get_width(), p_img->get_height(), Image::FORMAT_ETC) : 0;
@@ -122,7 +123,7 @@ static void _compress_etc(Image *p_img) {
int bw = MAX(imgw / 4, 1);
int bh = MAX(imgh / 4, 1);
- const uint8_t *src = &r[img.get_mipmap_offset(i)];
+ const uint8_t *src = &r[img->get_mipmap_offset(i)];
int mmsize = MAX(bw, 1) * MAX(bh, 1) * 8;
uint8_t *dst = &w[ofs];
@@ -171,7 +172,7 @@ static void _compress_etc(Image *p_img) {
mc++;
}
- *p_img = Image(p_img->get_width(), p_img->get_height(), (mc - 1) ? true : false, Image::FORMAT_ETC, dst_data);
+ p_img->create(p_img->get_width(), p_img->get_height(), (mc - 1) ? true : false, Image::FORMAT_ETC, dst_data);
}
void _register_etc1_compress_func() {
diff --git a/modules/etc1/texture_loader_pkm.cpp b/modules/etc1/texture_loader_pkm.cpp
index 9817de3a0f..c04528d2a0 100644
--- a/modules/etc1/texture_loader_pkm.cpp
+++ b/modules/etc1/texture_loader_pkm.cpp
@@ -85,7 +85,7 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path,
int width = h.origWidth;
int height = h.origHeight;
- Image img(width, height, mipmaps, Image::FORMAT_ETC, src_data);
+ Ref<Image> img = memnew(Image(width, height, mipmaps, Image::FORMAT_ETC, src_data));
Ref<ImageTexture> texture = memnew(ImageTexture);
texture->create_from_image(img);
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 27e0c3788b..6716b684a0 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -40,7 +40,7 @@
#include "godot.h"
-class GDNativeScriptData;
+struct GDNativeScriptData;
class GDNativeLibrary;
struct NativeLibrary {
@@ -127,8 +127,6 @@ struct GDNativeScriptData {
}
};
-class GDNativeLibrary;
-
class GDNativeScript : public Script {
GDCLASS(GDNativeScript, Script);
@@ -208,7 +206,7 @@ class GDNativeLibrary : public Resource {
protected:
friend class GDNativeScript;
- friend class NativeLibrary;
+ friend struct NativeLibrary;
friend class GDNativeReloadNode;
GDNativeScriptData *get_script_data(const StringName p_name);
diff --git a/modules/gdnative/godot.cpp b/modules/gdnative/godot.cpp
index bc53eb93f4..4dbb72bba1 100644
--- a/modules/gdnative/godot.cpp
+++ b/modules/gdnative/godot.cpp
@@ -51,10 +51,8 @@ extern "C" void _basis_api_anchor();
extern "C" void _rect3_api_anchor();
extern "C" void _transform_api_anchor();
extern "C" void _color_api_anchor();
-extern "C" void _image_api_anchor();
extern "C" void _node_path_api_anchor();
extern "C" void _rid_api_anchor();
-extern "C" void _input_event_api_anchor();
extern "C" void _dictionary_api_anchor();
extern "C" void _array_api_anchor();
extern "C" void _pool_arrays_api_anchor();
@@ -73,10 +71,8 @@ void _api_anchor() {
_basis_api_anchor();
_transform_api_anchor();
_color_api_anchor();
- _image_api_anchor();
_node_path_api_anchor();
_rid_api_anchor();
- _input_event_api_anchor();
_dictionary_api_anchor();
_array_api_anchor();
_pool_arrays_api_anchor();
diff --git a/modules/gdnative/godot.h b/modules/gdnative/godot.h
index 7214ce62df..726bde0b65 100644
--- a/modules/gdnative/godot.h
+++ b/modules/gdnative/godot.h
@@ -139,6 +139,31 @@ typedef float godot_real;
/////// Object (forward declared)
typedef void godot_object;
+/////// Brute force forward declarations for the rest
+typedef struct godot_variant godot_variant;
+typedef struct godot_string godot_string;
+typedef struct godot_vector2 godot_vector2;
+typedef struct godot_rect2 godot_rect2;
+typedef struct godot_vector3 godot_vector3;
+typedef struct godot_transform2d godot_transform2d;
+typedef struct godot_plane godot_plane;
+typedef struct godot_quat godot_quat;
+typedef struct godot_rect3 godot_rect3;
+typedef struct godot_basis godot_basis;
+typedef struct godot_transform godot_transform;
+typedef struct godot_color godot_color;
+typedef struct godot_node_path godot_node_path;
+typedef struct godot_rid godot_rid;
+typedef struct godot_dictionary godot_dictionary;
+typedef struct godot_array godot_array;
+typedef struct godot_pool_byte_array godot_pool_byte_array;
+typedef struct godot_pool_int_array godot_pool_int_array;
+typedef struct godot_pool_real_array godot_pool_real_array;
+typedef struct godot_pool_string_array godot_pool_string_array;
+typedef struct godot_pool_vector2_array godot_pool_vector2_array;
+typedef struct godot_pool_vector3_array godot_pool_vector3_array;
+typedef struct godot_pool_color_array godot_pool_color_array;
+
/////// String
#include "godot/godot_string.h"
@@ -183,10 +208,6 @@ typedef void godot_object;
#include "godot/godot_color.h"
-/////// Image
-
-#include "godot/godot_image.h"
-
/////// NodePath
#include "godot/godot_node_path.h"
@@ -195,10 +216,6 @@ typedef void godot_object;
#include "godot/godot_rid.h"
-/////// InputEvent
-
-#include "godot/godot_input_event.h"
-
/////// Dictionary
#include "godot/godot_dictionary.h"
diff --git a/modules/gdnative/godot/godot_array.cpp b/modules/gdnative/godot/godot_array.cpp
index 6c55c5d048..bf2ef35972 100644
--- a/modules/gdnative/godot/godot_array.cpp
+++ b/modules/gdnative/godot/godot_array.cpp
@@ -139,7 +139,7 @@ void GDAPI godot_array_set(godot_array *p_arr, const godot_int p_idx, const godo
a->operator[](p_idx) = *val;
}
-godot_variant GDAPI *godot_array_get(godot_array *p_arr, const godot_int p_idx) {
+godot_variant GDAPI *godot_array_get(const godot_array *p_arr, const godot_int p_idx) {
Array *a = (Array *)p_arr;
return (godot_variant *)&a->operator[](p_idx);
}
@@ -155,25 +155,25 @@ void GDAPI godot_array_clear(godot_array *p_arr) {
a->clear();
}
-godot_int GDAPI godot_array_count(godot_array *p_arr, const godot_variant *p_value) {
- Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_value;
+godot_int GDAPI godot_array_count(const godot_array *p_arr, const godot_variant *p_value) {
+ const Array *a = (const Array *)p_arr;
+ const Variant *val = (const Variant *)p_value;
return a->count(*val);
}
godot_bool GDAPI godot_array_empty(const godot_array *p_arr) {
- Array *a = (Array *)p_arr;
+ const Array *a = (const Array *)p_arr;
return a->empty();
}
void GDAPI godot_array_erase(godot_array *p_arr, const godot_variant *p_value) {
Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_value;
+ const Variant *val = (const Variant *)p_value;
a->erase(*val);
}
godot_variant GDAPI godot_array_front(const godot_array *p_arr) {
- Array *a = (Array *)p_arr;
+ const Array *a = (const Array *)p_arr;
godot_variant v;
Variant *val = (Variant *)&v;
memnew_placement(val, Variant);
@@ -182,7 +182,7 @@ godot_variant GDAPI godot_array_front(const godot_array *p_arr) {
}
godot_variant GDAPI godot_array_back(const godot_array *p_arr) {
- Array *a = (Array *)p_arr;
+ const Array *a = (const Array *)p_arr;
godot_variant v;
Variant *val = (Variant *)&v;
memnew_placement(val, Variant);
@@ -191,31 +191,31 @@ godot_variant GDAPI godot_array_back(const godot_array *p_arr) {
}
godot_int GDAPI godot_array_find(const godot_array *p_arr, const godot_variant *p_what, const godot_int p_from) {
- Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_what;
+ const Array *a = (const Array *)p_arr;
+ const Variant *val = (const Variant *)p_what;
return a->find(*val, p_from);
}
godot_int GDAPI godot_array_find_last(const godot_array *p_arr, const godot_variant *p_what) {
- Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_what;
+ const Array *a = (const Array *)p_arr;
+ const Variant *val = (const Variant *)p_what;
return a->find_last(*val);
}
godot_bool GDAPI godot_array_has(const godot_array *p_arr, const godot_variant *p_value) {
- Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_value;
+ const Array *a = (const Array *)p_arr;
+ const Variant *val = (const Variant *)p_value;
return a->has(*val);
}
uint32_t GDAPI godot_array_hash(const godot_array *p_arr) {
- Array *a = (Array *)p_arr;
+ const Array *a = (const Array *)p_arr;
return a->hash();
}
void GDAPI godot_array_insert(godot_array *p_arr, const godot_int p_pos, const godot_variant *p_value) {
Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_value;
+ const Variant *val = (const Variant *)p_value;
a->insert(p_pos, *val);
}
@@ -224,11 +224,6 @@ void GDAPI godot_array_invert(godot_array *p_arr) {
a->invert();
}
-godot_bool GDAPI godot_array_is_shared(const godot_array *p_arr) {
- Array *a = (Array *)p_arr;
- return false; // @Todo how do I do it?
-}
-
godot_variant GDAPI godot_array_pop_back(godot_array *p_arr) {
Array *a = (Array *)p_arr;
godot_variant v;
@@ -249,13 +244,13 @@ godot_variant GDAPI godot_array_pop_front(godot_array *p_arr) {
void GDAPI godot_array_push_back(godot_array *p_arr, const godot_variant *p_value) {
Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_value;
+ const Variant *val = (const Variant *)p_value;
a->push_back(*val);
}
void GDAPI godot_array_push_front(godot_array *p_arr, const godot_variant *p_value) {
Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_value;
+ const Variant *val = (const Variant *)p_value;
a->push_front(*val);
}
@@ -270,13 +265,13 @@ void GDAPI godot_array_resize(godot_array *p_arr, const godot_int p_size) {
}
godot_int GDAPI godot_array_rfind(const godot_array *p_arr, const godot_variant *p_what, const godot_int p_from) {
- Array *a = (Array *)p_arr;
- Variant *val = (Variant *)p_what;
+ const Array *a = (const Array *)p_arr;
+ const Variant *val = (const Variant *)p_what;
return a->rfind(*val, p_from);
}
godot_int GDAPI godot_array_size(const godot_array *p_arr) {
- Array *a = (Array *)p_arr;
+ const Array *a = (const Array *)p_arr;
return a->size();
}
@@ -287,7 +282,7 @@ void GDAPI godot_array_sort(godot_array *p_arr) {
void GDAPI godot_array_sort_custom(godot_array *p_arr, godot_object *p_obj, const godot_string *p_func) {
Array *a = (Array *)p_arr;
- String *func = (String *)p_func;
+ const String *func = (const String *)p_func;
a->sort_custom((Object *)p_obj, *func);
}
diff --git a/modules/gdnative/godot/godot_array.h b/modules/gdnative/godot/godot_array.h
index b92ebb834f..f7150950fc 100644
--- a/modules/gdnative/godot/godot_array.h
+++ b/modules/gdnative/godot/godot_array.h
@@ -43,11 +43,11 @@ typedef struct godot_array {
} godot_array;
#endif
-#include "../godot.h"
-
#include "godot_pool_arrays.h"
#include "godot_variant.h"
+#include "../godot.h"
+
void GDAPI godot_array_new(godot_array *p_arr);
void GDAPI godot_array_new_pool_color_array(godot_array *p_arr, const godot_pool_color_array *p_pca);
void GDAPI godot_array_new_pool_vector3_array(godot_array *p_arr, const godot_pool_vector3_array *p_pv3a);
@@ -59,13 +59,13 @@ void GDAPI godot_array_new_pool_byte_array(godot_array *p_arr, const godot_pool_
void GDAPI godot_array_set(godot_array *p_arr, const godot_int p_idx, const godot_variant *p_value);
-godot_variant GDAPI *godot_array_get(godot_array *p_arr, const godot_int p_idx);
+godot_variant GDAPI *godot_array_get(const godot_array *p_arr, const godot_int p_idx);
void GDAPI godot_array_append(godot_array *p_arr, const godot_variant *p_value);
void GDAPI godot_array_clear(godot_array *p_arr);
-godot_int GDAPI godot_array_count(godot_array *p_arr, const godot_variant *p_value);
+godot_int GDAPI godot_array_count(const godot_array *p_arr, const godot_variant *p_value);
godot_bool GDAPI godot_array_empty(const godot_array *p_arr);
@@ -87,8 +87,6 @@ void GDAPI godot_array_insert(godot_array *p_arr, const godot_int p_pos, const g
void GDAPI godot_array_invert(godot_array *p_arr);
-godot_bool GDAPI godot_array_is_shared(const godot_array *p_arr);
-
godot_variant GDAPI godot_array_pop_back(godot_array *p_arr);
godot_variant GDAPI godot_array_pop_front(godot_array *p_arr);
diff --git a/modules/gdnative/godot/godot_basis.cpp b/modules/gdnative/godot/godot_basis.cpp
index 474cd3d448..46464932c5 100644
--- a/modules/gdnative/godot/godot_basis.cpp
+++ b/modules/gdnative/godot/godot_basis.cpp
@@ -28,188 +28,245 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_basis.h"
+#include "core/variant.h"
-#include "math/matrix3.h"
+#include "core/math/matrix3.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _basis_api_anchor() {
+void _basis_api_anchor() {}
+
+void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis) {
+ const Vector3 *x_axis = (const Vector3 *)p_x_axis;
+ const Vector3 *y_axis = (const Vector3 *)p_y_axis;
+ const Vector3 *z_axis = (const Vector3 *)p_z_axis;
+ Basis *dest = (Basis *)r_dest;
+ *dest = Basis(*x_axis, *y_axis, *z_axis);
}
-void GDAPI godot_basis_new(godot_basis *p_v) {
- Basis *v = (Basis *)p_v;
- *v = Basis();
+void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi) {
+ const Vector3 *axis = (const Vector3 *)p_axis;
+ Basis *dest = (Basis *)r_dest;
+ *dest = Basis(*axis, p_phi);
}
-void GDAPI godot_basis_new_with_euler_quat(godot_basis *p_v, const godot_quat *p_euler) {
- Basis *v = (Basis *)p_v;
- Quat *euler = (Quat *)p_euler;
- *v = Basis(*euler);
+void GDAPI godot_basis_new_with_euler(godot_basis *r_dest, const godot_vector3 *p_euler) {
+ const Vector3 *euler = (const Vector3 *)p_euler;
+ Basis *dest = (Basis *)r_dest;
+ *dest = Basis(*euler);
}
-void GDAPI godot_basis_new_with_euler(godot_basis *p_v, const godot_vector3 p_euler) {
- Basis *v = (Basis *)p_v;
- Vector3 *euler = (Vector3 *)&p_euler;
- *v = Basis(*euler);
+godot_string GDAPI godot_basis_as_string(const godot_basis *p_self) {
+ godot_string ret;
+ const Basis *self = (const Basis *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *p_v, const godot_vector3 p_axis, const godot_real p_phi) {
- Basis *v = (Basis *)p_v;
- const Vector3 *axis = (Vector3 *)&p_axis;
- *v = Basis(*axis, p_phi);
+godot_basis GDAPI godot_basis_inverse(const godot_basis *p_self) {
+ godot_basis dest;
+ const Basis *self = (const Basis *)p_self;
+ *((Basis *)&dest) = self->inverse();
+ return dest;
}
-void GDAPI godot_basis_new_with_rows(godot_basis *p_v, const godot_vector3 p_row0, const godot_vector3 p_row1, const godot_vector3 p_row2) {
- Basis *v = (Basis *)p_v;
- const Vector3 *row0 = (Vector3 *)&p_row0;
- const Vector3 *row1 = (Vector3 *)&p_row1;
- const Vector3 *row2 = (Vector3 *)&p_row2;
- *v = Basis(*row0, *row1, *row2);
+godot_basis GDAPI godot_basis_transposed(const godot_basis *p_self) {
+ godot_basis dest;
+ const Basis *self = (const Basis *)p_self;
+ *((Basis *)&dest) = self->transposed();
+ return dest;
}
-godot_quat GDAPI godot_basis_as_quat(const godot_basis *p_v) {
- const Basis *v = (const Basis *)p_v;
- godot_quat quat;
- Quat *p_quat = (Quat *)&quat;
- *p_quat = v->operator Quat();
- return quat;
+godot_basis GDAPI godot_basis_orthonormalized(const godot_basis *p_self) {
+ godot_basis dest;
+ const Basis *self = (const Basis *)p_self;
+ *((Basis *)&dest) = self->orthonormalized();
+ return dest;
}
-/*
- * p_elements is a pointer to an array of 3 (!!) vector3
- */
-void GDAPI godot_basis_get_elements(godot_basis *p_v, godot_vector3 *p_elements) {
- Basis *v = (Basis *)p_v;
- Vector3 *elements = (Vector3 *)p_elements;
- elements[0] = v->elements[0];
- elements[1] = v->elements[1];
- elements[2] = v->elements[2];
+godot_real GDAPI godot_basis_determinant(const godot_basis *p_self) {
+ const Basis *self = (const Basis *)p_self;
+ return self->determinant();
}
-godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_v, const godot_int p_axis) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Basis *v = (Basis *)p_v;
- *d = v->get_axis(p_axis);
+godot_basis GDAPI godot_basis_rotated(const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi) {
+ godot_basis dest;
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *axis = (const Vector3 *)p_axis;
+ *((Basis *)&dest) = self->rotated(*axis, p_phi);
return dest;
}
-void GDAPI godot_basis_set_axis(godot_basis *p_v, const godot_int p_axis, const godot_vector3 p_value) {
- Basis *v = (Basis *)p_v;
- const Vector3 *value = (Vector3 *)&p_value;
- v->set_axis(p_axis, *value);
+godot_basis GDAPI godot_basis_scaled(const godot_basis *p_self, const godot_vector3 *p_scale) {
+ godot_basis dest;
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *scale = (const Vector3 *)p_scale;
+ *((Basis *)&dest) = self->scaled(*scale);
+ return dest;
}
-godot_vector3 GDAPI godot_basis_get_row(const godot_basis *p_v, const godot_int p_row) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Basis *v = (Basis *)p_v;
- *d = v->get_row(p_row);
- return dest;
+void GDAPI godot_basis_set_scale(godot_basis *p_self, const godot_vector3 *p_scale) {
+ Basis *self = (Basis *)p_self;
+ const Vector3 *scale = (const Vector3 *)p_scale;
+ self->set_scale(*scale);
}
-void GDAPI godot_basis_set_row(godot_basis *p_v, const godot_int p_row, const godot_vector3 p_value) {
- Basis *v = (Basis *)p_v;
- const Vector3 *value = (Vector3 *)&p_value;
- v->set_row(p_row, *value);
+void GDAPI godot_basis_set_rotation_euler(godot_basis *p_self, const godot_vector3 *p_euler) {
+ Basis *self = (Basis *)p_self;
+ const Vector3 *euler = (const Vector3 *)p_euler;
+ self->set_rotation_euler(*euler);
}
-godot_real godot_basis_determinant(const godot_basis *p_v) {
- Basis *v = (Basis *)p_v;
- return v->determinant();
+void GDAPI godot_basis_set_rotation_axis_angle(godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_angle) {
+ Basis *self = (Basis *)p_self;
+ const Vector3 *axis = (const Vector3 *)p_axis;
+ self->set_rotation_axis_angle(*axis, p_angle);
}
-godot_vector3 godot_basis_get_euler(const godot_basis *p_v) {
+godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Basis *v = (Basis *)p_v;
- *d = v->get_euler();
+ const Basis *self = (const Basis *)p_self;
+ *((Vector3 *)&dest) = self->get_scale();
return dest;
}
-godot_int godot_basis_get_orthogonal_index(const godot_basis *p_v) {
- const Basis *v = (Basis *)p_v;
- return v->get_orthogonal_index();
-}
-
-godot_vector3 godot_basis_get_scale(const godot_basis *p_v) {
+godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Basis *v = (Basis *)p_v;
- *d = v->get_scale();
+ const Basis *self = (const Basis *)p_self;
+ *((Vector3 *)&dest) = self->get_euler();
return dest;
}
-void godot_basis_inverse(godot_basis *p_dest, const godot_basis *p_v) {
- Basis *d = (Basis *)p_dest;
- const Basis *v = (Basis *)p_v;
- *d = v->inverse();
+godot_real GDAPI godot_basis_tdotx(const godot_basis *p_self, const godot_vector3 *p_with) {
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *with = (const Vector3 *)p_with;
+ return self->tdotx(*with);
+}
+
+godot_real GDAPI godot_basis_tdoty(const godot_basis *p_self, const godot_vector3 *p_with) {
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *with = (const Vector3 *)p_with;
+ return self->tdoty(*with);
}
-void godot_basis_orthonormalized(godot_basis *p_dest, const godot_basis *p_v) {
- Basis *d = (Basis *)p_dest;
- const Basis *v = (Basis *)p_v;
- *d = v->orthonormalized();
+godot_real GDAPI godot_basis_tdotz(const godot_basis *p_self, const godot_vector3 *p_with) {
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *with = (const Vector3 *)p_with;
+ return self->tdotz(*with);
}
-void godot_basis_rotated(godot_basis *p_dest, const godot_basis *p_v, const godot_vector3 p_axis, const godot_real p_phi) {
- Basis *d = (Basis *)p_dest;
- const Basis *v = (Basis *)p_v;
- const Vector3 *axis = (Vector3 *)&p_axis;
- *d = v->rotated(*axis, p_phi);
+godot_vector3 GDAPI godot_basis_xform(const godot_basis *p_self, const godot_vector3 *p_v) {
+ godot_vector3 dest;
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *v = (const Vector3 *)p_v;
+ *((Vector3 *)&dest) = self->xform(*v);
+ return dest;
}
-void godot_basis_scaled(godot_basis *p_dest, const godot_basis *p_v, const godot_vector3 p_scale) {
- Basis *d = (Basis *)p_dest;
- const Basis *v = (Basis *)p_v;
- const Vector3 *scale = (Vector3 *)&p_scale;
- *d = v->scaled(*scale);
+godot_vector3 GDAPI godot_basis_xform_inv(const godot_basis *p_self, const godot_vector3 *p_v) {
+ godot_vector3 dest;
+ const Basis *self = (const Basis *)p_self;
+ const Vector3 *v = (const Vector3 *)p_v;
+ *((Vector3 *)&dest) = self->xform_inv(*v);
+ return dest;
}
-godot_real godot_basis_tdotx(const godot_basis *p_v, const godot_vector3 p_with) {
- const Basis *v = (Basis *)p_v;
- const Vector3 *with = (Vector3 *)&p_with;
- return v->tdotx(*with);
+godot_int GDAPI godot_basis_get_orthogonal_index(const godot_basis *p_self) {
+ const Basis *self = (const Basis *)p_self;
+ return self->get_orthogonal_index();
}
-godot_real godot_basis_tdoty(const godot_basis *p_v, const godot_vector3 p_with) {
- const Basis *v = (Basis *)p_v;
- const Vector3 *with = (Vector3 *)&p_with;
- return v->tdoty(*with);
+void GDAPI godot_basis_new(godot_basis *r_dest) {
+ Basis *dest = (Basis *)r_dest;
+ *dest = Basis();
}
-godot_real godot_basis_tdotz(const godot_basis *p_v, const godot_vector3 p_with) {
- const Basis *v = (Basis *)p_v;
- const Vector3 *with = (Vector3 *)&p_with;
- return v->tdotz(*with);
+void GDAPI godot_basis_new_with_euler_quat(godot_basis *r_dest, const godot_quat *p_euler) {
+ Basis *dest = (Basis *)r_dest;
+ const Quat *euler = (const Quat *)p_euler;
+ *dest = Basis(*euler);
}
-void godot_basis_transposed(godot_basis *p_dest, const godot_basis *p_v) {
- Basis *d = (Basis *)p_dest;
- const Basis *v = (Basis *)p_v;
- *d = v->transposed();
+// p_elements is a pointer to an array of 3 (!!) vector3
+void GDAPI godot_basis_get_elements(godot_basis *p_self, godot_vector3 *p_elements) {
+ const Basis *self = (const Basis *)p_self;
+ Vector3 *elements = (Vector3 *)p_elements;
+ elements[0] = self->elements[0];
+ elements[1] = self->elements[1];
+ elements[2] = self->elements[2];
}
-godot_vector3 godot_basis_xform(const godot_basis *p_v, const godot_vector3 p_vect) {
+godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_self, const godot_int p_axis) {
godot_vector3 dest;
Vector3 *d = (Vector3 *)&dest;
- const Basis *v = (Basis *)p_v;
- const Vector3 *vect = (Vector3 *)&p_vect;
- *d = v->xform(*vect);
+ const Basis *self = (const Basis *)p_self;
+ *d = self->get_axis(p_axis);
return dest;
}
-godot_vector3 godot_basis_xform_inv(const godot_basis *p_v, const godot_vector3 p_vect) {
+void GDAPI godot_basis_set_axis(godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value) {
+ Basis *self = (Basis *)p_self;
+ const Vector3 *value = (const Vector3 *)p_value;
+ self->set_axis(p_axis, *value);
+}
+
+godot_vector3 GDAPI godot_basis_get_row(const godot_basis *p_self, const godot_int p_row) {
godot_vector3 dest;
Vector3 *d = (Vector3 *)&dest;
- const Basis *v = (Basis *)p_v;
- const Vector3 *vect = (Vector3 *)&p_vect;
- *d = v->xform_inv(*vect);
+ const Basis *self = (const Basis *)p_self;
+ *d = self->get_row(p_row);
return dest;
}
+void GDAPI godot_basis_set_row(godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value) {
+ Basis *self = (Basis *)p_self;
+ const Vector3 *value = (const Vector3 *)p_value;
+ self->set_row(p_row, *value);
+}
+
+godot_bool GDAPI godot_basis_operator_equal(const godot_basis *p_self, const godot_basis *p_b) {
+ const Basis *self = (const Basis *)p_self;
+ const Basis *b = (const Basis *)p_b;
+ return *self == *b;
+}
+
+godot_basis GDAPI godot_basis_operator_add(const godot_basis *p_self, const godot_basis *p_b) {
+ godot_basis raw_dest;
+ Basis *dest = (Basis *)&raw_dest;
+ const Basis *self = (const Basis *)p_self;
+ const Basis *b = (const Basis *)p_b;
+ *dest = *self + *b;
+ return raw_dest;
+}
+
+godot_basis GDAPI godot_basis_operator_substract(const godot_basis *p_self, const godot_basis *p_b) {
+ godot_basis raw_dest;
+ Basis *dest = (Basis *)&raw_dest;
+ const Basis *self = (const Basis *)p_self;
+ const Basis *b = (const Basis *)p_b;
+ *dest = *self - *b;
+ return raw_dest;
+}
+
+godot_basis GDAPI godot_basis_operator_multiply_vector(const godot_basis *p_self, const godot_basis *p_b) {
+ godot_basis raw_dest;
+ Basis *dest = (Basis *)&raw_dest;
+ const Basis *self = (const Basis *)p_self;
+ const Basis *b = (const Basis *)p_b;
+ *dest = *self * *b;
+ return raw_dest;
+}
+
+godot_basis GDAPI godot_basis_operator_multiply_scalar(const godot_basis *p_self, const godot_real p_b) {
+ godot_basis raw_dest;
+ Basis *dest = (Basis *)&raw_dest;
+ const Basis *self = (const Basis *)p_self;
+ *dest = *self * p_b;
+ return raw_dest;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/godot/godot_basis.h b/modules/gdnative/godot/godot_basis.h
index 2803396997..a096a8cc08 100644
--- a/modules/gdnative/godot/godot_basis.h
+++ b/modules/gdnative/godot/godot_basis.h
@@ -37,45 +37,79 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_BASIS_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_BASIS_TYPE_DEFINED
typedef struct godot_basis {
uint8_t _dont_touch_that[36];
} godot_basis;
#endif
#include "../godot.h"
-#include "godot_quat.h"
-
-void GDAPI godot_basis_new(godot_basis *p_v);
-void GDAPI godot_basis_new_with_euler_quat(godot_basis *p_v, const godot_quat *p_euler);
-void GDAPI godot_basis_new_with_euler(godot_basis *p_v, const godot_vector3 p_euler);
-void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *p_v, const godot_vector3 p_axis, const godot_real p_phi);
-void GDAPI godot_basis_new_with_rows(godot_basis *p_v, const godot_vector3 p_row0, const godot_vector3 p_row1, const godot_vector3 p_row2);
-
-godot_quat GDAPI godot_basis_as_quat(const godot_basis *p_v);
-
-/*
- * p_elements is a pointer to an array of 3 (!!) vector3
- */
-void GDAPI godot_basis_get_elements(godot_basis *p_v, godot_vector3 *p_elements);
-godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_v, const godot_int p_axis);
-void GDAPI godot_basis_set_axis(godot_basis *p_v, const godot_int p_axis, const godot_vector3 p_value);
-godot_vector3 GDAPI godot_basis_get_row(const godot_basis *p_v, const godot_int p_row);
-void GDAPI godot_basis_set_row(godot_basis *p_v, const godot_int p_row, const godot_vector3 p_value);
-
-godot_real godot_basis_determinant(const godot_basis *p_v);
-godot_vector3 godot_basis_get_euler(const godot_basis *p_v);
-godot_int godot_basis_get_orthogonal_index(const godot_basis *p_v);
-godot_vector3 godot_basis_get_scale(const godot_basis *p_v);
-void godot_basis_inverse(godot_basis *p_dest, const godot_basis *p_v);
-void godot_basis_orthonormalized(godot_basis *p_dest, const godot_basis *p_v);
-void godot_basis_rotated(godot_basis *p_dest, const godot_basis *p_v, const godot_vector3 p_axis, const godot_real p_phi);
-void godot_basis_scaled(godot_basis *p_dest, const godot_basis *p_v, const godot_vector3 p_scale);
-godot_real godot_basis_tdotx(const godot_basis *p_v, const godot_vector3 p_with);
-godot_real godot_basis_tdoty(const godot_basis *p_v, const godot_vector3 p_with);
-godot_real godot_basis_tdotz(const godot_basis *p_v, const godot_vector3 p_with);
-void godot_basis_transposed(godot_basis *p_dest, const godot_basis *p_v);
-godot_vector3 godot_basis_xform(const godot_basis *p_v, const godot_vector3 p_vect);
-godot_vector3 godot_basis_xform_inv(const godot_basis *p_v, const godot_vector3 p_vect);
+#include "godot_vector3.h"
+
+void GDAPI godot_basis_new_with_rows(godot_basis *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis);
+void GDAPI godot_basis_new_with_axis_and_angle(godot_basis *r_dest, const godot_vector3 *p_axis, const godot_real p_phi);
+void GDAPI godot_basis_new_with_euler(godot_basis *r_dest, const godot_vector3 *p_euler);
+
+godot_string GDAPI godot_basis_as_string(const godot_basis *p_self);
+
+godot_basis GDAPI godot_basis_inverse(const godot_basis *p_self);
+
+godot_basis GDAPI godot_basis_transposed(const godot_basis *p_self);
+
+godot_basis GDAPI godot_basis_orthonormalized(const godot_basis *p_self);
+
+godot_real GDAPI godot_basis_determinant(const godot_basis *p_self);
+
+godot_basis GDAPI godot_basis_rotated(const godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_phi);
+
+godot_basis GDAPI godot_basis_scaled(const godot_basis *p_self, const godot_vector3 *p_scale);
+
+void GDAPI godot_basis_set_scale(godot_basis *p_self, const godot_vector3 *p_scale);
+
+void GDAPI godot_basis_set_rotation_euler(godot_basis *p_self, const godot_vector3 *p_euler);
+
+void GDAPI godot_basis_set_rotation_axis_angle(godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_angle);
+
+godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self);
+
+godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_self);
+
+godot_real GDAPI godot_basis_tdotx(const godot_basis *p_self, const godot_vector3 *p_with);
+
+godot_real GDAPI godot_basis_tdoty(const godot_basis *p_self, const godot_vector3 *p_with);
+
+godot_real GDAPI godot_basis_tdotz(const godot_basis *p_self, const godot_vector3 *p_with);
+
+godot_vector3 GDAPI godot_basis_xform(const godot_basis *p_self, const godot_vector3 *p_v);
+
+godot_vector3 GDAPI godot_basis_xform_inv(const godot_basis *p_self, const godot_vector3 *p_v);
+
+godot_int GDAPI godot_basis_get_orthogonal_index(const godot_basis *p_self);
+
+void GDAPI godot_basis_new(godot_basis *r_dest);
+
+void GDAPI godot_basis_new_with_euler_quat(godot_basis *r_dest, const godot_quat *p_euler);
+
+// p_elements is a pointer to an array of 3 (!!) vector3
+void GDAPI godot_basis_get_elements(godot_basis *p_self, godot_vector3 *p_elements);
+
+godot_vector3 GDAPI godot_basis_get_axis(const godot_basis *p_self, const godot_int p_axis);
+
+void GDAPI godot_basis_set_axis(godot_basis *p_self, const godot_int p_axis, const godot_vector3 *p_value);
+
+godot_vector3 GDAPI godot_basis_get_row(const godot_basis *p_self, const godot_int p_row);
+
+void GDAPI godot_basis_set_row(godot_basis *p_self, const godot_int p_row, const godot_vector3 *p_value);
+
+godot_bool GDAPI godot_basis_operator_equal(const godot_basis *p_self, const godot_basis *p_b);
+
+godot_basis GDAPI godot_basis_operator_add(const godot_basis *p_self, const godot_basis *p_b);
+
+godot_basis GDAPI godot_basis_operator_substract(const godot_basis *p_self, const godot_basis *p_b);
+
+godot_basis GDAPI godot_basis_operator_multiply_vector(const godot_basis *p_self, const godot_basis *p_b);
+
+godot_basis GDAPI godot_basis_operator_multiply_scalar(const godot_basis *p_self, const godot_real p_b);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_color.cpp b/modules/gdnative/godot/godot_color.cpp
index 203ce672fa..0417a828ab 100644
--- a/modules/gdnative/godot/godot_color.cpp
+++ b/modules/gdnative/godot/godot_color.cpp
@@ -28,34 +28,98 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_color.h"
+#include "core/variant.h"
-#include "color.h"
+#include "core/color.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _color_api_anchor() {
+void _color_api_anchor() {}
+
+void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a) {
+
+ Color *dest = (Color *)r_dest;
+ *dest = Color(p_r, p_g, p_b, p_a);
+}
+
+void GDAPI godot_color_new_rgb(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b) {
+
+ Color *dest = (Color *)r_dest;
+ *dest = Color(p_r, p_g, p_b);
+}
+
+godot_string GDAPI godot_color_as_string(const godot_color *p_self) {
+ godot_string ret;
+ const Color *self = (const Color *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
+}
+
+godot_int GDAPI godot_color_to_32(const godot_color *p_self) {
+ const Color *self = (const Color *)p_self;
+ return self->to_32();
+}
+
+godot_int GDAPI godot_color_to_ARGB32(const godot_color *p_self) {
+ const Color *self = (const Color *)p_self;
+ return self->to_ARGB32();
+}
+
+godot_real GDAPI godot_color_gray(const godot_color *p_self) {
+ const Color *self = (const Color *)p_self;
+ return self->gray();
+}
+
+godot_color GDAPI godot_color_inverted(const godot_color *p_self) {
+ godot_color dest;
+ const Color *self = (const Color *)p_self;
+ *((Color *)&dest) = self->inverted();
+ return dest;
}
-void GDAPI godot_color_new(godot_color *p_color) {
- Color *color = (Color *)p_color;
- *color = Color();
+godot_color GDAPI godot_color_contrasted(const godot_color *p_self) {
+ godot_color dest;
+ const Color *self = (const Color *)p_self;
+ *((Color *)&dest) = self->contrasted();
+ return dest;
}
-void GDAPI godot_color_new_rgba(godot_color *p_color, const godot_real r, const godot_real g, const godot_real b, const godot_real a) {
- Color *color = (Color *)p_color;
- *color = Color(r, g, b, a);
+godot_color GDAPI godot_color_linear_interpolate(const godot_color *p_self, const godot_color *p_b, const godot_real p_t) {
+ godot_color dest;
+ const Color *self = (const Color *)p_self;
+ const Color *b = (const Color *)p_b;
+ *((Color *)&dest) = self->linear_interpolate(*b, p_t);
+ return dest;
+}
+
+godot_color GDAPI godot_color_blend(const godot_color *p_self, const godot_color *p_over) {
+ godot_color dest;
+ const Color *self = (const Color *)p_self;
+ const Color *over = (const Color *)p_over;
+ *((Color *)&dest) = self->blend(*over);
+ return dest;
+}
+
+godot_string GDAPI godot_color_to_html(const godot_color *p_self, const godot_bool p_with_alpha) {
+ godot_string dest;
+ const Color *self = (const Color *)p_self;
+
+ *((String *)&dest) = self->to_html(p_with_alpha);
+ return dest;
}
-uint32_t GDAPI godot_color_get_32(const godot_color *p_color) {
- const Color *color = (const Color *)p_color;
- return color->to_32();
+godot_bool GDAPI godot_color_operator_equal(const godot_color *p_self, const godot_color *p_b) {
+ const Color *self = (const Color *)p_self;
+ const Color *b = (const Color *)p_b;
+ return *self == *b;
}
-float GDAPI *godot_color_index(godot_color *p_color, const godot_int idx) {
- Color *color = (Color *)p_color;
- return &color->operator[](idx);
+godot_bool GDAPI godot_color_operator_less(const godot_color *p_self, const godot_color *p_b) {
+ const Color *self = (const Color *)p_self;
+ const Color *b = (const Color *)p_b;
+ return *self < *b;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_color.h b/modules/gdnative/godot/godot_color.h
index b99a062a66..8588c997ea 100644
--- a/modules/gdnative/godot/godot_color.h
+++ b/modules/gdnative/godot/godot_color.h
@@ -37,19 +37,39 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_COLOR_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_COLOR_TYPE_DEFINED
typedef struct godot_color {
uint8_t _dont_touch_that[16];
} godot_color;
#endif
#include "../godot.h"
+#include "godot_string.h"
-void GDAPI godot_color_new(godot_color *p_color);
-void GDAPI godot_color_new_rgba(godot_color *p_color, const godot_real r, const godot_real g, const godot_real b, const godot_real a);
+void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a);
+void GDAPI godot_color_new_rgb(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b);
-uint32_t GDAPI godot_color_get_32(const godot_color *p_color);
+godot_string GDAPI godot_color_as_string(const godot_color *p_self);
-float GDAPI *godot_color_index(godot_color *p_color, const godot_int idx);
+godot_int GDAPI godot_color_to_32(const godot_color *p_self);
+
+godot_int GDAPI godot_color_to_ARGB32(const godot_color *p_self);
+
+godot_real GDAPI godot_color_gray(const godot_color *p_self);
+
+godot_color GDAPI godot_color_inverted(const godot_color *p_self);
+
+godot_color GDAPI godot_color_contrasted(const godot_color *p_self);
+
+godot_color GDAPI godot_color_linear_interpolate(const godot_color *p_self, const godot_color *p_b, const godot_real p_t);
+
+godot_color GDAPI godot_color_blend(const godot_color *p_self, const godot_color *p_over);
+
+godot_string GDAPI godot_color_to_html(const godot_color *p_self, const godot_bool p_with_alpha);
+
+godot_bool GDAPI godot_color_operator_equal(const godot_color *p_self, const godot_color *p_b);
+
+godot_bool GDAPI godot_color_operator_less(const godot_color *p_self, const godot_color *p_b);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_dictionary.cpp b/modules/gdnative/godot/godot_dictionary.cpp
index 16d08e58e2..b98ee5b5c9 100644
--- a/modules/gdnative/godot/godot_dictionary.cpp
+++ b/modules/gdnative/godot/godot_dictionary.cpp
@@ -28,109 +28,97 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_dictionary.h"
+#include "core/variant.h"
#include "core/dictionary.h"
-
-#include "core/os/memory.h"
-
#include "core/io/json.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _dictionary_api_anchor() {
+void _dictionary_api_anchor() {}
+
+void GDAPI godot_dictionary_new(godot_dictionary *r_dest) {
+ Dictionary *dest = (Dictionary *)r_dest;
+ memnew_placement(dest, Dictionary);
}
-void GDAPI godot_dictionary_new(godot_dictionary *p_dict) {
- Dictionary *dict = (Dictionary *)p_dict;
- memnew_placement(dict, Dictionary);
+void GDAPI godot_dictionary_destroy(godot_dictionary *p_self) {
+ Dictionary *self = (Dictionary *)p_self;
+ self->~Dictionary();
}
-void GDAPI godot_dictionary_clear(godot_dictionary *p_dict) {
- Dictionary *dict = (Dictionary *)p_dict;
- dict->clear();
+godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self) {
+ const Dictionary *self = (const Dictionary *)p_self;
+ return self->size();
}
-godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_dict) {
- const Dictionary *dict = (const Dictionary *)p_dict;
- return dict->empty();
+godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_self) {
+ const Dictionary *self = (const Dictionary *)p_self;
+ return self->empty();
}
-void GDAPI godot_dictionary_erase(godot_dictionary *p_dict, const godot_variant *p_key) {
- Dictionary *dict = (Dictionary *)p_dict;
- Variant *key = (Variant *)p_key;
- dict->erase(*key);
+void GDAPI godot_dictionary_clear(godot_dictionary *p_self) {
+ Dictionary *self = (Dictionary *)p_self;
+ self->clear();
}
-godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_dict, const godot_variant *p_key) {
- const Dictionary *dict = (const Dictionary *)p_dict;
+godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_self, const godot_variant *p_key) {
+ const Dictionary *self = (const Dictionary *)p_self;
const Variant *key = (const Variant *)p_key;
- return dict->has(*key);
+ return self->has(*key);
}
-godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_dict, const godot_array *p_keys) {
- const Dictionary *dict = (const Dictionary *)p_dict;
+godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_self, const godot_array *p_keys) {
+ const Dictionary *self = (const Dictionary *)p_self;
const Array *keys = (const Array *)p_keys;
- return dict->has_all(*keys);
+ return self->has_all(*keys);
}
-uint32_t GDAPI godot_dictionary_hash(const godot_dictionary *p_dict) {
- const Dictionary *dict = (const Dictionary *)p_dict;
- return dict->hash();
+void GDAPI godot_dictionary_erase(godot_dictionary *p_self, const godot_variant *p_key) {
+ Dictionary *self = (Dictionary *)p_self;
+ const Variant *key = (const Variant *)p_key;
+ self->erase(*key);
}
-godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_dict) {
- godot_array a;
- godot_array_new(&a);
- const Dictionary *dict = (const Dictionary *)p_dict;
- Array *array = (Array *)&a;
- *array = dict->keys();
- return a;
+godot_int GDAPI godot_dictionary_hash(const godot_dictionary *p_self) {
+ const Dictionary *self = (const Dictionary *)p_self;
+ return self->hash();
}
-godot_int GDAPI godot_dictionary_parse_json(godot_dictionary *p_dict, const godot_string *p_json) {
- Dictionary *dict = (Dictionary *)p_dict;
- const String *json = (const String *)p_json;
- Variant ret;
- int err_line;
- String err_str;
- int err = (int)JSON::parse(*json, ret, err_str, err_line);
- *dict = ret;
- return err;
+godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_self) {
+ godot_array dest;
+ const Dictionary *self = (const Dictionary *)p_self;
+ memnew_placement(&dest, Array(self->keys()));
+ return dest;
+}
+
+godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_self) {
+ godot_array dest;
+ const Dictionary *self = (const Dictionary *)p_self;
+ memnew_placement(&dest, Array(self->values()));
+ return dest;
}
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_dict, const godot_variant *p_key) {
Dictionary *dict = (Dictionary *)p_dict;
- Variant *key = (Variant *)p_key;
+ const Variant *key = (const Variant *)p_key;
return (godot_variant *)&dict->operator[](*key);
}
-godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_dict) {
- const Dictionary *dict = (const Dictionary *)p_dict;
- return dict->size();
+godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b) {
+ const Dictionary *self = (const Dictionary *)p_self;
+ const Dictionary *b = (const Dictionary *)p_b;
+ return *self == *b;
}
godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_dict) {
+ godot_string raw_dest;
+ String *dest = (String *)&raw_dest;
const Dictionary *dict = (const Dictionary *)p_dict;
- godot_string str;
- godot_string_new(&str);
- String *s = (String *)&str;
- *s = JSON::print(Variant(*dict));
- return str;
-}
-
-godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_dict) {
- godot_array a;
- godot_array_new(&a);
- const Dictionary *dict = (const Dictionary *)p_dict;
- Array *array = (Array *)&a;
- *array = dict->values();
- return a;
-}
-
-void GDAPI godot_dictionary_destroy(godot_dictionary *p_dict) {
- ((Dictionary *)p_dict)->~Dictionary();
+ memnew_placement(dest, String(JSON::print(Variant(*dict))));
+ return raw_dest;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_dictionary.h b/modules/gdnative/godot/godot_dictionary.h
index 3f7c504880..42f7f872a1 100644
--- a/modules/gdnative/godot/godot_dictionary.h
+++ b/modules/gdnative/godot/godot_dictionary.h
@@ -36,43 +36,44 @@ extern "C" {
#include <stdint.h>
-#ifndef GODOT_CORE_API_GODOT_DICITIONARY_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_DICTIONARY_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_DICTIONARY_TYPE_DEFINED
typedef struct godot_dictionary {
uint8_t _dont_touch_that[8];
} godot_dictionary;
#endif
+#include "../godot.h"
#include "godot_array.h"
#include "godot_variant.h"
-void GDAPI godot_dictionary_new(godot_dictionary *p_dict);
+void GDAPI godot_dictionary_new(godot_dictionary *r_dest);
+void GDAPI godot_dictionary_destroy(godot_dictionary *p_self);
-void GDAPI godot_dictionary_clear(godot_dictionary *p_dict);
+godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_self);
-godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_dict);
+godot_bool GDAPI godot_dictionary_empty(const godot_dictionary *p_self);
-void GDAPI godot_dictionary_erase(godot_dictionary *p_dict, const godot_variant *p_key);
+void GDAPI godot_dictionary_clear(godot_dictionary *p_self);
-godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_dict, const godot_variant *p_key);
+godot_bool GDAPI godot_dictionary_has(const godot_dictionary *p_self, const godot_variant *p_key);
-godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_dict, const godot_array *p_keys);
+godot_bool GDAPI godot_dictionary_has_all(const godot_dictionary *p_self, const godot_array *p_keys);
-uint32_t GDAPI godot_dictionary_hash(const godot_dictionary *p_dict);
+void GDAPI godot_dictionary_erase(godot_dictionary *p_self, const godot_variant *p_key);
-godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_dict);
+godot_int GDAPI godot_dictionary_hash(const godot_dictionary *p_self);
-godot_int GDAPI godot_dictionary_parse_json(godot_dictionary *p_dict, const godot_string *p_json);
+godot_array GDAPI godot_dictionary_keys(const godot_dictionary *p_self);
+
+godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_self);
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_dict, const godot_variant *p_key);
-godot_int GDAPI godot_dictionary_size(const godot_dictionary *p_dict);
+godot_bool GDAPI godot_dictionary_operator_equal(const godot_dictionary *p_self, const godot_dictionary *p_b);
godot_string GDAPI godot_dictionary_to_json(const godot_dictionary *p_dict);
-godot_array GDAPI godot_dictionary_values(const godot_dictionary *p_dict);
-
-void GDAPI godot_dictionary_destroy(godot_dictionary *p_dict);
-
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/godot/godot_image.cpp b/modules/gdnative/godot/godot_image.cpp
deleted file mode 100644
index ae8290afc2..0000000000
--- a/modules/gdnative/godot/godot_image.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/*************************************************************************/
-/* godot_image.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 "godot_image.h"
-
-#include "image.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void _image_api_anchor() {
-}
-
-#define memnew_placement_custom(m_placement, m_class, m_constr) _post_initialize(new (m_placement, sizeof(m_class), "") m_constr)
-
-void GDAPI godot_image_new(godot_image *p_img) {
- Image *img = (Image *)p_img;
- memnew_placement_custom(img, Image, Image());
-}
-
-void GDAPI godot_image_new_with_png_jpg(godot_image *p_img, const uint8_t *p_mem_png_jpg, int p_len) {
- Image *img = (Image *)p_img;
- memnew_placement_custom(img, Image, Image(p_mem_png_jpg, p_len));
-}
-
-void GDAPI godot_image_new_with_xpm(godot_image *p_img, const char **p_xpm) {
- Image *img = (Image *)p_img;
- memnew_placement_custom(img, Image, Image(p_xpm));
-}
-
-void GDAPI godot_image_new_with_size_format(godot_image *p_img, int p_width, int p_height, bool p_use_mipmaps, godot_image_format p_format) {
- Image *img = (Image *)p_img;
- memnew_placement_custom(img, Image, Image(p_width, p_height, p_use_mipmaps, (Image::Format)p_format));
-}
-
-void GDAPI godot_image_new_with_size_format_data(godot_image *p_img, int p_width, int p_height, bool p_use_mipmaps, godot_image_format p_format, godot_pool_byte_array *p_data) {
- Image *img = (Image *)p_img;
- PoolVector<uint8_t> *data = (PoolVector<uint8_t> *)p_data;
- memnew_placement_custom(img, Image, Image(p_width, p_height, p_use_mipmaps, (Image::Format)p_format, *data));
-}
-
-godot_pool_byte_array GDAPI godot_image_get_data(godot_image *p_img) {
- Image *img = (Image *)p_img;
- PoolVector<uint8_t> cpp_data = img->get_data();
- godot_pool_byte_array *data = (godot_pool_byte_array *)&cpp_data;
- return *data;
-}
-
-godot_error GDAPI godot_image_load(godot_image *p_img, const godot_string *p_path) {
- Image *img = (Image *)p_img;
- String *path = (String *)p_path;
- return (godot_error)img->load(*path);
-}
-
-godot_error GDAPI godot_image_save_png(godot_image *p_img, const godot_string *p_path) {
- Image *img = (Image *)p_img;
- String *path = (String *)p_path;
- return (godot_error)img->save_png(*path);
-}
-
-int GDAPI godot_image_get_width(const godot_image *p_img) {
- Image *img = (Image *)p_img;
- return img->get_width();
-}
-
-int GDAPI godot_image_get_height(const godot_image *p_img) {
- Image *img = (Image *)p_img;
- return img->get_height();
-}
-
-godot_bool GDAPI godot_image_has_mipmaps(const godot_image *p_img) {
- Image *img = (Image *)p_img;
- return img->has_mipmaps();
-}
-
-int GDAPI godot_image_get_mipmap_count(const godot_image *p_img) {
- Image *img = (Image *)p_img;
- return img->get_mipmap_count();
-}
-
-void GDAPI godot_image_destroy(godot_image *p_img) {
- ((Image *)p_img)->~Image();
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/modules/gdnative/godot/godot_image.h b/modules/gdnative/godot/godot_image.h
deleted file mode 100644
index c43dd45148..0000000000
--- a/modules/gdnative/godot/godot_image.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*************************************************************************/
-/* godot_image.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 GODOT_IMAGE_H
-#define GODOT_IMAGE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#ifndef GODOT_CORE_API_GODOT_IMAGE_TYPE_DEFINED
-typedef struct godot_image {
- uint8_t _dont_touch_that[32];
-} godot_image;
-#endif
-
-#include "godot_pool_arrays.h"
-
-#include "../godot.h"
-
-// This is a copypasta of the C++ enum inside the Image class
-// There's no neat way of automatically updating the C enum / using the C++ enum directly
-// if somebody knows a way feel free to open a PR or open an issue (or ask for Karroffel or bojidar-bg on IRC)
-
-enum godot_image_format {
-
- GODOT_IMAGE_FORMAT_L8, //luminance
- GODOT_IMAGE_FORMAT_LA8, //luminance-alpha
- GODOT_IMAGE_FORMAT_R8,
- GODOT_IMAGE_FORMAT_RG8,
- GODOT_IMAGE_FORMAT_RGB8,
- GODOT_IMAGE_FORMAT_RGBA8,
- GODOT_IMAGE_FORMAT_RGB565, //16 bit
- GODOT_IMAGE_FORMAT_RGBA4444,
- GODOT_IMAGE_FORMAT_RGBA5551,
- GODOT_IMAGE_FORMAT_RF, //float
- GODOT_IMAGE_FORMAT_RGF,
- GODOT_IMAGE_FORMAT_RGBF,
- GODOT_IMAGE_FORMAT_RGBAF,
- GODOT_IMAGE_FORMAT_RH, //half float
- GODOT_IMAGE_FORMAT_RGH,
- GODOT_IMAGE_FORMAT_RGBH,
- GODOT_IMAGE_FORMAT_RGBAH,
- GODOT_IMAGE_FORMAT_DXT1, //s3tc bc1
- GODOT_IMAGE_FORMAT_DXT3, //bc2
- GODOT_IMAGE_FORMAT_DXT5, //bc3
- GODOT_IMAGE_FORMAT_ATI1, //bc4
- GODOT_IMAGE_FORMAT_ATI2, //bc5
- GODOT_IMAGE_FORMAT_BPTC_RGBA, //btpc bc6h
- GODOT_IMAGE_FORMAT_BPTC_RGBF, //float /
- GODOT_IMAGE_FORMAT_BPTC_RGBFU, //unsigned float
- GODOT_IMAGE_FORMAT_PVRTC2, //pvrtc
- GODOT_IMAGE_FORMAT_PVRTC2A,
- GODOT_IMAGE_FORMAT_PVRTC4,
- GODOT_IMAGE_FORMAT_PVRTC4A,
- GODOT_IMAGE_FORMAT_ETC, //etc1
- GODOT_IMAGE_FORMAT_ETC2_R11, //etc2
- GODOT_IMAGE_FORMAT_ETC2_R11S, //signed, NOT srgb.
- GODOT_IMAGE_FORMAT_ETC2_RG11,
- GODOT_IMAGE_FORMAT_ETC2_RG11S,
- GODOT_IMAGE_FORMAT_ETC2_RGB8,
- GODOT_IMAGE_FORMAT_ETC2_RGBA8,
- GODOT_IMAGE_FORMAT_ETC2_RGB8A1,
- GODOT_IMAGE_FORMAT_MAX
-};
-typedef enum godot_image_format godot_image_format;
-
-void GDAPI godot_image_new(godot_image *p_img);
-// p_len can be -1
-void GDAPI godot_image_new_with_png_jpg(godot_image *p_img, const uint8_t *p_mem_png_jpg, int p_len);
-void GDAPI godot_image_new_with_xpm(godot_image *p_img, const char **p_xpm);
-
-void GDAPI godot_image_new_with_size_format(godot_image *p_img, int p_width, int p_height, bool p_use_mipmaps, godot_image_format p_format);
-void GDAPI godot_image_new_with_size_format_data(godot_image *p_img, int p_width, int p_height, bool p_use_mipmaps, godot_image_format p_format, godot_pool_byte_array *p_data);
-
-godot_pool_byte_array GDAPI godot_image_get_data(godot_image *p_img);
-
-godot_error GDAPI godot_image_load(godot_image *p_img, const godot_string *p_path);
-godot_error GDAPI godot_image_save_png(godot_image *p_img, const godot_string *p_path);
-
-int GDAPI godot_image_get_width(const godot_image *p_img);
-int GDAPI godot_image_get_height(const godot_image *p_img);
-godot_bool GDAPI godot_image_has_mipmaps(const godot_image *p_img);
-int GDAPI godot_image_get_mipmap_count(const godot_image *p_img);
-
-// @Incomplete
-// I think it's too complex for the binding authors to implement the image class anew, so we should definitely
-// export all methods here. That takes a while so it's on my @Todo list
-
-void GDAPI godot_image_destroy(godot_image *p_img);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // GODOT_IMAGE_H
diff --git a/modules/gdnative/godot/godot_input_event.cpp b/modules/gdnative/godot/godot_input_event.cpp
deleted file mode 100644
index 0401c96a88..0000000000
--- a/modules/gdnative/godot/godot_input_event.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-/*************************************************************************/
-/* godot_input_event.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 "godot_input_event.h"
-
-#include "os/input_event.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void _input_event_api_anchor() {
-}
-
-void GDAPI godot_input_event_new(godot_input_event *p_ie) {
- InputEvent *ie = (InputEvent *)p_ie;
- *ie = InputEvent();
-}
-
-godot_bool GDAPI godot_input_event_is_pressed(const godot_input_event *p_ie) {
- const InputEvent *ie = (const InputEvent *)p_ie;
- return ie->is_pressed();
-}
-
-godot_bool GDAPI godot_input_event_is_action(const godot_input_event *p_ie, const godot_string *p_action) {
- const InputEvent *ie = (const InputEvent *)p_ie;
- const String *action = (const String *)p_action;
- return ie->is_action(*action);
-}
-
-godot_bool GDAPI godot_input_event_is_action_pressed(const godot_input_event *p_ie, const godot_string *p_action) {
- const InputEvent *ie = (const InputEvent *)p_ie;
- const String *action = (const String *)p_action;
- return ie->is_action_pressed(*action);
-}
-
-godot_bool GDAPI godot_input_event_is_action_released(const godot_input_event *p_ie, const godot_string *p_action) {
- const InputEvent *ie = (const InputEvent *)p_ie;
- const String *action = (const String *)p_action;
- return ie->is_action_released(*action);
-}
-
-godot_bool GDAPI godot_input_event_is_echo(const godot_input_event *p_ie) {
- const InputEvent *ie = (const InputEvent *)p_ie;
- return ie->is_echo();
-}
-
-void GDAPI godot_input_event_set_as_action(godot_input_event *p_ie, const godot_string *p_action, const godot_bool p_pressed) {
- InputEvent *ie = (InputEvent *)p_ie;
- const String *action = (const String *)p_action;
- return ie->set_as_action(*action, p_pressed);
-}
-
-godot_string GDAPI godot_input_event_as_string(const godot_input_event *p_ie) {
- const InputEvent *ie = (const InputEvent *)p_ie;
- godot_string str;
- String *s = (String *)&str;
- memnew_placement(s, String);
- *s = (String)*ie;
- return str;
-}
-
-uint32_t GDAPI *godot_input_event_get_id(godot_input_event *p_ie) {
- InputEvent *ie = (InputEvent *)p_ie;
- return &ie->ID;
-}
-
-godot_input_event_type GDAPI *godot_input_event_get_type(godot_input_event *p_ie) {
- InputEvent *ie = (InputEvent *)p_ie;
- return (godot_input_event_type *)&ie->type;
-}
-
-godot_int GDAPI *godot_input_event_get_device(godot_input_event *p_ie) {
- InputEvent *ie = (InputEvent *)p_ie;
- return &ie->device;
-}
-
-static InputModifierState *_get_mod_for_type(InputEvent *ie) {
- switch (ie->type) {
- case InputEvent::MOUSE_BUTTON:
- return &ie->mouse_button.mod;
- case InputEvent::MOUSE_MOTION:
- return &ie->mouse_motion.mod;
- case InputEvent::KEY:
- return &ie->key.mod;
- default:
- return 0;
- }
-}
-
-godot_bool GDAPI *godot_input_event_mod_get_alt(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- InputModifierState *mod = _get_mod_for_type(ie);
- return &mod->alt;
-}
-
-godot_bool GDAPI *godot_input_event_mod_get_ctrl(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- InputModifierState *mod = _get_mod_for_type(ie);
- return &mod->control;
-}
-
-godot_bool GDAPI *godot_input_event_mod_get_command(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- InputModifierState *mod = _get_mod_for_type(ie);
- return &mod->command;
-}
-
-godot_bool GDAPI *godot_input_event_mod_get_shift(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- InputModifierState *mod = _get_mod_for_type(ie);
- return &mod->shift;
-}
-
-godot_bool GDAPI *godot_input_event_mod_get_meta(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- InputModifierState *mod = _get_mod_for_type(ie);
- return &mod->meta;
-}
-
-uint32_t GDAPI *godot_input_event_key_get_scancode(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->key.scancode;
-}
-
-uint32_t GDAPI *godot_input_event_key_get_unicode(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->key.unicode;
-}
-
-godot_bool GDAPI *godot_input_event_key_get_pressed(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->key.pressed;
-}
-
-godot_bool GDAPI *godot_input_event_key_get_echo(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->key.echo;
-}
-
-float GDAPI *godot_input_event_mouse_get_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.x;
-}
-
-float GDAPI *godot_input_event_mouse_get_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.y;
-}
-
-float GDAPI *godot_input_event_mouse_get_global_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.global_x;
-}
-
-float GDAPI *godot_input_event_mouse_get_global_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.global_y;
-}
-
-godot_int GDAPI *godot_input_event_mouse_get_button_mask(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.button_mask;
-}
-
-godot_int GDAPI *godot_input_event_mouse_button_get_button_index(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.button_index;
-}
-
-godot_bool GDAPI *godot_input_event_mouse_button_get_pressed(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.pressed;
-}
-
-godot_bool GDAPI *godot_input_event_mouse_button_get_doubleclick(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_button.doubleclick;
-}
-
-float GDAPI *godot_input_event_mouse_motion_get_relative_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_motion.relative_x;
-}
-
-float GDAPI *godot_input_event_mouse_motion_get_relative_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_motion.relative_y;
-}
-
-float GDAPI *godot_input_event_mouse_motion_get_speed_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_motion.speed_x;
-}
-
-float GDAPI *godot_input_event_mouse_motion_get_speed_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->mouse_motion.speed_y;
-}
-
-godot_int GDAPI *godot_input_event_joypad_motion_get_axis(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->joy_motion.axis;
-}
-
-float GDAPI *godot_input_event_joypad_motion_get_axis_value(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->joy_motion.axis_value;
-}
-
-godot_int GDAPI *godot_input_event_joypad_button_get_button_index(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->joy_button.button_index;
-}
-
-godot_bool GDAPI *godot_input_event_joypad_button_get_pressed(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->joy_button.pressed;
-}
-
-float GDAPI *godot_input_event_joypad_button_get_pressure(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->joy_button.pressure;
-}
-
-godot_int GDAPI *godot_input_event_screen_touch_get_index(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_touch.index;
-}
-
-float GDAPI *godot_input_event_screen_touch_get_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_touch.x;
-}
-
-float GDAPI *godot_input_event_screen_touch_get_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_touch.y;
-}
-
-godot_bool GDAPI *godot_input_event_screen_touch_get_pressed(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_touch.pressed;
-}
-
-godot_int GDAPI *godot_input_event_screen_drag_get_index(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.index;
-}
-
-float GDAPI *godot_input_event_screen_drag_get_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.x;
-}
-
-float GDAPI *godot_input_event_screen_drag_get_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.y;
-}
-
-float GDAPI *godot_input_event_screen_drag_get_relative_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.relative_x;
-}
-
-float GDAPI *godot_input_event_screen_drag_get_relative_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.relative_y;
-}
-
-float GDAPI *godot_input_event_screen_drag_get_speed_x(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.speed_x;
-}
-
-float GDAPI *godot_input_event_screen_drag_get_speed_y(godot_input_event *p_event) {
- InputEvent *ie = (InputEvent *)p_event;
- return &ie->screen_drag.speed_y;
-}
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/modules/gdnative/godot/godot_input_event.h b/modules/gdnative/godot/godot_input_event.h
deleted file mode 100644
index b0a133e3d9..0000000000
--- a/modules/gdnative/godot/godot_input_event.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/*************************************************************************/
-/* godot_input_event.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 GODOT_INPUT_EVENT_H
-#define GODOT_INPUT_EVENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-#ifndef GODOT_CORE_API_GODOT_INPUT_EVENT_TYPE_DEFINED
-typedef struct godot_input_event {
- uint8_t _dont_touch_that[56];
-} godot_input_event;
-#endif
-
-enum godot_input_event_type {
- GODOT_INPUT_EVENT_TYPE_NONE,
- GODOT_INPUT_EVENT_TYPE_KEY,
- GODOT_INPUT_EVENT_TYPE_MOUSE_MOTION,
- GODOT_INPUT_EVENT_TYPE_MOUSE_BUTTON,
- GODOT_INPUT_EVENT_TYPE_JOYPAD_MOTION,
- GODOT_INPUT_EVENT_TYPE_JOYPAD_BUTTON,
- GODOT_INPUT_EVENT_TYPE_SCREEN_TOUCH,
- GODOT_INPUT_EVENT_TYPE_SCREEN_DRAG,
- GODOT_INPUT_EVENT_TYPE_ACTION,
- GODOT_INPUT_EVENT_TYPE_TYPE_MAX
-};
-typedef enum godot_input_event_type godot_input_event_type;
-
-enum {
- GODOT_BUTTON_LEFT = 1,
- GODOT_BUTTON_RIGHT = 2,
- GODOT_BUTTON_MIDDLE = 3,
- GODOT_BUTTON_WHEEL_UP = 4,
- GODOT_BUTTON_WHEEL_DOWN = 5,
- GODOT_BUTTON_WHEEL_LEFT = 6,
- GODOT_BUTTON_WHEEL_RIGHT = 7,
- GODOT_BUTTON_MASK_LEFT = (1 << (GODOT_BUTTON_LEFT - 1)),
- GODOT_BUTTON_MASK_RIGHT = (1 << (GODOT_BUTTON_RIGHT - 1)),
- GODOT_BUTTON_MASK_MIDDLE = (1 << (GODOT_BUTTON_MIDDLE - 1)),
-
-};
-
-enum {
-
- GODOT_JOY_BUTTON_0 = 0,
- GODOT_JOY_BUTTON_1 = 1,
- GODOT_JOY_BUTTON_2 = 2,
- GODOT_JOY_BUTTON_3 = 3,
- GODOT_JOY_BUTTON_4 = 4,
- GODOT_JOY_BUTTON_5 = 5,
- GODOT_JOY_BUTTON_6 = 6,
- GODOT_JOY_BUTTON_7 = 7,
- GODOT_JOY_BUTTON_8 = 8,
- GODOT_JOY_BUTTON_9 = 9,
- GODOT_JOY_BUTTON_10 = 10,
- GODOT_JOY_BUTTON_11 = 11,
- GODOT_JOY_BUTTON_12 = 12,
- GODOT_JOY_BUTTON_13 = 13,
- GODOT_JOY_BUTTON_14 = 14,
- GODOT_JOY_BUTTON_15 = 15,
- GODOT_JOY_BUTTON_MAX = 16,
-
- GODOT_JOY_L = GODOT_JOY_BUTTON_4,
- GODOT_JOY_R = GODOT_JOY_BUTTON_5,
- GODOT_JOY_L2 = GODOT_JOY_BUTTON_6,
- GODOT_JOY_R2 = GODOT_JOY_BUTTON_7,
- GODOT_JOY_L3 = GODOT_JOY_BUTTON_8,
- GODOT_JOY_R3 = GODOT_JOY_BUTTON_9,
- GODOT_JOY_SELECT = GODOT_JOY_BUTTON_10,
- GODOT_JOY_START = GODOT_JOY_BUTTON_11,
- GODOT_JOY_DPAD_UP = GODOT_JOY_BUTTON_12,
- GODOT_JOY_DPAD_DOWN = GODOT_JOY_BUTTON_13,
- GODOT_JOY_DPAD_LEFT = GODOT_JOY_BUTTON_14,
- GODOT_JOY_DPAD_RIGHT = GODOT_JOY_BUTTON_15,
-
- // a little history about game controllers (who copied who)
-
- GODOT_JOY_SNES_B = GODOT_JOY_BUTTON_0,
- GODOT_JOY_SNES_A = GODOT_JOY_BUTTON_1,
- GODOT_JOY_SNES_Y = GODOT_JOY_BUTTON_2,
- GODOT_JOY_SNES_X = GODOT_JOY_BUTTON_3,
-
- GODOT_JOY_SONY_CIRCLE = GODOT_JOY_SNES_A,
- GODOT_JOY_SONY_X = GODOT_JOY_SNES_B,
- GODOT_JOY_SONY_SQUARE = GODOT_JOY_SNES_Y,
- GODOT_JOY_SONY_TRIANGLE = GODOT_JOY_SNES_X,
-
- GODOT_JOY_SEGA_B = GODOT_JOY_SNES_A,
- GODOT_JOY_SEGA_A = GODOT_JOY_SNES_B,
- GODOT_JOY_SEGA_X = GODOT_JOY_SNES_Y,
- GODOT_JOY_SEGA_Y = GODOT_JOY_SNES_X,
-
- GODOT_JOY_XBOX_B = GODOT_JOY_SEGA_B,
- GODOT_JOY_XBOX_A = GODOT_JOY_SEGA_A,
- GODOT_JOY_XBOX_X = GODOT_JOY_SEGA_X,
- GODOT_JOY_XBOX_Y = GODOT_JOY_SEGA_Y,
-
- GODOT_JOY_DS_A = GODOT_JOY_SNES_A,
- GODOT_JOY_DS_B = GODOT_JOY_SNES_B,
- GODOT_JOY_DS_X = GODOT_JOY_SNES_X,
- GODOT_JOY_DS_Y = GODOT_JOY_SNES_Y,
-
- GODOT_JOY_WII_C = GODOT_JOY_BUTTON_5,
- GODOT_JOY_WII_Z = GODOT_JOY_BUTTON_6,
-
- GODOT_JOY_WII_MINUS = GODOT_JOY_BUTTON_9,
- GODOT_JOY_WII_PLUS = GODOT_JOY_BUTTON_10,
-
- // end of history
-
- GODOT_JOY_AXIS_0 = 0,
- GODOT_JOY_AXIS_1 = 1,
- GODOT_JOY_AXIS_2 = 2,
- GODOT_JOY_AXIS_3 = 3,
- GODOT_JOY_AXIS_4 = 4,
- GODOT_JOY_AXIS_5 = 5,
- GODOT_JOY_AXIS_6 = 6,
- GODOT_JOY_AXIS_7 = 7,
- GODOT_JOY_AXIS_MAX = 8,
-
- GODOT_JOY_ANALOG_0_X = GODOT_JOY_AXIS_0,
- GODOT_JOY_ANALOG_0_Y = GODOT_JOY_AXIS_1,
-
- GODOT_JOY_ANALOG_1_X = GODOT_JOY_AXIS_2,
- GODOT_JOY_ANALOG_1_Y = GODOT_JOY_AXIS_3,
-
- GODOT_JOY_ANALOG_2_X = GODOT_JOY_AXIS_4,
- GODOT_JOY_ANALOG_2_Y = GODOT_JOY_AXIS_5,
-
- GODOT_JOY_ANALOG_L2 = GODOT_JOY_AXIS_6,
- GODOT_JOY_ANALOG_R2 = GODOT_JOY_AXIS_7,
-};
-
-#include "../godot.h"
-
-void GDAPI godot_input_event_new(godot_input_event *p_ie);
-
-godot_bool GDAPI godot_input_event_is_pressed(const godot_input_event *p_ie);
-godot_bool GDAPI godot_input_event_is_action(const godot_input_event *p_ie, const godot_string *p_action);
-godot_bool GDAPI godot_input_event_is_action_pressed(const godot_input_event *p_ie, const godot_string *p_action);
-godot_bool GDAPI godot_input_event_is_action_released(const godot_input_event *p_ie, const godot_string *p_action);
-godot_bool GDAPI godot_input_event_is_echo(const godot_input_event *p_ie);
-void GDAPI godot_input_event_set_as_action(godot_input_event *p_ie, const godot_string *p_action, const godot_bool p_pressed);
-
-godot_string GDAPI godot_input_event_as_string(const godot_input_event *p_ie);
-
-// Note:
-// We're returning pointers to the fields in the unions.
-// This is because I'm too lazy to write setter functions
-
-uint32_t GDAPI *godot_input_event_get_id(godot_input_event *p_ie);
-godot_input_event_type GDAPI *godot_input_event_get_type(godot_input_event *p_ie);
-godot_int GDAPI *godot_input_event_get_device(godot_input_event *p_ie);
-
-godot_bool GDAPI *godot_input_event_mod_get_alt(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_mod_get_ctrl(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_mod_get_command(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_mod_get_shift(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_mod_get_meta(godot_input_event *p_event);
-
-uint32_t GDAPI *godot_input_event_key_get_scancode(godot_input_event *p_event);
-uint32_t GDAPI *godot_input_event_key_get_unicode(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_key_get_pressed(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_key_get_echo(godot_input_event *p_event);
-
-float GDAPI *godot_input_event_mouse_get_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_mouse_get_y(godot_input_event *p_event);
-float GDAPI *godot_input_event_mouse_get_global_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_mouse_get_global_y(godot_input_event *p_event);
-godot_int GDAPI *godot_input_event_mouse_get_button_mask(godot_input_event *p_event);
-
-godot_int GDAPI *godot_input_event_mouse_button_get_button_index(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_mouse_button_get_pressed(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_mouse_button_get_doubleclick(godot_input_event *p_event);
-
-float GDAPI *godot_input_event_mouse_motion_get_relative_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_mouse_motion_get_relative_y(godot_input_event *p_event);
-float GDAPI *godot_input_event_mouse_motion_get_speed_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_mouse_motion_get_speed_y(godot_input_event *p_event);
-
-godot_int GDAPI *godot_input_event_joypad_motion_get_axis(godot_input_event *p_event);
-float GDAPI *godot_input_event_joypad_motion_get_axis_value(godot_input_event *p_event);
-
-godot_int GDAPI *godot_input_event_joypad_button_get_button_index(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_joypad_button_get_pressed(godot_input_event *p_event);
-float GDAPI *godot_input_event_joypad_button_get_pressure(godot_input_event *p_event);
-
-godot_int GDAPI *godot_input_event_screen_touch_get_index(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_touch_get_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_touch_get_y(godot_input_event *p_event);
-godot_bool GDAPI *godot_input_event_screen_touch_get_pressed(godot_input_event *p_event);
-
-godot_int GDAPI *godot_input_event_screen_drag_get_index(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_drag_get_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_drag_get_y(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_drag_get_relative_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_drag_get_relative_y(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_drag_get_speed_x(godot_input_event *p_event);
-float GDAPI *godot_input_event_screen_drag_get_speed_y(godot_input_event *p_event);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // GODOT_INPUT_EVENT_H
diff --git a/modules/gdnative/godot/godot_node_path.cpp b/modules/gdnative/godot/godot_node_path.cpp
index a2c9e11699..165688a340 100644
--- a/modules/gdnative/godot/godot_node_path.cpp
+++ b/modules/gdnative/godot/godot_node_path.cpp
@@ -28,91 +28,81 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_node_path.h"
+#include "core/variant.h"
-#include "path_db.h"
+#include "core/path_db.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _node_path_api_anchor() {
-}
-
-#define memnew_placement_custom(m_placement, m_class, m_constr) _post_initialize(new (m_placement, sizeof(m_class), "") m_constr)
-
-// @Bug ?
-// Do I need to memnew_placement when returning strings?
+void _node_path_api_anchor() {}
-void GDAPI godot_node_path_new(godot_node_path *p_np, const godot_string *p_from) {
- NodePath *np = (NodePath *)p_np;
- String *from = (String *)p_from;
- memnew_placement_custom(np, NodePath, NodePath(*from));
+void GDAPI godot_node_path_new(godot_node_path *r_dest, const godot_string *p_from) {
+ NodePath *dest = (NodePath *)r_dest;
+ const String *from = (const String *)p_from;
+ memnew_placement(dest, NodePath(*from));
}
-void GDAPI godot_node_path_copy(godot_node_path *p_np, const godot_node_path *p_from) {
- NodePath *np = (NodePath *)p_np;
- NodePath *from = (NodePath *)p_from;
- *np = *from;
+void GDAPI godot_node_path_destroy(godot_node_path *p_self) {
+ NodePath *self = (NodePath *)p_self;
+ self->~NodePath();
}
-godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_np, const godot_int p_idx) {
- const NodePath *np = (const NodePath *)p_np;
- godot_string str;
- String *s = (String *)&str;
- memnew_placement(s, String);
- *s = np->get_name(p_idx);
- return str;
+godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_self) {
+ godot_string ret;
+ const NodePath *self = (const NodePath *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_np) {
- const NodePath *np = (const NodePath *)p_np;
- return np->get_name_count();
+godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_self) {
+ const NodePath *self = (const NodePath *)p_self;
+ return self->is_absolute();
}
-godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_np) {
- const NodePath *np = (const NodePath *)p_np;
- godot_string str;
- String *s = (String *)&str;
- memnew_placement(s, String);
- *s = np->get_property();
- return str;
+godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_self) {
+ const NodePath *self = (const NodePath *)p_self;
+ return self->get_name_count();
}
-godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_np, const godot_int p_idx) {
- const NodePath *np = (const NodePath *)p_np;
- godot_string str;
- String *s = (String *)&str;
- memnew_placement(s, String);
- *s = np->get_subname(p_idx);
- return str;
+godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_self, const godot_int p_idx) {
+ godot_string dest;
+ const NodePath *self = (const NodePath *)p_self;
+
+ memnew_placement(&dest, String(self->get_name(p_idx)));
+ return dest;
}
-godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_np) {
- const NodePath *np = (const NodePath *)p_np;
- return np->get_subname_count();
+godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self) {
+ const NodePath *self = (const NodePath *)p_self;
+ return self->get_subname_count();
}
-godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_np) {
- const NodePath *np = (const NodePath *)p_np;
- return np->is_absolute();
+godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx) {
+ godot_string dest;
+ const NodePath *self = (const NodePath *)p_self;
+
+ memnew_placement(&dest, String(self->get_subname(p_idx)));
+ return dest;
}
-godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_np) {
- const NodePath *np = (const NodePath *)p_np;
- return np->is_empty();
+godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self) {
+ godot_string dest;
+ const NodePath *self = (const NodePath *)p_self;
+ memnew_placement(&dest, String(self->get_property()));
+ return dest;
}
-godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_np) {
- const NodePath *np = (const NodePath *)p_np;
- godot_string str;
- String *s = (String *)&str;
- memnew_placement(s, String);
- *s = *np;
- return str;
+godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self) {
+ const NodePath *self = (const NodePath *)p_self;
+ return self->is_empty();
}
-void GDAPI godot_node_path_destroy(godot_node_path *p_np) {
- ((NodePath *)p_np)->~NodePath();
+godot_bool GDAPI godot_node_path_operator_equal(const godot_node_path *p_self, const godot_node_path *p_b) {
+ const NodePath *self = (const NodePath *)p_self;
+ const NodePath *b = (const NodePath *)p_b;
+ return *self == *b;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_node_path.h b/modules/gdnative/godot/godot_node_path.h
index c5f313d190..fb94bd3822 100644
--- a/modules/gdnative/godot/godot_node_path.h
+++ b/modules/gdnative/godot/godot_node_path.h
@@ -37,29 +37,35 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_NODE_PATH_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_NODE_PATH_TYPE_DEFINED
typedef struct godot_node_path {
uint8_t _dont_touch_that[8];
} godot_node_path;
#endif
#include "../godot.h"
+#include "godot_string.h"
-void GDAPI godot_node_path_new(godot_node_path *p_np, const godot_string *p_from);
-void GDAPI godot_node_path_copy(godot_node_path *p_np, const godot_node_path *p_from);
+void GDAPI godot_node_path_new(godot_node_path *r_dest, const godot_string *p_from);
+void GDAPI godot_node_path_destroy(godot_node_path *p_self);
-godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_np, const godot_int p_idx);
-godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_np);
+godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_self);
-godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_np);
-godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_np, const godot_int p_idx);
-godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_np);
+godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_self);
-godot_bool GDAPI godot_node_path_is_absolute(const godot_node_path *p_np);
-godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_np);
+godot_int GDAPI godot_node_path_get_name_count(const godot_node_path *p_self);
-godot_string GDAPI godot_node_path_as_string(const godot_node_path *p_np);
+godot_string GDAPI godot_node_path_get_name(const godot_node_path *p_self, const godot_int p_idx);
-void GDAPI godot_node_path_destroy(godot_node_path *p_np);
+godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self);
+
+godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx);
+
+godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self);
+
+godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self);
+
+godot_bool GDAPI godot_node_path_operator_equal(const godot_node_path *p_self, const godot_node_path *p_b);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_plane.cpp b/modules/gdnative/godot/godot_plane.cpp
index 38329ef709..68adbd4a98 100644
--- a/modules/gdnative/godot/godot_plane.cpp
+++ b/modules/gdnative/godot/godot_plane.cpp
@@ -28,48 +28,149 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_plane.h"
+#include "core/variant.h"
-#include "math/plane.h"
+#include "core/math/plane.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _plane_api_anchor() {
+void _plane_api_anchor() {}
+
+void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d) {
+
+ Plane *dest = (Plane *)r_dest;
+ *dest = Plane(p_a, p_b, p_c, p_d);
}
-void GDAPI godot_plane_new(godot_plane *p_pl) {
- Plane *pl = (Plane *)p_pl;
- *pl = Plane();
+void GDAPI godot_plane_new_with_vectors(godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3) {
+ const Vector3 *v1 = (const Vector3 *)p_v1;
+ const Vector3 *v2 = (const Vector3 *)p_v2;
+ const Vector3 *v3 = (const Vector3 *)p_v3;
+ Plane *dest = (Plane *)r_dest;
+ *dest = Plane(*v1, *v2, *v3);
}
-void GDAPI godot_plane_new_with_normal(godot_plane *p_pl, const godot_vector3 *p_normal, const godot_real p_d) {
- Plane *pl = (Plane *)p_pl;
+void GDAPI godot_plane_new_with_normal(godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d) {
const Vector3 *normal = (const Vector3 *)p_normal;
- *pl = Plane(*normal, p_d);
+ Plane *dest = (Plane *)r_dest;
+ *dest = Plane(*normal, p_d);
+}
+
+godot_string GDAPI godot_plane_as_string(const godot_plane *p_self) {
+ godot_string ret;
+ const Plane *self = (const Plane *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
+}
+
+godot_plane GDAPI godot_plane_normalized(const godot_plane *p_self) {
+ godot_plane dest;
+ const Plane *self = (const Plane *)p_self;
+ *((Plane *)&dest) = self->normalized();
+ return dest;
+}
+
+godot_vector3 GDAPI godot_plane_center(const godot_plane *p_self) {
+ godot_vector3 dest;
+ const Plane *self = (const Plane *)p_self;
+ *((Vector3 *)&dest) = self->center();
+ return dest;
+}
+
+godot_vector3 GDAPI godot_plane_get_any_point(const godot_plane *p_self) {
+ godot_vector3 dest;
+ const Plane *self = (const Plane *)p_self;
+ *((Vector3 *)&dest) = self->get_any_point();
+ return dest;
+}
+
+godot_bool GDAPI godot_plane_is_point_over(const godot_plane *p_self, const godot_vector3 *p_point) {
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 *point = (const Vector3 *)p_point;
+ return self->is_point_over(*point);
+}
+
+godot_real GDAPI godot_plane_distance_to(const godot_plane *p_self, const godot_vector3 *p_point) {
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 *point = (const Vector3 *)p_point;
+ return self->distance_to(*point);
+}
+
+godot_bool GDAPI godot_plane_has_point(const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon) {
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 *point = (const Vector3 *)p_point;
+ return self->has_point(*point, p_epsilon);
+}
+
+godot_vector3 GDAPI godot_plane_project(const godot_plane *p_self, const godot_vector3 *p_point) {
+ godot_vector3 dest;
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 *point = (const Vector3 *)p_point;
+ *((Vector3 *)&dest) = self->project(*point);
+ return dest;
+}
+
+godot_bool GDAPI godot_plane_intersect_3(const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c) {
+ const Plane *self = (const Plane *)p_self;
+ const Plane *b = (const Plane *)p_b;
+ const Plane *c = (const Plane *)p_c;
+ Vector3 *dest = (Vector3 *)r_dest;
+ return self->intersect_3(*b, *c, dest);
+}
+
+godot_bool GDAPI godot_plane_intersects_ray(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir) {
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 *from = (const Vector3 *)p_from;
+ const Vector3 *dir = (const Vector3 *)p_dir;
+ Vector3 *dest = (Vector3 *)r_dest;
+ return self->intersects_ray(*from, *dir, dest);
+}
+
+godot_bool GDAPI godot_plane_intersects_segment(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end) {
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 *begin = (const Vector3 *)p_begin;
+ const Vector3 *end = (const Vector3 *)p_end;
+ Vector3 *dest = (Vector3 *)r_dest;
+ return self->intersects_segment(*begin, *end, dest);
+}
+
+godot_plane GDAPI godot_plane_operator_neg(const godot_plane *p_self) {
+ godot_plane raw_dest;
+ Plane *dest = (Plane *)&raw_dest;
+ const Plane *self = (const Plane *)p_self;
+ *dest = -(*self);
+ return raw_dest;
+}
+
+godot_bool GDAPI godot_plane_operator_equal(const godot_plane *p_self, const godot_plane *p_b) {
+ const Plane *self = (const Plane *)p_self;
+ const Plane *b = (const Plane *)p_b;
+ return *self == *b;
}
-void GDAPI godot_plane_set_normal(godot_plane *p_pl, const godot_vector3 *p_normal) {
- Plane *pl = (Plane *)p_pl;
+void GDAPI godot_plane_set_normal(godot_plane *p_self, const godot_vector3 *p_normal) {
+ Plane *self = (Plane *)p_self;
const Vector3 *normal = (const Vector3 *)p_normal;
- pl->set_normal(*normal);
+ self->set_normal(*normal);
}
-godot_vector3 godot_plane_get_normal(const godot_plane *p_pl) {
- const Plane *pl = (const Plane *)p_pl;
- const Vector3 normal = pl->get_normal();
+godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_self) {
+ const Plane *self = (const Plane *)p_self;
+ const Vector3 normal = self->get_normal();
godot_vector3 *v3 = (godot_vector3 *)&normal;
return *v3;
}
-void GDAPI godot_plane_set_d(godot_plane *p_pl, const godot_real p_d) {
- Plane *pl = (Plane *)p_pl;
- pl->d = p_d;
+godot_real GDAPI godot_plane_get_d(const godot_plane *p_self) {
+ const Plane *self = (const Plane *)p_self;
+ return self->d;
}
-godot_real GDAPI godot_plane_get_d(const godot_plane *p_pl) {
- const Plane *pl = (const Plane *)p_pl;
- return pl->d;
+void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d) {
+ Plane *self = (Plane *)p_self;
+ self->d = p_d;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_plane.h b/modules/gdnative/godot/godot_plane.h
index c98e45c9cb..cfc955f277 100644
--- a/modules/gdnative/godot/godot_plane.h
+++ b/modules/gdnative/godot/godot_plane.h
@@ -37,27 +37,52 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_PLANE_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_PLANE_TYPE_DEFINED
typedef struct godot_plane {
uint8_t _dont_touch_that[16];
} godot_plane;
#endif
+#include "../godot.h"
#include "godot_vector3.h"
-void GDAPI godot_plane_new(godot_plane *p_pl);
-void GDAPI godot_plane_new_with_normal(godot_plane *p_pl, const godot_vector3 *p_normal, const godot_real p_d);
+void GDAPI godot_plane_new_with_reals(godot_plane *r_dest, const godot_real p_a, const godot_real p_b, const godot_real p_c, const godot_real p_d);
+void GDAPI godot_plane_new_with_vectors(godot_plane *r_dest, const godot_vector3 *p_v1, const godot_vector3 *p_v2, const godot_vector3 *p_v3);
+void GDAPI godot_plane_new_with_normal(godot_plane *r_dest, const godot_vector3 *p_normal, const godot_real p_d);
-// @Incomplete
-// These are additional valid constructors
-// _FORCE_INLINE_ Plane(const Vector3 &p_normal, real_t p_d);
-// _FORCE_INLINE_ Plane(const Vector3 &p_point, const Vector3& p_normal);
-// _FORCE_INLINE_ Plane(const Vector3 &p_point1, const Vector3 &p_point2,const Vector3 &p_point3,ClockDirection p_dir = CLOCKWISE);
+godot_string GDAPI godot_plane_as_string(const godot_plane *p_self);
-void GDAPI godot_plane_set_normal(godot_plane *p_pl, const godot_vector3 *p_normal);
-godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_pl);
+godot_plane GDAPI godot_plane_normalized(const godot_plane *p_self);
-godot_real GDAPI godot_plane_get_d(const godot_plane *p_pl);
-void GDAPI godot_plane_set_d(godot_plane *p_pl, const godot_real p_d);
+godot_vector3 GDAPI godot_plane_center(const godot_plane *p_self);
+
+godot_vector3 GDAPI godot_plane_get_any_point(const godot_plane *p_self);
+
+godot_bool GDAPI godot_plane_is_point_over(const godot_plane *p_self, const godot_vector3 *p_point);
+
+godot_real GDAPI godot_plane_distance_to(const godot_plane *p_self, const godot_vector3 *p_point);
+
+godot_bool GDAPI godot_plane_has_point(const godot_plane *p_self, const godot_vector3 *p_point, const godot_real p_epsilon);
+
+godot_vector3 GDAPI godot_plane_project(const godot_plane *p_self, const godot_vector3 *p_point);
+
+godot_bool GDAPI godot_plane_intersect_3(const godot_plane *p_self, godot_vector3 *r_dest, const godot_plane *p_b, const godot_plane *p_c);
+
+godot_bool GDAPI godot_plane_intersects_ray(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_from, const godot_vector3 *p_dir);
+
+godot_bool GDAPI godot_plane_intersects_segment(const godot_plane *p_self, godot_vector3 *r_dest, const godot_vector3 *p_begin, const godot_vector3 *p_end);
+
+godot_plane GDAPI godot_plane_operator_neg(const godot_plane *p_self);
+
+godot_bool GDAPI godot_plane_operator_equal(const godot_plane *p_self, const godot_plane *p_b);
+
+void GDAPI godot_plane_set_normal(godot_plane *p_self, const godot_vector3 *p_normal);
+
+godot_vector3 GDAPI godot_plane_get_normal(const godot_plane *p_self);
+
+godot_real GDAPI godot_plane_get_d(const godot_plane *p_self);
+
+void GDAPI godot_plane_set_d(godot_plane *p_self, const godot_real p_d);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_pool_arrays.cpp b/modules/gdnative/godot/godot_pool_arrays.cpp
index 93e9a9e9dc..10d5d6d939 100644
--- a/modules/gdnative/godot/godot_pool_arrays.cpp
+++ b/modules/gdnative/godot/godot_pool_arrays.cpp
@@ -101,13 +101,13 @@ void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_pba, const godot_i
pba->set(p_idx, p_data);
}
-uint8_t GDAPI godot_pool_byte_array_get(godot_pool_byte_array *p_pba, const godot_int p_idx) {
- PoolVector<uint8_t> *pba = (PoolVector<uint8_t> *)p_pba;
+uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_pba, const godot_int p_idx) {
+ const PoolVector<uint8_t> *pba = (const PoolVector<uint8_t> *)p_pba;
return pba->get(p_idx);
}
-godot_int GDAPI godot_pool_byte_array_size(godot_pool_byte_array *p_pba) {
- PoolVector<uint8_t> *pba = (PoolVector<uint8_t> *)p_pba;
+godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_pba) {
+ const PoolVector<uint8_t> *pba = (const PoolVector<uint8_t> *)p_pba;
return pba->size();
}
@@ -174,13 +174,13 @@ void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_pba, const godot_int
pba->set(p_idx, p_data);
}
-godot_int GDAPI godot_pool_int_array_get(godot_pool_int_array *p_pba, const godot_int p_idx) {
- PoolVector<godot_int> *pba = (PoolVector<godot_int> *)p_pba;
+godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_pba, const godot_int p_idx) {
+ const PoolVector<godot_int> *pba = (const PoolVector<godot_int> *)p_pba;
return pba->get(p_idx);
}
-godot_int GDAPI godot_pool_int_array_size(godot_pool_int_array *p_pba) {
- PoolVector<godot_int> *pba = (PoolVector<godot_int> *)p_pba;
+godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_pba) {
+ const PoolVector<godot_int> *pba = (const PoolVector<godot_int> *)p_pba;
return pba->size();
}
@@ -247,13 +247,13 @@ void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_pba, const godot_i
pba->set(p_idx, p_data);
}
-godot_real GDAPI godot_pool_real_array_get(godot_pool_real_array *p_pba, const godot_int p_idx) {
- PoolVector<godot_real> *pba = (PoolVector<godot_real> *)p_pba;
+godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_pba, const godot_int p_idx) {
+ const PoolVector<godot_real> *pba = (const PoolVector<godot_real> *)p_pba;
return pba->get(p_idx);
}
-godot_int GDAPI godot_pool_real_array_size(godot_pool_real_array *p_pba) {
- PoolVector<godot_real> *pba = (PoolVector<godot_real> *)p_pba;
+godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_pba) {
+ const PoolVector<godot_real> *pba = (const PoolVector<godot_real> *)p_pba;
return pba->size();
}
@@ -324,8 +324,8 @@ void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_pba, const god
pba->set(p_idx, s);
}
-godot_string GDAPI godot_pool_string_array_get(godot_pool_string_array *p_pba, const godot_int p_idx) {
- PoolVector<String> *pba = (PoolVector<String> *)p_pba;
+godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_pba, const godot_int p_idx) {
+ const PoolVector<String> *pba = (const PoolVector<String> *)p_pba;
godot_string str;
String *s = (String *)&str;
memnew_placement(s, String);
@@ -333,8 +333,8 @@ godot_string GDAPI godot_pool_string_array_get(godot_pool_string_array *p_pba, c
return str;
}
-godot_int GDAPI godot_pool_string_array_size(godot_pool_string_array *p_pba) {
- PoolVector<String> *pba = (PoolVector<String> *)p_pba;
+godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_pba) {
+ const PoolVector<String> *pba = (const PoolVector<String> *)p_pba;
return pba->size();
}
@@ -405,16 +405,16 @@ void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_pba, const g
pba->set(p_idx, s);
}
-godot_vector2 GDAPI godot_pool_vector2_array_get(godot_pool_vector2_array *p_pba, const godot_int p_idx) {
- PoolVector<Vector2> *pba = (PoolVector<Vector2> *)p_pba;
+godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_pba, const godot_int p_idx) {
+ const PoolVector<Vector2> *pba = (const PoolVector<Vector2> *)p_pba;
godot_vector2 v;
Vector2 *s = (Vector2 *)&v;
*s = pba->get(p_idx);
return v;
}
-godot_int GDAPI godot_pool_vector2_array_size(godot_pool_vector2_array *p_pba) {
- PoolVector<Vector2> *pba = (PoolVector<Vector2> *)p_pba;
+godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_pba) {
+ const PoolVector<Vector2> *pba = (const PoolVector<Vector2> *)p_pba;
return pba->size();
}
@@ -485,16 +485,16 @@ void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_pba, const g
pba->set(p_idx, s);
}
-godot_vector3 GDAPI godot_pool_vector3_array_get(godot_pool_vector3_array *p_pba, const godot_int p_idx) {
- PoolVector<Vector3> *pba = (PoolVector<Vector3> *)p_pba;
+godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_pba, const godot_int p_idx) {
+ const PoolVector<Vector3> *pba = (const PoolVector<Vector3> *)p_pba;
godot_vector3 v;
Vector3 *s = (Vector3 *)&v;
*s = pba->get(p_idx);
return v;
}
-godot_int GDAPI godot_pool_vector3_array_size(godot_pool_vector3_array *p_pba) {
- PoolVector<Vector3> *pba = (PoolVector<Vector3> *)p_pba;
+godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_pba) {
+ const PoolVector<Vector3> *pba = (const PoolVector<Vector3> *)p_pba;
return pba->size();
}
@@ -565,16 +565,16 @@ void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_pba, const godot
pba->set(p_idx, s);
}
-godot_color GDAPI godot_pool_color_array_get(godot_pool_color_array *p_pba, const godot_int p_idx) {
- PoolVector<Color> *pba = (PoolVector<Color> *)p_pba;
+godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_pba, const godot_int p_idx) {
+ const PoolVector<Color> *pba = (const PoolVector<Color> *)p_pba;
godot_color v;
Color *s = (Color *)&v;
*s = pba->get(p_idx);
return v;
}
-godot_int GDAPI godot_pool_color_array_size(godot_pool_color_array *p_pba) {
- PoolVector<Color> *pba = (PoolVector<Color> *)p_pba;
+godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_pba) {
+ const PoolVector<Color> *pba = (const PoolVector<Color> *)p_pba;
return pba->size();
}
diff --git a/modules/gdnative/godot/godot_pool_arrays.h b/modules/gdnative/godot/godot_pool_arrays.h
index ec9185f6f3..015be65c3e 100644
--- a/modules/gdnative/godot/godot_pool_arrays.h
+++ b/modules/gdnative/godot/godot_pool_arrays.h
@@ -92,9 +92,12 @@ typedef struct godot_pool_color_array {
} godot_pool_color_array;
#endif
-#include "../godot.h"
-
#include "godot_array.h"
+#include "godot_color.h"
+#include "godot_vector2.h"
+#include "godot_vector3.h"
+
+#include "../godot.h"
// byte
@@ -116,9 +119,9 @@ void GDAPI godot_pool_byte_array_remove(godot_pool_byte_array *p_pba, const godo
void GDAPI godot_pool_byte_array_resize(godot_pool_byte_array *p_pba, const godot_int p_size);
void GDAPI godot_pool_byte_array_set(godot_pool_byte_array *p_pba, const godot_int p_idx, const uint8_t p_data);
-uint8_t GDAPI godot_pool_byte_array_get(godot_pool_byte_array *p_pba, const godot_int p_idx);
+uint8_t GDAPI godot_pool_byte_array_get(const godot_pool_byte_array *p_pba, const godot_int p_idx);
-godot_int GDAPI godot_pool_byte_array_size(godot_pool_byte_array *p_pba);
+godot_int GDAPI godot_pool_byte_array_size(const godot_pool_byte_array *p_pba);
void GDAPI godot_pool_byte_array_destroy(godot_pool_byte_array *p_pba);
@@ -142,9 +145,9 @@ void GDAPI godot_pool_int_array_remove(godot_pool_int_array *p_pia, const godot_
void GDAPI godot_pool_int_array_resize(godot_pool_int_array *p_pia, const godot_int p_size);
void GDAPI godot_pool_int_array_set(godot_pool_int_array *p_pia, const godot_int p_idx, const godot_int p_data);
-godot_int GDAPI godot_pool_int_array_get(godot_pool_int_array *p_pia, const godot_int p_idx);
+godot_int GDAPI godot_pool_int_array_get(const godot_pool_int_array *p_pia, const godot_int p_idx);
-godot_int GDAPI godot_pool_int_array_size(godot_pool_int_array *p_pia);
+godot_int GDAPI godot_pool_int_array_size(const godot_pool_int_array *p_pia);
void GDAPI godot_pool_int_array_destroy(godot_pool_int_array *p_pia);
@@ -168,9 +171,9 @@ void GDAPI godot_pool_real_array_remove(godot_pool_real_array *p_pra, const godo
void GDAPI godot_pool_real_array_resize(godot_pool_real_array *p_pra, const godot_int p_size);
void GDAPI godot_pool_real_array_set(godot_pool_real_array *p_pra, const godot_int p_idx, const godot_real p_data);
-godot_real GDAPI godot_pool_real_array_get(godot_pool_real_array *p_pra, const godot_int p_idx);
+godot_real GDAPI godot_pool_real_array_get(const godot_pool_real_array *p_pra, const godot_int p_idx);
-godot_int GDAPI godot_pool_real_array_size(godot_pool_real_array *p_pra);
+godot_int GDAPI godot_pool_real_array_size(const godot_pool_real_array *p_pra);
void GDAPI godot_pool_real_array_destroy(godot_pool_real_array *p_pra);
@@ -194,9 +197,9 @@ void GDAPI godot_pool_string_array_remove(godot_pool_string_array *p_psa, const
void GDAPI godot_pool_string_array_resize(godot_pool_string_array *p_psa, const godot_int p_size);
void GDAPI godot_pool_string_array_set(godot_pool_string_array *p_psa, const godot_int p_idx, const godot_string *p_data);
-godot_string GDAPI godot_pool_string_array_get(godot_pool_string_array *p_psa, const godot_int p_idx);
+godot_string GDAPI godot_pool_string_array_get(const godot_pool_string_array *p_psa, const godot_int p_idx);
-godot_int GDAPI godot_pool_string_array_size(godot_pool_string_array *p_psa);
+godot_int GDAPI godot_pool_string_array_size(const godot_pool_string_array *p_psa);
void GDAPI godot_pool_string_array_destroy(godot_pool_string_array *p_psa);
@@ -220,9 +223,9 @@ void GDAPI godot_pool_vector2_array_remove(godot_pool_vector2_array *p_pv2a, con
void GDAPI godot_pool_vector2_array_resize(godot_pool_vector2_array *p_pv2a, const godot_int p_size);
void GDAPI godot_pool_vector2_array_set(godot_pool_vector2_array *p_pv2a, const godot_int p_idx, const godot_vector2 *p_data);
-godot_vector2 GDAPI godot_pool_vector2_array_get(godot_pool_vector2_array *p_pv2a, const godot_int p_idx);
+godot_vector2 GDAPI godot_pool_vector2_array_get(const godot_pool_vector2_array *p_pv2a, const godot_int p_idx);
-godot_int GDAPI godot_pool_vector2_array_size(godot_pool_vector2_array *p_pv2a);
+godot_int GDAPI godot_pool_vector2_array_size(const godot_pool_vector2_array *p_pv2a);
void GDAPI godot_pool_vector2_array_destroy(godot_pool_vector2_array *p_pv2a);
@@ -246,9 +249,9 @@ void GDAPI godot_pool_vector3_array_remove(godot_pool_vector3_array *p_pv3a, con
void GDAPI godot_pool_vector3_array_resize(godot_pool_vector3_array *p_pv3a, const godot_int p_size);
void GDAPI godot_pool_vector3_array_set(godot_pool_vector3_array *p_pv3a, const godot_int p_idx, const godot_vector3 *p_data);
-godot_vector3 GDAPI godot_pool_vector3_array_get(godot_pool_vector3_array *p_pv3a, const godot_int p_idx);
+godot_vector3 GDAPI godot_pool_vector3_array_get(const godot_pool_vector3_array *p_pv3a, const godot_int p_idx);
-godot_int GDAPI godot_pool_vector3_array_size(godot_pool_vector3_array *p_pv3a);
+godot_int GDAPI godot_pool_vector3_array_size(const godot_pool_vector3_array *p_pv3a);
void GDAPI godot_pool_vector3_array_destroy(godot_pool_vector3_array *p_pv3a);
@@ -272,9 +275,9 @@ void GDAPI godot_pool_color_array_remove(godot_pool_color_array *p_pca, const go
void GDAPI godot_pool_color_array_resize(godot_pool_color_array *p_pca, const godot_int p_size);
void GDAPI godot_pool_color_array_set(godot_pool_color_array *p_pca, const godot_int p_idx, const godot_color *p_data);
-godot_color GDAPI godot_pool_color_array_get(godot_pool_color_array *p_pca, const godot_int p_idx);
+godot_color GDAPI godot_pool_color_array_get(const godot_pool_color_array *p_pca, const godot_int p_idx);
-godot_int GDAPI godot_pool_color_array_size(godot_pool_color_array *p_pca);
+godot_int GDAPI godot_pool_color_array_size(const godot_pool_color_array *p_pca);
void GDAPI godot_pool_color_array_destroy(godot_pool_color_array *p_pca);
diff --git a/modules/gdnative/godot/godot_quat.cpp b/modules/gdnative/godot/godot_quat.cpp
index 7c3a71dfc0..4d38c4987c 100644
--- a/modules/gdnative/godot/godot_quat.cpp
+++ b/modules/gdnative/godot/godot_quat.cpp
@@ -28,77 +28,150 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_quat.h"
+#include "core/variant.h"
-#include "math/quat.h"
+#include "core/math/quat.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _quat_api_anchor() {
+void _quat_api_anchor() {}
+
+void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w) {
+
+ Quat *dest = (Quat *)r_dest;
+ *dest = Quat(p_x, p_y, p_z, p_w);
}
-void GDAPI godot_quat_new(godot_quat *p_quat) {
- Quat *quat = (Quat *)p_quat;
- *quat = Quat();
+void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle) {
+ const Vector3 *axis = (const Vector3 *)p_axis;
+ Quat *dest = (Quat *)r_dest;
+ *dest = Quat(*axis, p_angle);
}
-void GDAPI godot_quat_new_with_elements(godot_quat *p_quat, const godot_real x, const godot_real y, const godot_real z, const godot_real w) {
- Quat *quat = (Quat *)p_quat;
- *quat = Quat(x, y, z, w);
+godot_string GDAPI godot_quat_as_string(const godot_quat *p_self) {
+ godot_string ret;
+ const Quat *self = (const Quat *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-void GDAPI godot_quat_new_with_rotation(godot_quat *p_quat, const godot_vector3 *p_axis, const godot_real p_angle) {
- Quat *quat = (Quat *)p_quat;
- const Vector3 *axis = (const Vector3 *)p_axis;
- *quat = Quat(*axis, p_angle);
-}
-
-void GDAPI godot_quat_new_with_shortest_arc(godot_quat *p_quat, const godot_vector3 *p_v0, const godot_vector3 *p_v1) {
- Quat *quat = (Quat *)p_quat;
- const Vector3 *v0 = (const Vector3 *)p_v0;
- const Vector3 *v1 = (const Vector3 *)p_v1;
- *quat = Quat(*v0, *v1);
-}
-
-godot_vector3 GDAPI godot_quat_get_euler(const godot_quat *p_quat) {
- Quat *quat = (Quat *)p_quat;
- Vector3 euler = quat->get_euler();
- return *(godot_vector3 *)&euler;
-}
-
-void GDAPI godot_quat_set_euler(godot_quat *p_quat, const godot_vector3 *p_euler) {
- Quat *quat = (Quat *)p_quat;
- const Vector3 *euler = (const Vector3 *)p_euler;
- quat->set_euler(*euler);
-}
-
-godot_real GDAPI *godot_quat_index(godot_quat *p_quat, const godot_int p_idx) {
- Quat *quat = (Quat *)p_quat;
- switch (p_idx) {
- case 0:
- return &quat->x;
- case 1:
- return &quat->y;
- case 2:
- return &quat->z;
- default:
- return &quat->y;
- }
-}
-
-godot_real GDAPI godot_quat_const_index(const godot_quat *p_quat, const godot_int p_idx) {
- const Quat *quat = (const Quat *)p_quat;
- switch (p_idx) {
- case 0:
- return quat->x;
- case 1:
- return quat->y;
- case 2:
- return quat->z;
- default:
- return quat->y;
- }
+godot_real GDAPI godot_quat_length(const godot_quat *p_self) {
+ const Quat *self = (const Quat *)p_self;
+ return self->length();
+}
+
+godot_real GDAPI godot_quat_length_squared(const godot_quat *p_self) {
+ const Quat *self = (const Quat *)p_self;
+ return self->length_squared();
+}
+
+godot_quat GDAPI godot_quat_normalized(const godot_quat *p_self) {
+ godot_quat dest;
+ const Quat *self = (const Quat *)p_self;
+ *((Quat *)&dest) = self->normalized();
+ return dest;
+}
+
+godot_bool GDAPI godot_quat_is_normalized(const godot_quat *p_self) {
+ const Quat *self = (const Quat *)p_self;
+ return self->is_normalized();
+}
+
+godot_quat GDAPI godot_quat_inverse(const godot_quat *p_self) {
+ godot_quat dest;
+ const Quat *self = (const Quat *)p_self;
+ *((Quat *)&dest) = self->inverse();
+ return dest;
+}
+
+godot_real GDAPI godot_quat_dot(const godot_quat *p_self, const godot_quat *p_b) {
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ return self->dot(*b);
+}
+
+godot_vector3 GDAPI godot_quat_xform(const godot_quat *p_self, const godot_vector3 *p_v) {
+ godot_vector3 dest;
+ const Quat *self = (const Quat *)p_self;
+ const Vector3 *v = (const Vector3 *)p_v;
+ *((Vector3 *)&dest) = self->xform(*v);
+ return dest;
+}
+
+godot_quat GDAPI godot_quat_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) {
+ godot_quat dest;
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ *((Quat *)&dest) = self->slerp(*b, p_t);
+ return dest;
+}
+
+godot_quat GDAPI godot_quat_slerpni(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t) {
+ godot_quat dest;
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ *((Quat *)&dest) = self->slerpni(*b, p_t);
+ return dest;
+}
+
+godot_quat GDAPI godot_quat_cubic_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t) {
+ godot_quat dest;
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ const Quat *pre_a = (const Quat *)p_pre_a;
+ const Quat *post_b = (const Quat *)p_post_b;
+ *((Quat *)&dest) = self->cubic_slerp(*b, *pre_a, *post_b, p_t);
+ return dest;
+}
+
+godot_quat GDAPI godot_quat_operator_multiply(const godot_quat *p_self, const godot_real p_b) {
+ godot_quat raw_dest;
+ Quat *dest = (Quat *)&raw_dest;
+ const Quat *self = (const Quat *)p_self;
+ *dest = *self * p_b;
+ return raw_dest;
+}
+
+godot_quat GDAPI godot_quat_operator_add(const godot_quat *p_self, const godot_quat *p_b) {
+ godot_quat raw_dest;
+ Quat *dest = (Quat *)&raw_dest;
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ *dest = *self + *b;
+ return raw_dest;
+}
+
+godot_quat GDAPI godot_quat_operator_substract(const godot_quat *p_self, const godot_quat *p_b) {
+ godot_quat raw_dest;
+ Quat *dest = (Quat *)&raw_dest;
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ *dest = *self - *b;
+ return raw_dest;
+}
+
+godot_quat GDAPI godot_quat_operator_divide(const godot_quat *p_self, const godot_real p_b) {
+ godot_quat raw_dest;
+ Quat *dest = (Quat *)&raw_dest;
+ const Quat *self = (const Quat *)p_self;
+ *dest = *self / p_b;
+ return raw_dest;
+}
+
+godot_bool GDAPI godot_quat_operator_equal(const godot_quat *p_self, const godot_quat *p_b) {
+ const Quat *self = (const Quat *)p_self;
+ const Quat *b = (const Quat *)p_b;
+ return *self == *b;
+}
+
+godot_quat GDAPI godot_quat_operator_neg(const godot_quat *p_self) {
+ godot_quat raw_dest;
+ Quat *dest = (Quat *)&raw_dest;
+ const Quat *self = (const Quat *)p_self;
+ *dest = -(*self);
+ return raw_dest;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_quat.h b/modules/gdnative/godot/godot_quat.h
index 35b1acd3ed..6bdc33accf 100644
--- a/modules/gdnative/godot/godot_quat.h
+++ b/modules/gdnative/godot/godot_quat.h
@@ -37,23 +37,51 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED
typedef struct godot_quat {
uint8_t _dont_touch_that[16];
} godot_quat;
#endif
#include "../godot.h"
+#include "godot_vector3.h"
-void GDAPI godot_quat_new(godot_quat *p_quat);
-void GDAPI godot_quat_new_with_elements(godot_quat *p_quat, const godot_real x, const godot_real y, const godot_real z, const godot_real w);
-void GDAPI godot_quat_new_with_rotation(godot_quat *p_quat, const godot_vector3 *p_axis, const godot_real p_angle);
-void GDAPI godot_quat_new_with_shortest_arc(godot_quat *p_quat, const godot_vector3 *p_v0, const godot_vector3 *p_v1);
+void GDAPI godot_quat_new(godot_quat *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z, const godot_real p_w);
+void GDAPI godot_quat_new_with_axis_angle(godot_quat *r_dest, const godot_vector3 *p_axis, const godot_real p_angle);
-godot_vector3 GDAPI godot_quat_get_euler(const godot_quat *p_quat);
-void GDAPI godot_quat_set_euler(godot_quat *p_quat, const godot_vector3 *p_euler);
+godot_string GDAPI godot_quat_as_string(const godot_quat *p_self);
-godot_real GDAPI *godot_quat_index(godot_quat *p_quat, const godot_int p_idx);
-godot_real GDAPI godot_quat_const_index(const godot_quat *p_quat, const godot_int p_idx);
+godot_real GDAPI godot_quat_length(const godot_quat *p_self);
+
+godot_real GDAPI godot_quat_length_squared(const godot_quat *p_self);
+
+godot_quat GDAPI godot_quat_normalized(const godot_quat *p_self);
+
+godot_bool GDAPI godot_quat_is_normalized(const godot_quat *p_self);
+
+godot_quat GDAPI godot_quat_inverse(const godot_quat *p_self);
+
+godot_real GDAPI godot_quat_dot(const godot_quat *p_self, const godot_quat *p_b);
+
+godot_vector3 GDAPI godot_quat_xform(const godot_quat *p_self, const godot_vector3 *p_v);
+
+godot_quat GDAPI godot_quat_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t);
+
+godot_quat GDAPI godot_quat_slerpni(const godot_quat *p_self, const godot_quat *p_b, const godot_real p_t);
+
+godot_quat GDAPI godot_quat_cubic_slerp(const godot_quat *p_self, const godot_quat *p_b, const godot_quat *p_pre_a, const godot_quat *p_post_b, const godot_real p_t);
+
+godot_quat GDAPI godot_quat_operator_multiply(const godot_quat *p_self, const godot_real p_b);
+
+godot_quat GDAPI godot_quat_operator_add(const godot_quat *p_self, const godot_quat *p_b);
+
+godot_quat GDAPI godot_quat_operator_substract(const godot_quat *p_self, const godot_quat *p_b);
+
+godot_quat GDAPI godot_quat_operator_divide(const godot_quat *p_self, const godot_real p_b);
+
+godot_bool GDAPI godot_quat_operator_equal(const godot_quat *p_self, const godot_quat *p_b);
+
+godot_quat GDAPI godot_quat_operator_neg(const godot_quat *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_rect2.cpp b/modules/gdnative/godot/godot_rect2.cpp
index b19096b79e..eea95ca6fe 100644
--- a/modules/gdnative/godot/godot_rect2.cpp
+++ b/modules/gdnative/godot/godot_rect2.cpp
@@ -28,48 +28,128 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_rect2.h"
+#include "core/variant.h"
-#include "math/math_2d.h"
+#include "core/math/math_2d.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _rect2_api_anchor() {
+void _rect2_api_anchor() {}
+
+void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size) {
+ const Vector2 *pos = (const Vector2 *)p_pos;
+ const Vector2 *size = (const Vector2 *)p_size;
+ Rect2 *dest = (Rect2 *)r_dest;
+ *dest = Rect2(*pos, *size);
}
-void GDAPI godot_rect2_new(godot_rect2 *p_rect) {
- Rect2 *rect = (Rect2 *)p_rect;
- *rect = Rect2();
+void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height) {
+
+ Rect2 *dest = (Rect2 *)r_dest;
+ *dest = Rect2(p_x, p_y, p_width, p_height);
}
-void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *p_rect, const godot_vector2 *p_pos, const godot_vector2 *p_size) {
- Rect2 *rect = (Rect2 *)p_rect;
- const Vector2 *pos = (const Vector2 *)p_pos;
- const Vector2 *size = (const Vector2 *)p_size;
- *rect = Rect2(*pos, *size);
+godot_string GDAPI godot_rect2_as_string(const godot_rect2 *p_self) {
+ godot_string ret;
+ const Rect2 *self = (const Rect2 *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-godot_vector2 GDAPI *godot_rect2_get_pos(godot_rect2 *p_rect) {
- Rect2 *rect = (Rect2 *)p_rect;
- return (godot_vector2 *)&rect->pos;
+godot_real GDAPI godot_rect2_get_area(const godot_rect2 *p_self) {
+ const Rect2 *self = (const Rect2 *)p_self;
+ return self->get_area();
}
-void GDAPI godot_rect2_set_pos(godot_rect2 *p_rect, const godot_vector2 *p_pos) {
- Rect2 *rect = (Rect2 *)p_rect;
- const Vector2 *pos = (const Vector2 *)p_pos;
- rect->pos = *pos;
+godot_bool GDAPI godot_rect2_intersects(const godot_rect2 *p_self, const godot_rect2 *p_b) {
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Rect2 *b = (const Rect2 *)p_b;
+ return self->intersects(*b);
+}
+
+godot_bool GDAPI godot_rect2_encloses(const godot_rect2 *p_self, const godot_rect2 *p_b) {
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Rect2 *b = (const Rect2 *)p_b;
+ return self->encloses(*b);
+}
+
+godot_bool GDAPI godot_rect2_has_no_area(const godot_rect2 *p_self) {
+ const Rect2 *self = (const Rect2 *)p_self;
+ return self->has_no_area();
+}
+
+godot_rect2 GDAPI godot_rect2_clip(const godot_rect2 *p_self, const godot_rect2 *p_b) {
+ godot_rect2 dest;
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Rect2 *b = (const Rect2 *)p_b;
+ *((Rect2 *)&dest) = self->clip(*b);
+ return dest;
+}
+
+godot_rect2 GDAPI godot_rect2_merge(const godot_rect2 *p_self, const godot_rect2 *p_b) {
+ godot_rect2 dest;
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Rect2 *b = (const Rect2 *)p_b;
+ *((Rect2 *)&dest) = self->merge(*b);
+ return dest;
}
-godot_vector2 GDAPI *godot_rect2_get_size(godot_rect2 *p_rect) {
- Rect2 *rect = (Rect2 *)p_rect;
- return (godot_vector2 *)&rect->size;
+godot_bool GDAPI godot_rect2_has_point(const godot_rect2 *p_self, const godot_vector2 *p_point) {
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Vector2 *point = (const Vector2 *)p_point;
+ return self->has_point(*point);
+}
+
+godot_rect2 GDAPI godot_rect2_grow(const godot_rect2 *p_self, const godot_real p_by) {
+ godot_rect2 dest;
+ const Rect2 *self = (const Rect2 *)p_self;
+
+ *((Rect2 *)&dest) = self->grow(p_by);
+ return dest;
+}
+
+godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vector2 *p_to) {
+ godot_rect2 dest;
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Vector2 *to = (const Vector2 *)p_to;
+ *((Rect2 *)&dest) = self->expand(*to);
+ return dest;
+}
+
+godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b) {
+ const Rect2 *self = (const Rect2 *)p_self;
+ const Rect2 *b = (const Rect2 *)p_b;
+ return *self == *b;
+}
+
+godot_vector2 GDAPI godot_rect2_get_pos(const godot_rect2 *p_self) {
+ godot_vector2 dest;
+ Vector2 *d = (Vector2 *)&dest;
+ const Rect2 *self = (const Rect2 *)p_self;
+ *d = self->get_pos();
+ return dest;
+}
+
+godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self) {
+ godot_vector2 dest;
+ Vector2 *d = (Vector2 *)&dest;
+ const Rect2 *self = (const Rect2 *)p_self;
+ *d = self->get_size();
+ return dest;
+}
+
+void GDAPI godot_rect2_set_pos(godot_rect2 *p_self, const godot_vector2 *p_pos) {
+ Rect2 *self = (Rect2 *)p_self;
+ const Vector2 *pos = (const Vector2 *)p_pos;
+ self->set_pos(*pos);
}
-void GDAPI godot_rect2_set_size(godot_rect2 *p_rect, const godot_vector2 *p_size) {
- Rect2 *rect = (Rect2 *)p_rect;
+void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size) {
+ Rect2 *self = (Rect2 *)p_self;
const Vector2 *size = (const Vector2 *)p_size;
- rect->size = *size;
+ self->set_size(*size);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_rect2.h b/modules/gdnative/godot/godot_rect2.h
index e9e4a26897..9743321a3b 100644
--- a/modules/gdnative/godot/godot_rect2.h
+++ b/modules/gdnative/godot/godot_rect2.h
@@ -37,24 +37,50 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_RECT2_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_RECT2_TYPE_DEFINED
typedef struct godot_rect2 {
uint8_t _dont_touch_that[16];
} godot_rect2;
#endif
#include "../godot.h"
+#include "godot_vector2.h"
-void GDAPI godot_rect2_new(godot_rect2 *p_rect);
-void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *p_rect, const godot_vector2 *p_pos, const godot_vector2 *p_size);
+void GDAPI godot_rect2_new_with_pos_and_size(godot_rect2 *r_dest, const godot_vector2 *p_pos, const godot_vector2 *p_size);
+void GDAPI godot_rect2_new(godot_rect2 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_width, const godot_real p_height);
-godot_vector2 GDAPI *godot_rect2_get_pos(godot_rect2 *p_rect);
-void GDAPI godot_rect2_set_pos(godot_rect2 *p_rect, const godot_vector2 *p_pos);
+godot_string GDAPI godot_rect2_as_string(const godot_rect2 *p_self);
-godot_vector2 GDAPI *godot_rect2_get_size(godot_rect2 *p_rect);
-void GDAPI godot_rect2_set_size(godot_rect2 *p_rect, const godot_vector2 *p_size);
+godot_real GDAPI godot_rect2_get_area(const godot_rect2 *p_self);
+
+godot_bool GDAPI godot_rect2_intersects(const godot_rect2 *p_self, const godot_rect2 *p_b);
+
+godot_bool GDAPI godot_rect2_encloses(const godot_rect2 *p_self, const godot_rect2 *p_b);
+
+godot_bool GDAPI godot_rect2_has_no_area(const godot_rect2 *p_self);
+
+godot_rect2 GDAPI godot_rect2_clip(const godot_rect2 *p_self, const godot_rect2 *p_b);
+
+godot_rect2 GDAPI godot_rect2_merge(const godot_rect2 *p_self, const godot_rect2 *p_b);
+
+godot_bool GDAPI godot_rect2_has_point(const godot_rect2 *p_self, const godot_vector2 *p_point);
+
+godot_rect2 GDAPI godot_rect2_grow(const godot_rect2 *p_self, const godot_real p_by);
+
+godot_rect2 GDAPI godot_rect2_expand(const godot_rect2 *p_self, const godot_vector2 *p_to);
+
+godot_bool GDAPI godot_rect2_operator_equal(const godot_rect2 *p_self, const godot_rect2 *p_b);
+
+godot_vector2 GDAPI godot_rect2_get_pos(const godot_rect2 *p_self);
+
+godot_vector2 GDAPI godot_rect2_get_size(const godot_rect2 *p_self);
+
+void GDAPI godot_rect2_set_pos(godot_rect2 *p_self, const godot_vector2 *p_pos);
+
+void GDAPI godot_rect2_set_size(godot_rect2 *p_self, const godot_vector2 *p_size);
#ifdef __cplusplus
}
#endif
-#endif // GODOT_RECT3_H
+#endif // GODOT_RECT2_H
diff --git a/modules/gdnative/godot/godot_rect3.cpp b/modules/gdnative/godot/godot_rect3.cpp
index 96c5d17b1a..c4f8a853c2 100644
--- a/modules/gdnative/godot/godot_rect3.cpp
+++ b/modules/gdnative/godot/godot_rect3.cpp
@@ -28,48 +28,162 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_rect3.h"
+#include "core/variant.h"
-#include "math/rect3.h"
+#include "core/math/rect3.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _rect3_api_anchor() {
+void _rect3_api_anchor() {}
+
+void GDAPI godot_rect3_new(godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size) {
+ const Vector3 *pos = (const Vector3 *)p_pos;
+ const Vector3 *size = (const Vector3 *)p_size;
+ Rect3 *dest = (Rect3 *)r_dest;
+ *dest = Rect3(*pos, *size);
}
-void GDAPI godot_rect3_new(godot_rect3 *p_rect) {
- Rect3 *rect = (Rect3 *)p_rect;
- *rect = Rect3();
+godot_string GDAPI godot_rect3_as_string(const godot_rect3 *p_self) {
+ godot_string ret;
+ const Rect3 *self = (const Rect3 *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-void GDAPI godot_rect3_new_with_pos_and_size(godot_rect3 *p_rect, const godot_vector3 *p_pos, const godot_vector3 *p_size) {
- Rect3 *rect = (Rect3 *)p_rect;
- const Vector3 *pos = (const Vector3 *)p_pos;
- const Vector3 *size = (const Vector3 *)p_size;
- *rect = Rect3(*pos, *size);
+godot_real GDAPI godot_rect3_get_area(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->get_area();
}
-godot_vector3 GDAPI *godot_rect3_get_pos(godot_rect3 *p_rect) {
- Rect3 *rect = (Rect3 *)p_rect;
- return (godot_vector3 *)&rect->pos;
+godot_bool GDAPI godot_rect3_has_no_area(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->has_no_area();
}
-void GDAPI godot_rect3_set_pos(godot_rect3 *p_rect, const godot_vector3 *p_pos) {
- Rect3 *rect = (Rect3 *)p_rect;
- const Vector3 *pos = (const Vector3 *)p_pos;
- rect->pos = *pos;
+godot_bool GDAPI godot_rect3_has_no_surface(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->has_no_surface();
}
-godot_vector3 GDAPI *godot_rect3_get_size(godot_rect3 *p_rect) {
- Rect3 *rect = (Rect3 *)p_rect;
- return (godot_vector3 *)&rect->size;
+godot_bool GDAPI godot_rect3_intersects(const godot_rect3 *p_self, const godot_rect3 *p_with) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Rect3 *with = (const Rect3 *)p_with;
+ return self->intersects(*with);
}
-void GDAPI godot_rect3_set_size(godot_rect3 *p_rect, const godot_vector3 *p_size) {
- Rect3 *rect = (Rect3 *)p_rect;
- const Vector3 *size = (const Vector3 *)p_size;
- rect->size = *size;
+godot_bool GDAPI godot_rect3_encloses(const godot_rect3 *p_self, const godot_rect3 *p_with) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Rect3 *with = (const Rect3 *)p_with;
+ return self->encloses(*with);
+}
+
+godot_rect3 GDAPI godot_rect3_merge(const godot_rect3 *p_self, const godot_rect3 *p_with) {
+ godot_rect3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Rect3 *with = (const Rect3 *)p_with;
+ *((Rect3 *)&dest) = self->merge(*with);
+ return dest;
+}
+
+godot_rect3 GDAPI godot_rect3_intersection(const godot_rect3 *p_self, const godot_rect3 *p_with) {
+ godot_rect3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Rect3 *with = (const Rect3 *)p_with;
+ *((Rect3 *)&dest) = self->intersection(*with);
+ return dest;
+}
+
+godot_bool GDAPI godot_rect3_intersects_plane(const godot_rect3 *p_self, const godot_plane *p_plane) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Plane *plane = (const Plane *)p_plane;
+ return self->intersects_plane(*plane);
+}
+
+godot_bool GDAPI godot_rect3_intersects_segment(const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Vector3 *from = (const Vector3 *)p_from;
+ const Vector3 *to = (const Vector3 *)p_to;
+ return self->intersects_segment(*from, *to);
+}
+
+godot_bool GDAPI godot_rect3_has_point(const godot_rect3 *p_self, const godot_vector3 *p_point) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Vector3 *point = (const Vector3 *)p_point;
+ return self->has_point(*point);
+}
+
+godot_vector3 GDAPI godot_rect3_get_support(const godot_rect3 *p_self, const godot_vector3 *p_dir) {
+ godot_vector3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Vector3 *dir = (const Vector3 *)p_dir;
+ *((Vector3 *)&dest) = self->get_support(*dir);
+ return dest;
+}
+
+godot_vector3 GDAPI godot_rect3_get_longest_axis(const godot_rect3 *p_self) {
+ godot_vector3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+ *((Vector3 *)&dest) = self->get_longest_axis();
+ return dest;
+}
+
+godot_int GDAPI godot_rect3_get_longest_axis_index(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->get_longest_axis_index();
+}
+
+godot_real GDAPI godot_rect3_get_longest_axis_size(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->get_longest_axis_size();
+}
+
+godot_vector3 GDAPI godot_rect3_get_shortest_axis(const godot_rect3 *p_self) {
+ godot_vector3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+ *((Vector3 *)&dest) = self->get_shortest_axis();
+ return dest;
+}
+
+godot_int GDAPI godot_rect3_get_shortest_axis_index(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->get_shortest_axis_index();
+}
+
+godot_real GDAPI godot_rect3_get_shortest_axis_size(const godot_rect3 *p_self) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ return self->get_shortest_axis_size();
+}
+
+godot_rect3 GDAPI godot_rect3_expand(const godot_rect3 *p_self, const godot_vector3 *p_to_point) {
+ godot_rect3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Vector3 *to_point = (const Vector3 *)p_to_point;
+ *((Rect3 *)&dest) = self->expand(*to_point);
+ return dest;
+}
+
+godot_rect3 GDAPI godot_rect3_grow(const godot_rect3 *p_self, const godot_real p_by) {
+ godot_rect3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+
+ *((Rect3 *)&dest) = self->grow(p_by);
+ return dest;
+}
+
+godot_vector3 GDAPI godot_rect3_get_endpoint(const godot_rect3 *p_self, const godot_int p_idx) {
+ godot_vector3 dest;
+ const Rect3 *self = (const Rect3 *)p_self;
+
+ *((Vector3 *)&dest) = self->get_endpoint(p_idx);
+ return dest;
+}
+
+godot_bool GDAPI godot_rect3_operator_equal(const godot_rect3 *p_self, const godot_rect3 *p_b) {
+ const Rect3 *self = (const Rect3 *)p_self;
+ const Rect3 *b = (const Rect3 *)p_b;
+ return *self == *b;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_rect3.h b/modules/gdnative/godot/godot_rect3.h
index 562ac8379e..95969ab20e 100644
--- a/modules/gdnative/godot/godot_rect3.h
+++ b/modules/gdnative/godot/godot_rect3.h
@@ -37,21 +37,61 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_RECT3_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_RECT3_TYPE_DEFINED
typedef struct godot_rect3 {
uint8_t _dont_touch_that[24];
} godot_rect3;
#endif
#include "../godot.h"
+#include "godot_plane.h"
+#include "godot_vector3.h"
-void GDAPI godot_rect3_new(godot_rect3 *p_rect);
-void GDAPI godot_rect3_new_with_pos_and_size(godot_rect3 *p_rect, const godot_vector3 *p_pos, const godot_vector3 *p_size);
+void GDAPI godot_rect3_new(godot_rect3 *r_dest, const godot_vector3 *p_pos, const godot_vector3 *p_size);
-godot_vector3 GDAPI *godot_rect3_get_pos(godot_rect3 *p_rect);
-void GDAPI godot_rect3_set_pos(godot_rect3 *p_rect, const godot_vector3 *p_pos);
+godot_string GDAPI godot_rect3_as_string(const godot_rect3 *p_self);
-godot_vector3 GDAPI *godot_rect3_get_size(godot_rect3 *p_rect);
-void GDAPI godot_rect3_set_size(godot_rect3 *p_rect, const godot_vector3 *p_size);
+godot_real GDAPI godot_rect3_get_area(const godot_rect3 *p_self);
+
+godot_bool GDAPI godot_rect3_has_no_area(const godot_rect3 *p_self);
+
+godot_bool GDAPI godot_rect3_has_no_surface(const godot_rect3 *p_self);
+
+godot_bool GDAPI godot_rect3_intersects(const godot_rect3 *p_self, const godot_rect3 *p_with);
+
+godot_bool GDAPI godot_rect3_encloses(const godot_rect3 *p_self, const godot_rect3 *p_with);
+
+godot_rect3 GDAPI godot_rect3_merge(const godot_rect3 *p_self, const godot_rect3 *p_with);
+
+godot_rect3 GDAPI godot_rect3_intersection(const godot_rect3 *p_self, const godot_rect3 *p_with);
+
+godot_bool GDAPI godot_rect3_intersects_plane(const godot_rect3 *p_self, const godot_plane *p_plane);
+
+godot_bool GDAPI godot_rect3_intersects_segment(const godot_rect3 *p_self, const godot_vector3 *p_from, const godot_vector3 *p_to);
+
+godot_bool GDAPI godot_rect3_has_point(const godot_rect3 *p_self, const godot_vector3 *p_point);
+
+godot_vector3 GDAPI godot_rect3_get_support(const godot_rect3 *p_self, const godot_vector3 *p_dir);
+
+godot_vector3 GDAPI godot_rect3_get_longest_axis(const godot_rect3 *p_self);
+
+godot_int GDAPI godot_rect3_get_longest_axis_index(const godot_rect3 *p_self);
+
+godot_real GDAPI godot_rect3_get_longest_axis_size(const godot_rect3 *p_self);
+
+godot_vector3 GDAPI godot_rect3_get_shortest_axis(const godot_rect3 *p_self);
+
+godot_int GDAPI godot_rect3_get_shortest_axis_index(const godot_rect3 *p_self);
+
+godot_real GDAPI godot_rect3_get_shortest_axis_size(const godot_rect3 *p_self);
+
+godot_rect3 GDAPI godot_rect3_expand(const godot_rect3 *p_self, const godot_vector3 *p_to_point);
+
+godot_rect3 GDAPI godot_rect3_grow(const godot_rect3 *p_self, const godot_real p_by);
+
+godot_vector3 GDAPI godot_rect3_get_endpoint(const godot_rect3 *p_self, const godot_int p_idx);
+
+godot_bool GDAPI godot_rect3_operator_equal(const godot_rect3 *p_self, const godot_rect3 *p_b);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_rid.cpp b/modules/gdnative/godot/godot_rid.cpp
index fff31e3992..343c004bff 100644
--- a/modules/gdnative/godot/godot_rid.cpp
+++ b/modules/gdnative/godot/godot_rid.cpp
@@ -28,36 +28,46 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_rid.h"
+#include "core/variant.h"
-#include "object.h"
-#include "resource.h"
+#include "core/resource.h"
+#include "core/rid.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _rid_api_anchor() {
-}
-
-void GDAPI godot_rid_new(godot_rid *p_rid, godot_object *p_from) {
+void _rid_api_anchor() {}
- Resource *res_from = ((Object *)p_from)->cast_to<Resource>();
+void GDAPI godot_rid_new(godot_rid *r_dest) {
+ RID *dest = (RID *)r_dest;
+ memnew_placement(dest, RID);
+}
- RID *rid = (RID *)p_rid;
- memnew_placement(rid, RID);
+godot_int GDAPI godot_rid_get_id(const godot_rid *p_self) {
+ const RID *self = (const RID *)p_self;
+ return self->get_id();
+}
+void GDAPI godot_rid_new_with_resource(godot_rid *r_dest, const godot_object *p_from) {
+ const Resource *res_from = ((const Object *)p_from)->cast_to<Resource>();
+ godot_rid_new(r_dest);
if (res_from) {
- *rid = RID(res_from->get_rid());
+ RID *dest = (RID *)r_dest;
+ *dest = RID(res_from->get_rid());
}
}
-uint32_t GDAPI godot_rid_get_rid(const godot_rid *p_rid) {
- RID *rid = (RID *)p_rid;
- return rid->get_id();
+godot_bool GDAPI godot_rid_operator_equal(const godot_rid *p_self, const godot_rid *p_b) {
+ const RID *self = (const RID *)p_self;
+ const RID *b = (const RID *)p_b;
+ return *self == *b;
}
-void GDAPI godot_rid_destroy(godot_rid *p_rid) {
- ((RID *)p_rid)->~RID();
+godot_bool GDAPI godot_rid_operator_less(const godot_rid *p_self, const godot_rid *p_b) {
+ const RID *self = (const RID *)p_self;
+ const RID *b = (const RID *)p_b;
+ return *self < *b;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_rid.h b/modules/gdnative/godot/godot_rid.h
index e00c8f89ad..25dc8d965e 100644
--- a/modules/gdnative/godot/godot_rid.h
+++ b/modules/gdnative/godot/godot_rid.h
@@ -37,6 +37,7 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_RID_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_RID_TYPE_DEFINED
typedef struct godot_rid {
uint8_t _dont_touch_that[8];
} godot_rid;
@@ -44,11 +45,15 @@ typedef struct godot_rid {
#include "../godot.h"
-void GDAPI godot_rid_new(godot_rid *p_rid, godot_object *p_from);
+void GDAPI godot_rid_new(godot_rid *r_dest);
-uint32_t GDAPI godot_rid_get_rid(const godot_rid *p_rid);
+godot_int GDAPI godot_rid_get_id(const godot_rid *p_self);
-void GDAPI godot_rid_destroy(godot_rid *p_rid);
+void GDAPI godot_rid_new_with_resource(godot_rid *r_dest, const godot_object *p_from);
+
+godot_bool GDAPI godot_rid_operator_equal(const godot_rid *p_self, const godot_rid *p_b);
+
+godot_bool GDAPI godot_rid_operator_less(const godot_rid *p_self, const godot_rid *p_b);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_string.cpp b/modules/gdnative/godot/godot_string.cpp
index 92c0b04041..59d20c6d23 100644
--- a/modules/gdnative/godot/godot_string.cpp
+++ b/modules/gdnative/godot/godot_string.cpp
@@ -53,6 +53,12 @@ void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, co
*p = String::utf8(p_contents, p_size);
}
+void GDAPI godot_string_new_unicode_data(godot_string *p_str, const wchar_t *p_contents, const int p_size) {
+ String *p = (String *)p_str;
+ memnew_placement(p, String);
+ *p = String(p_contents, p_size);
+}
+
void GDAPI godot_string_get_data(const godot_string *p_str, char *p_dest, int *p_size) {
String *p = (String *)p_str;
if (p_size != NULL) {
diff --git a/modules/gdnative/godot/godot_string.h b/modules/gdnative/godot/godot_string.h
index 83ed5d6ec1..e0ba298a9c 100644
--- a/modules/gdnative/godot/godot_string.h
+++ b/modules/gdnative/godot/godot_string.h
@@ -47,6 +47,7 @@ typedef struct godot_string {
void GDAPI godot_string_new(godot_string *p_str);
void GDAPI godot_string_new_data(godot_string *p_str, const char *p_contents, const int p_size);
+void GDAPI godot_string_new_unicode_data(godot_string *p_str, const wchar_t *p_contents, const int p_size);
void GDAPI godot_string_get_data(const godot_string *p_str, char *p_dest, int *p_size);
diff --git a/modules/gdnative/godot/godot_transform.cpp b/modules/gdnative/godot/godot_transform.cpp
index 681c2b049a..f5a012f59c 100644
--- a/modules/gdnative/godot/godot_transform.cpp
+++ b/modules/gdnative/godot/godot_transform.cpp
@@ -28,42 +28,168 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_transform.h"
+#include "core/variant.h"
-#include "math/transform.h"
+#include "core/math/transform.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _transform_api_anchor() {
-}
+void _transform_api_anchor() {}
-void GDAPI godot_transform_new(godot_transform *p_trans) {
- Transform *trans = (Transform *)p_trans;
- *trans = Transform();
+void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin) {
+ const Vector3 *x_axis = (const Vector3 *)p_x_axis;
+ const Vector3 *y_axis = (const Vector3 *)p_y_axis;
+ const Vector3 *z_axis = (const Vector3 *)p_z_axis;
+ const Vector3 *origin = (const Vector3 *)p_origin;
+ Transform *dest = (Transform *)r_dest;
+ dest->basis.set_axis(0, *x_axis);
+ dest->basis.set_axis(1, *y_axis);
+ dest->basis.set_axis(2, *z_axis);
+ dest->origin = *origin;
}
-void GDAPI godot_transform_new_with_basis(godot_transform *p_trans, const godot_basis *p_basis) {
- Transform *trans = (Transform *)p_trans;
+void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin) {
const Basis *basis = (const Basis *)p_basis;
- *trans = Transform(*basis);
+ const Vector3 *origin = (const Vector3 *)p_origin;
+ Transform *dest = (Transform *)r_dest;
+ *dest = Transform(*basis, *origin);
}
-void GDAPI godot_transform_new_with_basis_origin(godot_transform *p_trans, const godot_basis *p_basis, const godot_vector3 *p_origin) {
- Transform *trans = (Transform *)p_trans;
- const Basis *basis = (const Basis *)p_basis;
- const Vector3 *origin = (const Vector3 *)p_origin;
- *trans = Transform(*basis, *origin);
+godot_string GDAPI godot_transform_as_string(const godot_transform *p_self) {
+ godot_string ret;
+ const Transform *self = (const Transform *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
+}
+
+godot_transform GDAPI godot_transform_inverse(const godot_transform *p_self) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ *((Transform *)&dest) = self->inverse();
+ return dest;
+}
+
+godot_transform GDAPI godot_transform_affine_inverse(const godot_transform *p_self) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ *((Transform *)&dest) = self->affine_inverse();
+ return dest;
+}
+
+godot_transform GDAPI godot_transform_orthonormalized(const godot_transform *p_self) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ *((Transform *)&dest) = self->orthonormalized();
+ return dest;
+}
+
+godot_transform GDAPI godot_transform_rotated(const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ const Vector3 *axis = (const Vector3 *)p_axis;
+ *((Transform *)&dest) = self->rotated(*axis, p_phi);
+ return dest;
+}
+
+godot_transform GDAPI godot_transform_scaled(const godot_transform *p_self, const godot_vector3 *p_scale) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ const Vector3 *scale = (const Vector3 *)p_scale;
+ *((Transform *)&dest) = self->scaled(*scale);
+ return dest;
+}
+
+godot_transform GDAPI godot_transform_translated(const godot_transform *p_self, const godot_vector3 *p_ofs) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ const Vector3 *ofs = (const Vector3 *)p_ofs;
+ *((Transform *)&dest) = self->translated(*ofs);
+ return dest;
+}
+
+godot_transform GDAPI godot_transform_looking_at(const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up) {
+ godot_transform dest;
+ const Transform *self = (const Transform *)p_self;
+ const Vector3 *target = (const Vector3 *)p_target;
+ const Vector3 *up = (const Vector3 *)p_up;
+ *((Transform *)&dest) = self->looking_at(*target, *up);
+ return dest;
+}
+
+godot_plane GDAPI godot_transform_xform_plane(const godot_transform *p_self, const godot_plane *p_v) {
+ godot_plane raw_dest;
+ Plane *dest = (Plane *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Plane *v = (const Plane *)p_v;
+ *dest = self->xform(*v);
+ return raw_dest;
+}
+
+godot_plane GDAPI godot_transform_xform_inv_plane(const godot_transform *p_self, const godot_plane *p_v) {
+ godot_plane raw_dest;
+ Plane *dest = (Plane *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Plane *v = (const Plane *)p_v;
+ *dest = self->xform_inv(*v);
+ return raw_dest;
+}
+
+void GDAPI godot_transform_new_identity(godot_transform *r_dest) {
+ Transform *dest = (Transform *)r_dest;
+ *dest = Transform();
+}
+
+godot_bool GDAPI godot_transform_operator_equal(const godot_transform *p_self, const godot_transform *p_b) {
+ const Transform *self = (const Transform *)p_self;
+ const Transform *b = (const Transform *)p_b;
+ return *self == *b;
+}
+
+godot_transform GDAPI godot_transform_operator_multiply(const godot_transform *p_self, const godot_transform *p_b) {
+ godot_transform raw_dest;
+ Transform *dest = (Transform *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Transform *b = (const Transform *)p_b;
+ *dest = *self * *b;
+ return raw_dest;
+}
+
+godot_vector3 GDAPI godot_transform_xform_vector3(const godot_transform *p_self, const godot_vector3 *p_v) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Vector3 *v = (const Vector3 *)p_v;
+ *dest = self->xform(*v);
+ return raw_dest;
+}
+
+godot_vector3 GDAPI godot_transform_xform_inv_vector3(const godot_transform *p_self, const godot_vector3 *p_v) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Vector3 *v = (const Vector3 *)p_v;
+ *dest = self->xform_inv(*v);
+ return raw_dest;
}
-godot_basis GDAPI *godot_transform_get_basis(godot_transform *p_trans) {
- Transform *trans = (Transform *)p_trans;
- return (godot_basis *)&trans->basis;
+godot_rect3 GDAPI godot_transform_xform_rect3(const godot_transform *p_self, const godot_rect3 *p_v) {
+ godot_rect3 raw_dest;
+ Rect3 *dest = (Rect3 *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Rect3 *v = (const Rect3 *)p_v;
+ *dest = self->xform(*v);
+ return raw_dest;
}
-godot_vector3 GDAPI *godot_transform_get_origin(godot_transform *p_trans) {
- Transform *trans = (Transform *)p_trans;
- return (godot_vector3 *)&trans->origin;
+godot_rect3 GDAPI godot_transform_xform_inv_rect3(const godot_transform *p_self, const godot_rect3 *p_v) {
+ godot_rect3 raw_dest;
+ Rect3 *dest = (Rect3 *)&raw_dest;
+ const Transform *self = (const Transform *)p_self;
+ const Rect3 *v = (const Rect3 *)p_v;
+ *dest = self->xform_inv(*v);
+ return raw_dest;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_transform.h b/modules/gdnative/godot/godot_transform.h
index 93817ffbf2..b15efc23b8 100644
--- a/modules/gdnative/godot/godot_transform.h
+++ b/modules/gdnative/godot/godot_transform.h
@@ -37,19 +37,53 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED
typedef struct godot_transform {
uint8_t _dont_touch_that[48];
} godot_transform;
#endif
#include "../godot.h"
+#include "godot_basis.h"
+#include "godot_variant.h"
+#include "godot_vector3.h"
-void GDAPI godot_transform_new(godot_transform *p_trans);
-void GDAPI godot_transform_new_with_basis(godot_transform *p_trans, const godot_basis *p_basis);
-void GDAPI godot_transform_new_with_basis_origin(godot_transform *p_trans, const godot_basis *p_basis, const godot_vector3 *p_origin);
+void GDAPI godot_transform_new_with_axis_origin(godot_transform *r_dest, const godot_vector3 *p_x_axis, const godot_vector3 *p_y_axis, const godot_vector3 *p_z_axis, const godot_vector3 *p_origin);
+void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_basis, const godot_vector3 *p_origin);
-godot_basis GDAPI *godot_transform_get_basis(godot_transform *p_trans);
-godot_vector3 GDAPI *godot_transform_get_origin(godot_transform *p_trans);
+godot_string GDAPI godot_transform_as_string(const godot_transform *p_self);
+
+godot_transform GDAPI godot_transform_inverse(const godot_transform *p_self);
+
+godot_transform GDAPI godot_transform_affine_inverse(const godot_transform *p_self);
+
+godot_transform GDAPI godot_transform_orthonormalized(const godot_transform *p_self);
+
+godot_transform GDAPI godot_transform_rotated(const godot_transform *p_self, const godot_vector3 *p_axis, const godot_real p_phi);
+
+godot_transform GDAPI godot_transform_scaled(const godot_transform *p_self, const godot_vector3 *p_scale);
+
+godot_transform GDAPI godot_transform_translated(const godot_transform *p_self, const godot_vector3 *p_ofs);
+
+godot_transform GDAPI godot_transform_looking_at(const godot_transform *p_self, const godot_vector3 *p_target, const godot_vector3 *p_up);
+
+godot_plane GDAPI godot_transform_xform_plane(const godot_transform *p_self, const godot_plane *p_v);
+
+godot_plane GDAPI godot_transform_xform_inv_plane(const godot_transform *p_self, const godot_plane *p_v);
+
+void GDAPI godot_transform_new_identity(godot_transform *r_dest);
+
+godot_bool GDAPI godot_transform_operator_equal(const godot_transform *p_self, const godot_transform *p_b);
+
+godot_transform GDAPI godot_transform_operator_multiply(const godot_transform *p_self, const godot_transform *p_b);
+
+godot_vector3 GDAPI godot_transform_xform_vector3(const godot_transform *p_self, const godot_vector3 *p_v);
+
+godot_vector3 GDAPI godot_transform_xform_inv_vector3(const godot_transform *p_self, const godot_vector3 *p_v);
+
+godot_rect3 GDAPI godot_transform_xform_rect3(const godot_transform *p_self, const godot_rect3 *p_v);
+
+godot_rect3 GDAPI godot_transform_xform_inv_rect3(const godot_transform *p_self, const godot_rect3 *p_v);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_transform2d.cpp b/modules/gdnative/godot/godot_transform2d.cpp
index ffc7167559..bdb5476f7d 100644
--- a/modules/gdnative/godot/godot_transform2d.cpp
+++ b/modules/gdnative/godot/godot_transform2d.cpp
@@ -28,60 +28,182 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_transform2d.h"
+#include "core/variant.h"
-#include "../godot.h"
-
-#include "math/math_2d.h"
+#include "core/math/math_2d.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _transform2d_api_anchor() {
+void _transform2d_api_anchor() {}
+
+void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos) {
+ const Vector2 *pos = (const Vector2 *)p_pos;
+ Transform2D *dest = (Transform2D *)r_dest;
+ *dest = Transform2D(p_rot, *pos);
+}
+
+void GDAPI godot_transform2d_new_axis_origin(godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin) {
+ const Vector2 *x_axis = (const Vector2 *)p_x_axis;
+ const Vector2 *y_axis = (const Vector2 *)p_y_axis;
+ const Vector2 *origin = (const Vector2 *)p_origin;
+ Transform2D *dest = (Transform2D *)r_dest;
+ *dest = Transform2D(x_axis->x, x_axis->y, y_axis->x, y_axis->y, origin->x, origin->y);
+}
+
+godot_string GDAPI godot_transform2d_as_string(const godot_transform2d *p_self) {
+ godot_string ret;
+ const Transform2D *self = (const Transform2D *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
+}
+
+godot_transform2d GDAPI godot_transform2d_inverse(const godot_transform2d *p_self) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ *((Transform2D *)&dest) = self->inverse();
+ return dest;
+}
+
+godot_transform2d GDAPI godot_transform2d_affine_inverse(const godot_transform2d *p_self) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ *((Transform2D *)&dest) = self->affine_inverse();
+ return dest;
+}
+
+godot_real GDAPI godot_transform2d_get_rotation(const godot_transform2d *p_self) {
+ const Transform2D *self = (const Transform2D *)p_self;
+ return self->get_rotation();
+}
+
+godot_vector2 GDAPI godot_transform2d_get_origin(const godot_transform2d *p_self) {
+ godot_vector2 dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ *((Vector2 *)&dest) = self->get_origin();
+ return dest;
+}
+
+godot_vector2 GDAPI godot_transform2d_get_scale(const godot_transform2d *p_self) {
+ godot_vector2 dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ *((Vector2 *)&dest) = self->get_scale();
+ return dest;
+}
+
+godot_transform2d GDAPI godot_transform2d_orthonormalized(const godot_transform2d *p_self) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ *((Transform2D *)&dest) = self->orthonormalized();
+ return dest;
+}
+
+godot_transform2d GDAPI godot_transform2d_rotated(const godot_transform2d *p_self, const godot_real p_phi) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+
+ *((Transform2D *)&dest) = self->rotated(p_phi);
+ return dest;
+}
+
+godot_transform2d GDAPI godot_transform2d_scaled(const godot_transform2d *p_self, const godot_vector2 *p_scale) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Vector2 *scale = (const Vector2 *)p_scale;
+ *((Transform2D *)&dest) = self->scaled(*scale);
+ return dest;
}
-void GDAPI godot_transform2d_new_identity(godot_transform2d *p_t) {
- Transform2D *t = (Transform2D *)p_t;
- *t = Transform2D();
+godot_transform2d GDAPI godot_transform2d_translated(const godot_transform2d *p_self, const godot_vector2 *p_offset) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Vector2 *offset = (const Vector2 *)p_offset;
+ *((Transform2D *)&dest) = self->translated(*offset);
+ return dest;
}
-void GDAPI godot_transform2d_new_elements(godot_transform2d *p_t, const godot_vector2 *p_a, const godot_vector2 *p_b, const godot_vector2 *p_c) {
- Transform2D *t = (Transform2D *)p_t;
- Vector2 *a = (Vector2 *)p_a;
- Vector2 *b = (Vector2 *)p_b;
- Vector2 *c = (Vector2 *)p_c;
- *t = Transform2D(a->x, a->y, b->x, b->y, c->x, c->y);
+godot_vector2 GDAPI godot_transform2d_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Vector2 *v = (const Vector2 *)p_v;
+ *dest = self->xform(*v);
+ return raw_dest;
}
-void GDAPI godot_transform2d_new(godot_transform2d *p_t, const godot_real p_rot, const godot_vector2 *p_pos) {
- Transform2D *t = (Transform2D *)p_t;
- Vector2 *pos = (Vector2 *)p_pos;
- *t = Transform2D(p_rot, *pos);
+godot_vector2 GDAPI godot_transform2d_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Vector2 *v = (const Vector2 *)p_v;
+ *dest = self->xform_inv(*v);
+ return raw_dest;
}
-godot_vector2 const GDAPI *godot_transform2d_const_index(const godot_transform2d *p_t, const godot_int p_idx) {
- const Transform2D *t = (const Transform2D *)p_t;
- const Vector2 *e = &t->operator[](p_idx);
- return (godot_vector2 const *)e;
+godot_vector2 GDAPI godot_transform2d_basis_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Vector2 *v = (const Vector2 *)p_v;
+ *dest = self->basis_xform(*v);
+ return raw_dest;
}
-godot_vector2 GDAPI *godot_transform2d_index(godot_transform2d *p_t, const godot_int p_idx) {
- Transform2D *t = (Transform2D *)p_t;
- Vector2 *e = &t->operator[](p_idx);
- return (godot_vector2 *)e;
+godot_vector2 GDAPI godot_transform2d_basis_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Vector2 *v = (const Vector2 *)p_v;
+ *dest = self->basis_xform_inv(*v);
+ return raw_dest;
}
-godot_vector2 GDAPI godot_transform2d_get_axis(const godot_transform2d *p_t, const godot_int p_axis) {
- return *godot_transform2d_const_index(p_t, p_axis);
+godot_transform2d GDAPI godot_transform2d_interpolate_with(const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c) {
+ godot_transform2d dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Transform2D *m = (const Transform2D *)p_m;
+ *((Transform2D *)&dest) = self->interpolate_with(*m, p_c);
+ return dest;
}
-void GDAPI godot_transform2d_set_axis(godot_transform2d *p_t, const godot_int p_axis, const godot_vector2 *p_vec) {
- godot_vector2 *origin_v = godot_transform2d_index(p_t, p_axis);
- *origin_v = *p_vec;
+godot_bool GDAPI godot_transform2d_operator_equal(const godot_transform2d *p_self, const godot_transform2d *p_b) {
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Transform2D *b = (const Transform2D *)p_b;
+ return *self == *b;
}
-// @Incomplete
-// See header file
+godot_transform2d GDAPI godot_transform2d_operator_multiply(const godot_transform2d *p_self, const godot_transform2d *p_b) {
+ godot_transform2d raw_dest;
+ Transform2D *dest = (Transform2D *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Transform2D *b = (const Transform2D *)p_b;
+ *dest = *self * *b;
+ return raw_dest;
+}
+
+void GDAPI godot_transform2d_new_identity(godot_transform2d *r_dest) {
+ Transform2D *dest = (Transform2D *)r_dest;
+ *dest = Transform2D();
+}
+
+godot_rect2 GDAPI godot_transform2d_xform_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v) {
+ godot_rect2 raw_dest;
+ Rect2 *dest = (Rect2 *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Rect2 *v = (const Rect2 *)p_v;
+ *dest = self->xform(*v);
+ return raw_dest;
+}
+
+godot_rect2 GDAPI godot_transform2d_xform_inv_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v) {
+ godot_rect2 raw_dest;
+ Rect2 *dest = (Rect2 *)&raw_dest;
+ const Transform2D *self = (const Transform2D *)p_self;
+ const Rect2 *v = (const Rect2 *)p_v;
+ *dest = self->xform_inv(*v);
+ return raw_dest;
+}
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_transform2d.h b/modules/gdnative/godot/godot_transform2d.h
index ae0569dbe8..c375e90af7 100644
--- a/modules/gdnative/godot/godot_transform2d.h
+++ b/modules/gdnative/godot/godot_transform2d.h
@@ -44,31 +44,51 @@ typedef struct godot_transform2d {
#endif
#include "../godot.h"
-
+#include "godot_variant.h"
#include "godot_vector2.h"
-void GDAPI godot_transform2d_new_identity(godot_transform2d *p_t);
-void GDAPI godot_transform2d_new_elements(godot_transform2d *p_t, const godot_vector2 *p_a, const godot_vector2 *p_b, const godot_vector2 *p_c);
-void GDAPI godot_transform2d_new(godot_transform2d *p_t, const godot_real p_rot, const godot_vector2 *p_pos);
+void GDAPI godot_transform2d_new(godot_transform2d *r_dest, const godot_real p_rot, const godot_vector2 *p_pos);
+void GDAPI godot_transform2d_new_axis_origin(godot_transform2d *r_dest, const godot_vector2 *p_x_axis, const godot_vector2 *p_y_axis, const godot_vector2 *p_origin);
+
+godot_string GDAPI godot_transform2d_as_string(const godot_transform2d *p_self);
+
+godot_transform2d GDAPI godot_transform2d_inverse(const godot_transform2d *p_self);
+
+godot_transform2d GDAPI godot_transform2d_affine_inverse(const godot_transform2d *p_self);
+
+godot_real GDAPI godot_transform2d_get_rotation(const godot_transform2d *p_self);
+
+godot_vector2 GDAPI godot_transform2d_get_origin(const godot_transform2d *p_self);
+
+godot_vector2 GDAPI godot_transform2d_get_scale(const godot_transform2d *p_self);
+
+godot_transform2d GDAPI godot_transform2d_orthonormalized(const godot_transform2d *p_self);
+
+godot_transform2d GDAPI godot_transform2d_rotated(const godot_transform2d *p_self, const godot_real p_phi);
+
+godot_transform2d GDAPI godot_transform2d_scaled(const godot_transform2d *p_self, const godot_vector2 *p_scale);
+
+godot_transform2d GDAPI godot_transform2d_translated(const godot_transform2d *p_self, const godot_vector2 *p_offset);
+
+godot_vector2 GDAPI godot_transform2d_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
+
+godot_vector2 GDAPI godot_transform2d_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
+
+godot_vector2 GDAPI godot_transform2d_basis_xform_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
+
+godot_vector2 GDAPI godot_transform2d_basis_xform_inv_vector2(const godot_transform2d *p_self, const godot_vector2 *p_v);
+
+godot_transform2d GDAPI godot_transform2d_interpolate_with(const godot_transform2d *p_self, const godot_transform2d *p_m, const godot_real p_c);
-/*
-godot_real GDAPI godot_transform2d_tdotx(const godot_transform2d *p_t, const godot_vector2 *p_v);
-godot_real GDAPI godot_transform2d_tdoty(const godot_transform2d *p_t, const godot_vector2 *p_v);
-*/
+godot_bool GDAPI godot_transform2d_operator_equal(const godot_transform2d *p_self, const godot_transform2d *p_b);
-godot_vector2 const GDAPI *godot_transform2d_const_index(const godot_transform2d *p_t, const godot_int p_idx);
-godot_vector2 GDAPI *godot_transform2d_index(godot_transform2d *p_t, const godot_int p_idx);
+godot_transform2d GDAPI godot_transform2d_operator_multiply(const godot_transform2d *p_self, const godot_transform2d *p_b);
-godot_vector2 GDAPI godot_transform2d_get_axis(const godot_transform2d *p_t, const godot_int p_axis);
-void GDAPI godot_transform2d_set_axis(godot_transform2d *p_t, const godot_int p_axis, const godot_vector2 *p_vec);
+void GDAPI godot_transform2d_new_identity(godot_transform2d *r_dest);
-/*
-void GDAPI godot_transform2d_invert(godot_transform2d *p_t);
-godot_transform2d GDAPI godot_transform2d_inverse(const godot_transform2d *p_t);
-*/
+godot_rect2 GDAPI godot_transform2d_xform_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v);
-// @Incomplete
-// I feel like it should be enough to expose get and set, the whole logic can be done in the bindings.
+godot_rect2 GDAPI godot_transform2d_xform_inv_rect2(const godot_transform2d *p_self, const godot_rect2 *p_v);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_variant.cpp b/modules/gdnative/godot/godot_variant.cpp
index e9fa4eb8c6..9381fb86d3 100644
--- a/modules/gdnative/godot/godot_variant.cpp
+++ b/modules/gdnative/godot/godot_variant.cpp
@@ -28,23 +28,21 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_variant.h"
-
-#include "../godot.h"
-
-#include "variant.h"
+#include "core/variant.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _variant_api_anchor() {
-}
+void _variant_api_anchor() {}
#define memnew_placement_custom(m_placement, m_class, m_constr) _post_initialize(new (m_placement, sizeof(m_class), "") m_constr)
-godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- return (godot_variant_type)v->get_type();
+// Constructors
+
+godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return (godot_variant_type)self->get_type();
}
void GDAPI godot_variant_copy(godot_variant *p_dest, const godot_variant *p_src) {
@@ -53,461 +51,429 @@ void GDAPI godot_variant_copy(godot_variant *p_dest, const godot_variant *p_src)
*dest = *src;
}
-void GDAPI godot_variant_new_nil(godot_variant *p_v) {
- Variant *v = (Variant *)p_v;
- memnew_placement(v, Variant);
+void GDAPI godot_variant_new_nil(godot_variant *r_dest) {
+ Variant *dest = (Variant *)r_dest;
+ memnew_placement(dest, Variant);
}
-void GDAPI godot_variant_new_bool(godot_variant *p_v, const godot_bool p_b) {
- Variant *v = (Variant *)p_v;
- memnew_placement_custom(v, Variant, Variant(p_b));
+void GDAPI godot_variant_new_bool(godot_variant *r_dest, const godot_bool p_b) {
+ Variant *dest = (Variant *)r_dest;
+ memnew_placement_custom(dest, Variant, Variant(p_b));
}
-void GDAPI godot_variant_new_uint(godot_variant *p_v, const uint64_t p_i) {
- Variant *v = (Variant *)p_v;
- memnew_placement_custom(v, Variant, Variant(p_i));
+void GDAPI godot_variant_new_uint(godot_variant *r_dest, const uint64_t p_i) {
+ Variant *dest = (Variant *)r_dest;
+ memnew_placement_custom(dest, Variant, Variant(p_i));
}
-void GDAPI godot_variant_new_int(godot_variant *p_v, const int64_t p_i) {
- Variant *v = (Variant *)p_v;
- memnew_placement_custom(v, Variant, Variant(p_i));
+void GDAPI godot_variant_new_int(godot_variant *r_dest, const int64_t p_i) {
+ Variant *dest = (Variant *)r_dest;
+ memnew_placement_custom(dest, Variant, Variant(p_i));
}
-void GDAPI godot_variant_new_real(godot_variant *p_v, const double p_r) {
- Variant *v = (Variant *)p_v;
- memnew_placement_custom(v, Variant, Variant(p_r));
+void GDAPI godot_variant_new_real(godot_variant *r_dest, const double p_r) {
+ Variant *dest = (Variant *)r_dest;
+ memnew_placement_custom(dest, Variant, Variant(p_r));
}
-void GDAPI godot_variant_new_string(godot_variant *p_v, const godot_string *p_s) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_string(godot_variant *r_dest, const godot_string *p_s) {
+ Variant *dest = (Variant *)r_dest;
String *s = (String *)p_s;
- memnew_placement_custom(v, Variant, Variant(*s));
+ memnew_placement_custom(dest, Variant, Variant(*s));
}
-void GDAPI godot_variant_new_vector2(godot_variant *p_v, const godot_vector2 *p_v2) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_vector2(godot_variant *r_dest, const godot_vector2 *p_v2) {
+ Variant *dest = (Variant *)r_dest;
Vector2 *v2 = (Vector2 *)p_v2;
- memnew_placement_custom(v, Variant, Variant(*v2));
+ memnew_placement_custom(dest, Variant, Variant(*v2));
}
-void GDAPI godot_variant_new_rect2(godot_variant *p_v, const godot_rect2 *p_rect2) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_rect2(godot_variant *r_dest, const godot_rect2 *p_rect2) {
+ Variant *dest = (Variant *)r_dest;
Rect2 *rect2 = (Rect2 *)p_rect2;
- memnew_placement_custom(v, Variant, Variant(*rect2));
+ memnew_placement_custom(dest, Variant, Variant(*rect2));
}
-void GDAPI godot_variant_new_vector3(godot_variant *p_v, const godot_vector3 *p_v3) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_vector3(godot_variant *r_dest, const godot_vector3 *p_v3) {
+ Variant *dest = (Variant *)r_dest;
Vector3 *v3 = (Vector3 *)p_v3;
- memnew_placement_custom(v, Variant, Variant(*v3));
+ memnew_placement_custom(dest, Variant, Variant(*v3));
}
-void GDAPI godot_variant_new_transform2d(godot_variant *p_v, const godot_transform2d *p_t2d) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_transform2d(godot_variant *r_dest, const godot_transform2d *p_t2d) {
+ Variant *dest = (Variant *)r_dest;
Transform2D *t2d = (Transform2D *)p_t2d;
- memnew_placement_custom(v, Variant, Variant(*t2d));
+ memnew_placement_custom(dest, Variant, Variant(*t2d));
}
-void GDAPI godot_variant_new_plane(godot_variant *p_v, const godot_plane *p_plane) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_plane) {
+ Variant *dest = (Variant *)r_dest;
Plane *plane = (Plane *)p_plane;
- memnew_placement_custom(v, Variant, Variant(*plane));
+ memnew_placement_custom(dest, Variant, Variant(*plane));
}
-void GDAPI godot_variant_new_quat(godot_variant *p_v, const godot_quat *p_quat) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat) {
+ Variant *dest = (Variant *)r_dest;
Quat *quat = (Quat *)p_quat;
- memnew_placement_custom(v, Variant, Variant(*quat));
+ memnew_placement_custom(dest, Variant, Variant(*quat));
}
-void GDAPI godot_variant_new_rect3(godot_variant *p_v, const godot_rect3 *p_rect3) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_rect3(godot_variant *r_dest, const godot_rect3 *p_rect3) {
+ Variant *dest = (Variant *)r_dest;
Rect3 *rect3 = (Rect3 *)p_rect3;
- memnew_placement_custom(v, Variant, Variant(*rect3));
+ memnew_placement_custom(dest, Variant, Variant(*rect3));
}
-void GDAPI godot_variant_new_basis(godot_variant *p_v, const godot_basis *p_basis) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_basis) {
+ Variant *dest = (Variant *)r_dest;
Basis *basis = (Basis *)p_basis;
- memnew_placement_custom(v, Variant, Variant(*basis));
+ memnew_placement_custom(dest, Variant, Variant(*basis));
}
-void GDAPI godot_variant_new_transform(godot_variant *p_v, const godot_transform *p_trans) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans) {
+ Variant *dest = (Variant *)r_dest;
Transform *trans = (Transform *)p_trans;
- memnew_placement_custom(v, Variant, Variant(*trans));
+ memnew_placement_custom(dest, Variant, Variant(*trans));
}
-void GDAPI godot_variant_new_color(godot_variant *p_v, const godot_color *p_color) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_color(godot_variant *r_dest, const godot_color *p_color) {
+ Variant *dest = (Variant *)r_dest;
Color *color = (Color *)p_color;
- memnew_placement_custom(v, Variant, Variant(*color));
+ memnew_placement_custom(dest, Variant, Variant(*color));
}
-void GDAPI godot_variant_new_image(godot_variant *p_v, const godot_image *p_img) {
- Variant *v = (Variant *)p_v;
- Image *img = (Image *)p_img;
- memnew_placement_custom(v, Variant, Variant(*img));
-}
-
-void GDAPI godot_variant_new_node_path(godot_variant *p_v, const godot_node_path *p_np) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_node_path(godot_variant *r_dest, const godot_node_path *p_np) {
+ Variant *dest = (Variant *)r_dest;
NodePath *np = (NodePath *)p_np;
- memnew_placement_custom(v, Variant, Variant(*np));
+ memnew_placement_custom(dest, Variant, Variant(*np));
}
-void GDAPI godot_variant_new_rid(godot_variant *p_v, const godot_rid *p_rid) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid) {
+ Variant *dest = (Variant *)r_dest;
RID *rid = (RID *)p_rid;
- memnew_placement_custom(v, Variant, Variant(*rid));
+ memnew_placement_custom(dest, Variant, Variant(*rid));
}
-void GDAPI godot_variant_new_object(godot_variant *p_v, const godot_object *p_obj) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj) {
+ Variant *dest = (Variant *)r_dest;
Object *obj = (Object *)p_obj;
- memnew_placement_custom(v, Variant, Variant(obj));
-}
-
-void GDAPI godot_variant_new_input_event(godot_variant *p_v, const godot_input_event *p_event) {
- Variant *v = (Variant *)p_v;
- InputEvent *event = (InputEvent *)p_event;
- memnew_placement_custom(v, Variant, Variant(*event));
+ memnew_placement_custom(dest, Variant, Variant(obj));
}
-void GDAPI godot_variant_new_dictionary(godot_variant *p_v, const godot_dictionary *p_dict) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict) {
+ Variant *dest = (Variant *)r_dest;
Dictionary *dict = (Dictionary *)p_dict;
- memnew_placement_custom(v, Variant, Variant(*dict));
+ memnew_placement_custom(dest, Variant, Variant(*dict));
}
-void GDAPI godot_variant_new_array(godot_variant *p_v, const godot_array *p_arr) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_arr) {
+ Variant *dest = (Variant *)r_dest;
Array *arr = (Array *)p_arr;
- memnew_placement_custom(v, Variant, Variant(*arr));
+ memnew_placement_custom(dest, Variant, Variant(*arr));
}
-void GDAPI godot_variant_new_pool_byte_array(godot_variant *p_v, const godot_pool_byte_array *p_pba) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_byte_array(godot_variant *r_dest, const godot_pool_byte_array *p_pba) {
+ Variant *dest = (Variant *)r_dest;
PoolByteArray *pba = (PoolByteArray *)p_pba;
- memnew_placement_custom(v, Variant, Variant(*pba));
+ memnew_placement_custom(dest, Variant, Variant(*pba));
}
-void GDAPI godot_variant_new_pool_int_array(godot_variant *p_v, const godot_pool_int_array *p_pia) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_int_array(godot_variant *r_dest, const godot_pool_int_array *p_pia) {
+ Variant *dest = (Variant *)r_dest;
PoolIntArray *pia = (PoolIntArray *)p_pia;
- memnew_placement_custom(v, Variant, Variant(*pia));
+ memnew_placement_custom(dest, Variant, Variant(*pia));
}
-void GDAPI godot_variant_new_pool_real_array(godot_variant *p_v, const godot_pool_real_array *p_pra) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_real_array(godot_variant *r_dest, const godot_pool_real_array *p_pra) {
+ Variant *dest = (Variant *)r_dest;
PoolRealArray *pra = (PoolRealArray *)p_pra;
- memnew_placement_custom(v, Variant, Variant(*pra));
+ memnew_placement_custom(dest, Variant, Variant(*pra));
}
-void GDAPI godot_variant_new_pool_string_array(godot_variant *p_v, const godot_pool_string_array *p_psa) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_string_array(godot_variant *r_dest, const godot_pool_string_array *p_psa) {
+ Variant *dest = (Variant *)r_dest;
PoolStringArray *psa = (PoolStringArray *)p_psa;
- memnew_placement_custom(v, Variant, Variant(*psa));
+ memnew_placement_custom(dest, Variant, Variant(*psa));
}
-void GDAPI godot_variant_new_pool_vector2_array(godot_variant *p_v, const godot_pool_vector2_array *p_pv2a) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_vector2_array(godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a) {
+ Variant *dest = (Variant *)r_dest;
PoolVector2Array *pv2a = (PoolVector2Array *)p_pv2a;
- memnew_placement_custom(v, Variant, Variant(*pv2a));
+ memnew_placement_custom(dest, Variant, Variant(*pv2a));
}
-void GDAPI godot_variant_new_pool_vector3_array(godot_variant *p_v, const godot_pool_vector3_array *p_pv3a) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_vector3_array(godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a) {
+ Variant *dest = (Variant *)r_dest;
PoolVector3Array *pv3a = (PoolVector3Array *)p_pv3a;
- memnew_placement_custom(v, Variant, Variant(*pv3a));
+ memnew_placement_custom(dest, Variant, Variant(*pv3a));
}
-void GDAPI godot_variant_new_pool_color_array(godot_variant *p_v, const godot_pool_color_array *p_pca) {
- Variant *v = (Variant *)p_v;
+void GDAPI godot_variant_new_pool_color_array(godot_variant *r_dest, const godot_pool_color_array *p_pca) {
+ Variant *dest = (Variant *)r_dest;
PoolColorArray *pca = (PoolColorArray *)p_pca;
- memnew_placement_custom(v, Variant, Variant(*pca));
+ memnew_placement_custom(dest, Variant, Variant(*pca));
}
-godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- return v->operator bool();
+godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return self->operator bool();
}
-uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- return v->operator uint64_t();
+uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return self->operator uint64_t();
}
-int64_t GDAPI godot_variant_as_int(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- return v->operator int64_t();
+int64_t GDAPI godot_variant_as_int(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return self->operator int64_t();
}
-double GDAPI godot_variant_as_real(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- return v->operator double();
+double GDAPI godot_variant_as_real(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ return self->operator double();
}
-godot_string GDAPI godot_variant_as_string(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_string s;
- godot_string_new(&s);
- String *str = (String *)&s;
- *str = v->operator String();
- return s;
+godot_string GDAPI godot_variant_as_string(const godot_variant *p_self) {
+ godot_string raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ String *dest = (String *)&raw_dest;
+ memnew_placement(dest, String(self->operator String())); // operator = is overloaded by String
+ return raw_dest;
}
-godot_vector2 GDAPI godot_variant_as_vector2(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_vector2 v2;
- Vector2 *vec2 = (Vector2 *)&v2;
- *vec2 = *v;
- return v2;
+godot_vector2 GDAPI godot_variant_as_vector2(const godot_variant *p_self) {
+ godot_vector2 raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_rect2 GDAPI godot_variant_as_rect2(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_rect2 r2;
- Rect2 *rect2 = (Rect2 *)&r2;
- *rect2 = *v;
- return r2;
+godot_rect2 GDAPI godot_variant_as_rect2(const godot_variant *p_self) {
+ godot_rect2 raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Rect2 *dest = (Rect2 *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_vector3 GDAPI godot_variant_as_vector3(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_vector3 v3;
- Vector3 *vec3 = (Vector3 *)&v3;
- *vec3 = *v;
- return v3;
+godot_vector3 GDAPI godot_variant_as_vector3(const godot_variant *p_self) {
+ godot_vector3 raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_transform2d GDAPI godot_variant_as_transform2d(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_transform2d t2;
- Transform2D *t = (Transform2D *)&t2;
- *t = *v;
- return t2;
+godot_transform2d GDAPI godot_variant_as_transform2d(const godot_variant *p_self) {
+ godot_transform2d raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Transform2D *dest = (Transform2D *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_plane p;
- Plane *pl = (Plane *)&p;
- *pl = *v;
- return p;
+godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_self) {
+ godot_plane raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Plane *dest = (Plane *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_quat q;
- Quat *qt = (Quat *)&q;
- *qt = *v;
- return q;
+godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_self) {
+ godot_quat raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Quat *dest = (Quat *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_rect3 GDAPI godot_variant_as_rect3(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_rect3 r;
- Rect3 *r3 = (Rect3 *)&r;
- *r3 = *v;
- return r;
+godot_rect3 GDAPI godot_variant_as_rect3(const godot_variant *p_self) {
+ godot_rect3 raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Rect3 *dest = (Rect3 *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_basis b;
- Basis *bs = (Basis *)&b;
- *bs = *v;
- return b;
+godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_self) {
+ godot_basis raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Basis *dest = (Basis *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_transform t;
- Transform *tr = (Transform *)&t;
- *tr = *v;
- return t;
+godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_self) {
+ godot_transform raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Transform *dest = (Transform *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_color GDAPI godot_variant_as_color(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_color c;
- Color *col = (Color *)&c;
- *col = *v;
- return c;
+godot_color GDAPI godot_variant_as_color(const godot_variant *p_self) {
+ godot_color raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Color *dest = (Color *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
}
-godot_image GDAPI godot_variant_as_image(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_image img;
- godot_image_new(&img);
- Image *i = (Image *)&img;
- *i = *v;
- return img;
-}
-
-godot_node_path GDAPI godot_variant_as_node_path(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_node_path np;
- memnew_placement_custom((NodePath *)&np, NodePath, NodePath((String)*v));
- return np;
-}
-
-godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_rid rid;
- memnew_placement_custom((RID *)&rid, RID, RID(*v));
- return rid;
-}
-
-godot_object GDAPI *godot_variant_as_object(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_object *p = NULL;
- Object **op = (Object **)&p;
- *op = *v;
- return p;
-}
-
-godot_input_event GDAPI godot_variant_as_input_event(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_input_event ev;
- InputEvent *event = (InputEvent *)&ev;
- *event = *v;
- return ev;
-}
-
-godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_dictionary dict;
- godot_dictionary_new(&dict);
- Dictionary *d = (Dictionary *)&dict;
- *d = *v;
- return dict;
-}
-
-godot_array GDAPI godot_variant_as_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_array array;
- godot_array_new(&array);
- Array *a = (Array *)&array;
- *a = *v;
- return array;
-}
-
-godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_byte_array pba;
- godot_pool_byte_array_new(&pba);
- PoolByteArray *p = (PoolByteArray *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_int_array pba;
- godot_pool_int_array_new(&pba);
- PoolIntArray *p = (PoolIntArray *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_real_array pba;
- godot_pool_real_array_new(&pba);
- PoolRealArray *p = (PoolRealArray *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_string_array pba;
- godot_pool_string_array_new(&pba);
- PoolStringArray *p = (PoolStringArray *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_vector2_array pba;
- godot_pool_vector2_array_new(&pba);
- PoolVector2Array *p = (PoolVector2Array *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_vector3_array pba;
- godot_pool_vector3_array_new(&pba);
- PoolVector3Array *p = (PoolVector3Array *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_v) {
- const Variant *v = (const Variant *)p_v;
- godot_pool_color_array pba;
- godot_pool_color_array_new(&pba);
- PoolColorArray *p = (PoolColorArray *)&pba;
- *p = *v;
- return pba;
-}
-
-godot_variant GDAPI godot_variant_call(godot_variant *p_v, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *p_error) {
- Variant *v = (Variant *)p_v;
- String *method = (String *)p_method;
- const Variant **args = (const Variant **)p_args;
- godot_variant res;
- godot_variant_new_nil(&res);
+godot_node_path GDAPI godot_variant_as_node_path(const godot_variant *p_self) {
+ godot_node_path raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ NodePath *dest = (NodePath *)&raw_dest;
+ memnew_placement(dest, NodePath(self->operator NodePath())); // operator = is overloaded by NodePath
+ return raw_dest;
+}
+
+godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_self) {
+ godot_rid raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ RID *dest = (RID *)&raw_dest;
+ *dest = *self;
+ return raw_dest;
+}
+
+godot_object GDAPI *godot_variant_as_object(const godot_variant *p_self) {
+ const Variant *self = (const Variant *)p_self;
+ Object *dest;
+ dest = *self;
+ return (godot_object *)dest;
+}
+
+godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_self) {
+ godot_dictionary raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Dictionary *dest = (Dictionary *)&raw_dest;
+ memnew_placement(dest, Dictionary(self->operator Dictionary())); // operator = is overloaded by Dictionary
+ return raw_dest;
+}
+
+godot_array GDAPI godot_variant_as_array(const godot_variant *p_self) {
+ godot_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ Array *dest = (Array *)&raw_dest;
+ memnew_placement(dest, Array(self->operator Array())); // operator = is overloaded by Array
+ return raw_dest;
+}
+
+godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_self) {
+ godot_pool_byte_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolByteArray *dest = (PoolByteArray *)&raw_dest;
+ memnew_placement(dest, PoolByteArray(self->operator PoolByteArray())); // operator = is overloaded by PoolByteArray
+ *dest = *self;
+ return raw_dest;
+}
+
+godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_self) {
+ godot_pool_int_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolIntArray *dest = (PoolIntArray *)&raw_dest;
+ memnew_placement(dest, PoolIntArray(self->operator PoolIntArray())); // operator = is overloaded by PoolIntArray
+ *dest = *self;
+ return raw_dest;
+}
+
+godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_self) {
+ godot_pool_real_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolRealArray *dest = (PoolRealArray *)&raw_dest;
+ memnew_placement(dest, PoolRealArray(self->operator PoolRealArray())); // operator = is overloaded by PoolRealArray
+ *dest = *self;
+ return raw_dest;
+}
- Variant *ret_val = (Variant *)&res;
+godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_self) {
+ godot_pool_string_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolStringArray *dest = (PoolStringArray *)&raw_dest;
+ memnew_placement(dest, PoolStringArray(self->operator PoolStringArray())); // operator = is overloaded by PoolStringArray
+ *dest = *self;
+ return raw_dest;
+}
- Variant::CallError r_error;
- *ret_val = v->call(StringName(*method), args, p_argcount, r_error);
- if (p_error) {
- p_error->error = (godot_variant_call_error_error)r_error.error;
- p_error->argument = r_error.argument;
- p_error->expected = (godot_variant_type)r_error.expected;
+godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_self) {
+ godot_pool_vector2_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolVector2Array *dest = (PoolVector2Array *)&raw_dest;
+ memnew_placement(dest, PoolVector2Array(self->operator PoolVector2Array())); // operator = is overloaded by PoolVector2Array
+ *dest = *self;
+ return raw_dest;
+}
+
+godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_self) {
+ godot_pool_vector3_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolVector3Array *dest = (PoolVector3Array *)&raw_dest;
+ memnew_placement(dest, PoolVector3Array(self->operator PoolVector3Array())); // operator = is overloaded by PoolVector3Array
+ *dest = *self;
+ return raw_dest;
+}
+
+godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_self) {
+ godot_pool_color_array raw_dest;
+ const Variant *self = (const Variant *)p_self;
+ PoolColorArray *dest = (PoolColorArray *)&raw_dest;
+ memnew_placement(dest, PoolColorArray(self->operator PoolColorArray())); // operator = is overloaded by PoolColorArray
+ *dest = *self;
+ return raw_dest;
+}
+
+godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error) {
+ Variant *self = (Variant *)p_self;
+ String *method = (String *)p_method;
+ const Variant **args = (const Variant **)p_args;
+ godot_variant raw_dest;
+ Variant *dest = (Variant *)&raw_dest;
+ Variant::CallError error;
+ memnew_placement_custom(dest, Variant, Variant(self->call(*method, args, p_argcount, error)));
+ *dest = self->call(StringName(*method), args, p_argcount, r_error);
+ if (r_error) {
+ r_error->error = (godot_variant_call_error_error)error.error;
+ r_error->argument = error.argument;
+ r_error->expected = (godot_variant_type)error.expected;
}
- return res;
+ return raw_dest;
}
-godot_bool GDAPI godot_variant_has_method(godot_variant *p_v, const godot_string *p_method) {
- Variant *v = (Variant *)p_v;
- String *method = (String *)p_method;
- return v->has_method(*method);
+godot_bool GDAPI godot_variant_has_method(const godot_variant *p_self, const godot_string *p_method) {
+ const Variant *self = (const Variant *)p_self;
+ const String *method = (const String *)p_method;
+ return self->has_method(*method);
}
-godot_bool GDAPI godot_variant_operator_equal(const godot_variant *p_a, const godot_variant *p_b) {
- const Variant *a = (const Variant *)p_a;
- const Variant *b = (const Variant *)p_b;
- return a->operator==(*b);
+godot_bool GDAPI godot_variant_operator_equal(const godot_variant *p_self, const godot_variant *p_other) {
+ const Variant *self = (const Variant *)p_self;
+ const Variant *other = (const Variant *)p_other;
+ return self->operator==(*other);
}
-godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_a, const godot_variant *p_b) {
- const Variant *a = (const Variant *)p_a;
- const Variant *b = (const Variant *)p_b;
- return a->operator<(*b);
+godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_self, const godot_variant *p_other) {
+ const Variant *self = (const Variant *)p_self;
+ const Variant *other = (const Variant *)p_other;
+ return self->operator<(*other);
}
-godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_a, const godot_variant *p_b) {
- const Variant *a = (const Variant *)p_a;
- const Variant *b = (const Variant *)p_b;
- return a->hash_compare(*b);
+godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_self, const godot_variant *p_other) {
+ const Variant *self = (const Variant *)p_self;
+ const Variant *other = (const Variant *)p_other;
+ return self->hash_compare(*other);
}
-godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_v, godot_bool *p_valid) {
- const Variant *v = (const Variant *)p_v;
- bool &valid = *p_valid;
- return v->booleanize(valid);
+godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self, godot_bool *r_valid) {
+ const Variant *self = (const Variant *)p_self;
+ bool &valid = *r_valid;
+ return self->booleanize(valid);
}
-void GDAPI godot_variant_destroy(godot_variant *p_v) {
- ((Variant *)p_v)->~Variant();
+void GDAPI godot_variant_destroy(godot_variant *p_self) {
+ Variant *self = (Variant *)p_self;
+ self->~Variant();
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_variant.h b/modules/gdnative/godot/godot_variant.h
index 0a5771d2f6..d46b87c41b 100644
--- a/modules/gdnative/godot/godot_variant.h
+++ b/modules/gdnative/godot/godot_variant.h
@@ -42,9 +42,6 @@ typedef struct godot_variant {
} godot_variant;
#endif
-struct godot_transform2d;
-typedef struct godot_transform2d godot_transform2d;
-
typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_NIL,
@@ -62,26 +59,25 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_TRANSFORM2D,
GODOT_VARIANT_TYPE_PLANE,
GODOT_VARIANT_TYPE_QUAT, // 10
- GODOT_VARIANT_TYPE_RECT3, //sorry naming convention fail :( not like it's used often
+ GODOT_VARIANT_TYPE_RECT3,
GODOT_VARIANT_TYPE_BASIS,
GODOT_VARIANT_TYPE_TRANSFORM,
// misc types
GODOT_VARIANT_TYPE_COLOR,
- GODOT_VARIANT_TYPE_IMAGE, // 15
- GODOT_VARIANT_TYPE_NODE_PATH,
+ GODOT_VARIANT_TYPE_NODE_PATH, // 15
GODOT_VARIANT_TYPE_RID,
GODOT_VARIANT_TYPE_OBJECT,
- GODOT_VARIANT_TYPE_INPUT_EVENT,
- GODOT_VARIANT_TYPE_DICTIONARY, // 20
- GODOT_VARIANT_TYPE_ARRAY,
+ GODOT_VARIANT_TYPE_INPUT_EVENT, // TODO: remove me once input_event is removed from main Godot codebase
+ GODOT_VARIANT_TYPE_DICTIONARY,
+ GODOT_VARIANT_TYPE_ARRAY, // 20
// arrays
GODOT_VARIANT_TYPE_POOL_BYTE_ARRAY,
GODOT_VARIANT_TYPE_POOL_INT_ARRAY,
GODOT_VARIANT_TYPE_POOL_REAL_ARRAY,
- GODOT_VARIANT_TYPE_POOL_STRING_ARRAY, // 25
- GODOT_VARIANT_TYPE_POOL_VECTOR2_ARRAY,
+ GODOT_VARIANT_TYPE_POOL_STRING_ARRAY,
+ GODOT_VARIANT_TYPE_POOL_VECTOR2_ARRAY, // 25
GODOT_VARIANT_TYPE_POOL_VECTOR3_ARRAY,
GODOT_VARIANT_TYPE_POOL_COLOR_ARRAY,
} godot_variant_type;
@@ -102,90 +98,99 @@ typedef struct godot_variant_call_error {
} godot_variant_call_error;
#include "godot_array.h"
+#include "godot_basis.h"
+#include "godot_color.h"
#include "godot_dictionary.h"
-#include "godot_input_event.h"
#include "godot_node_path.h"
+#include "godot_plane.h"
+#include "godot_pool_arrays.h"
+#include "godot_quat.h"
+#include "godot_rect2.h"
+#include "godot_rect3.h"
#include "godot_rid.h"
+#include "godot_string.h"
+#include "godot_transform.h"
#include "godot_transform2d.h"
+#include "godot_variant.h"
+#include "godot_vector2.h"
+#include "godot_vector3.h"
+
+#include "../godot.h"
godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_v);
-void GDAPI godot_variant_copy(godot_variant *p_dest, const godot_variant *p_src);
+void GDAPI godot_variant_copy(godot_variant *r_dest, const godot_variant *p_src);
-void GDAPI godot_variant_new_nil(godot_variant *p_v);
+void GDAPI godot_variant_new_nil(godot_variant *r_dest);
void GDAPI godot_variant_new_bool(godot_variant *p_v, const godot_bool p_b);
-void GDAPI godot_variant_new_uint(godot_variant *p_v, const uint64_t p_i);
-void GDAPI godot_variant_new_int(godot_variant *p_v, const int64_t p_i);
-void GDAPI godot_variant_new_real(godot_variant *p_v, const double p_r);
-void GDAPI godot_variant_new_string(godot_variant *p_v, const godot_string *p_s);
-void GDAPI godot_variant_new_vector2(godot_variant *p_v, const godot_vector2 *p_v2);
-void GDAPI godot_variant_new_rect2(godot_variant *p_v, const godot_rect2 *p_rect2);
-void GDAPI godot_variant_new_vector3(godot_variant *p_v, const godot_vector3 *p_v3);
-void GDAPI godot_variant_new_transform2d(godot_variant *p_v, const godot_transform2d *p_t2d);
-void GDAPI godot_variant_new_plane(godot_variant *p_v, const godot_plane *p_plane);
-void GDAPI godot_variant_new_quat(godot_variant *p_v, const godot_quat *p_quat);
-void GDAPI godot_variant_new_rect3(godot_variant *p_v, const godot_rect3 *p_rect3);
-void GDAPI godot_variant_new_basis(godot_variant *p_v, const godot_basis *p_basis);
-void GDAPI godot_variant_new_transform(godot_variant *p_v, const godot_transform *p_trans);
-void GDAPI godot_variant_new_color(godot_variant *p_v, const godot_color *p_color);
-void GDAPI godot_variant_new_image(godot_variant *p_v, const godot_image *p_img);
-void GDAPI godot_variant_new_node_path(godot_variant *p_v, const godot_node_path *p_np);
-void GDAPI godot_variant_new_rid(godot_variant *p_v, const godot_rid *p_rid);
-void GDAPI godot_variant_new_object(godot_variant *p_v, const godot_object *p_obj);
-void GDAPI godot_variant_new_input_event(godot_variant *p_v, const godot_input_event *p_event);
-void GDAPI godot_variant_new_dictionary(godot_variant *p_v, const godot_dictionary *p_dict);
-void GDAPI godot_variant_new_array(godot_variant *p_v, const godot_array *p_arr);
-void GDAPI godot_variant_new_pool_byte_array(godot_variant *p_v, const godot_pool_byte_array *p_pba);
-void GDAPI godot_variant_new_pool_int_array(godot_variant *p_v, const godot_pool_int_array *p_pia);
-void GDAPI godot_variant_new_pool_real_array(godot_variant *p_v, const godot_pool_real_array *p_pra);
-void GDAPI godot_variant_new_pool_string_array(godot_variant *p_v, const godot_pool_string_array *p_psa);
-void GDAPI godot_variant_new_pool_vector2_array(godot_variant *p_v, const godot_pool_vector2_array *p_pv2a);
-void GDAPI godot_variant_new_pool_vector3_array(godot_variant *p_v, const godot_pool_vector3_array *p_pv3a);
-void GDAPI godot_variant_new_pool_color_array(godot_variant *p_v, const godot_pool_color_array *p_pca);
-
-godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_v);
-uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_v);
-int64_t GDAPI godot_variant_as_int(const godot_variant *p_v);
-double GDAPI godot_variant_as_real(const godot_variant *p_v);
-godot_string GDAPI godot_variant_as_string(const godot_variant *p_v);
-godot_vector2 GDAPI godot_variant_as_vector2(const godot_variant *p_v);
-godot_rect2 GDAPI godot_variant_as_rect2(const godot_variant *p_v);
-godot_vector3 GDAPI godot_variant_as_vector3(const godot_variant *p_v);
-godot_transform2d GDAPI godot_variant_as_transform2d(const godot_variant *p_v);
-godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_v);
-godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_v);
-godot_rect3 GDAPI godot_variant_as_rect3(const godot_variant *p_v);
-godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_v);
-godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_v);
-godot_color GDAPI godot_variant_as_color(const godot_variant *p_v);
-godot_image GDAPI godot_variant_as_image(const godot_variant *p_v);
-godot_node_path GDAPI godot_variant_as_node_path(const godot_variant *p_v);
-godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_v);
-godot_object GDAPI *godot_variant_as_object(const godot_variant *p_v);
-godot_input_event GDAPI godot_variant_as_input_event(const godot_variant *p_v);
-godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_v);
-godot_array GDAPI godot_variant_as_array(const godot_variant *p_v);
-godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_v);
-godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_v);
-godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_v);
-godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_v);
-godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_v);
-godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_v);
-godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_v);
-
-godot_variant GDAPI godot_variant_call(godot_variant *p_v, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *p_error);
-
-godot_bool GDAPI godot_variant_has_method(godot_variant *p_v, const godot_string *p_method);
-
-godot_bool GDAPI godot_variant_operator_equal(const godot_variant *p_a, const godot_variant *p_b);
-godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_a, const godot_variant *p_b);
-
-godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_a, const godot_variant *p_b);
-
-godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_v, godot_bool *p_valid);
-
-void GDAPI godot_variant_destroy(godot_variant *p_v);
+void GDAPI godot_variant_new_uint(godot_variant *r_dest, const uint64_t p_i);
+void GDAPI godot_variant_new_int(godot_variant *r_dest, const int64_t p_i);
+void GDAPI godot_variant_new_real(godot_variant *r_dest, const double p_r);
+void GDAPI godot_variant_new_string(godot_variant *r_dest, const godot_string *p_s);
+void GDAPI godot_variant_new_vector2(godot_variant *r_dest, const godot_vector2 *p_v2);
+void GDAPI godot_variant_new_rect2(godot_variant *r_dest, const godot_rect2 *p_rect2);
+void GDAPI godot_variant_new_vector3(godot_variant *r_dest, const godot_vector3 *p_v3);
+void GDAPI godot_variant_new_transform2d(godot_variant *r_dest, const godot_transform2d *p_t2d);
+void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_plane);
+void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat);
+void GDAPI godot_variant_new_rect3(godot_variant *r_dest, const godot_rect3 *p_rect3);
+void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_basis);
+void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans);
+void GDAPI godot_variant_new_color(godot_variant *r_dest, const godot_color *p_color);
+void GDAPI godot_variant_new_node_path(godot_variant *r_dest, const godot_node_path *p_np);
+void GDAPI godot_variant_new_rid(godot_variant *r_dest, const godot_rid *p_rid);
+void GDAPI godot_variant_new_object(godot_variant *r_dest, const godot_object *p_obj);
+void GDAPI godot_variant_new_dictionary(godot_variant *r_dest, const godot_dictionary *p_dict);
+void GDAPI godot_variant_new_array(godot_variant *r_dest, const godot_array *p_arr);
+void GDAPI godot_variant_new_pool_byte_array(godot_variant *r_dest, const godot_pool_byte_array *p_pba);
+void GDAPI godot_variant_new_pool_int_array(godot_variant *r_dest, const godot_pool_int_array *p_pia);
+void GDAPI godot_variant_new_pool_real_array(godot_variant *r_dest, const godot_pool_real_array *p_pra);
+void GDAPI godot_variant_new_pool_string_array(godot_variant *r_dest, const godot_pool_string_array *p_psa);
+void GDAPI godot_variant_new_pool_vector2_array(godot_variant *r_dest, const godot_pool_vector2_array *p_pv2a);
+void GDAPI godot_variant_new_pool_vector3_array(godot_variant *r_dest, const godot_pool_vector3_array *p_pv3a);
+void GDAPI godot_variant_new_pool_color_array(godot_variant *r_dest, const godot_pool_color_array *p_pca);
+
+godot_bool GDAPI godot_variant_as_bool(const godot_variant *p_self);
+uint64_t GDAPI godot_variant_as_uint(const godot_variant *p_self);
+int64_t GDAPI godot_variant_as_int(const godot_variant *p_self);
+double GDAPI godot_variant_as_real(const godot_variant *p_self);
+godot_string GDAPI godot_variant_as_string(const godot_variant *p_self);
+godot_vector2 GDAPI godot_variant_as_vector2(const godot_variant *p_self);
+godot_rect2 GDAPI godot_variant_as_rect2(const godot_variant *p_self);
+godot_vector3 GDAPI godot_variant_as_vector3(const godot_variant *p_self);
+godot_transform2d GDAPI godot_variant_as_transform2d(const godot_variant *p_self);
+godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_self);
+godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_self);
+godot_rect3 GDAPI godot_variant_as_rect3(const godot_variant *p_self);
+godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_self);
+godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_self);
+godot_color GDAPI godot_variant_as_color(const godot_variant *p_self);
+godot_node_path GDAPI godot_variant_as_node_path(const godot_variant *p_self);
+godot_rid GDAPI godot_variant_as_rid(const godot_variant *p_self);
+godot_object GDAPI *godot_variant_as_object(const godot_variant *p_self);
+godot_dictionary GDAPI godot_variant_as_dictionary(const godot_variant *p_self);
+godot_array GDAPI godot_variant_as_array(const godot_variant *p_self);
+godot_pool_byte_array GDAPI godot_variant_as_pool_byte_array(const godot_variant *p_self);
+godot_pool_int_array GDAPI godot_variant_as_pool_int_array(const godot_variant *p_self);
+godot_pool_real_array GDAPI godot_variant_as_pool_real_array(const godot_variant *p_self);
+godot_pool_string_array GDAPI godot_variant_as_pool_string_array(const godot_variant *p_self);
+godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_variant *p_self);
+godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_self);
+godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_self);
+
+godot_variant GDAPI godot_variant_call(godot_variant *p_self, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *r_error);
+
+godot_bool GDAPI godot_variant_has_method(const godot_variant *p_self, const godot_string *p_method);
+
+godot_bool GDAPI godot_variant_operator_equal(const godot_variant *p_self, const godot_variant *p_other);
+godot_bool GDAPI godot_variant_operator_less(const godot_variant *p_self, const godot_variant *p_other);
+
+godot_bool GDAPI godot_variant_hash_compare(const godot_variant *p_self, const godot_variant *p_other);
+
+godot_bool GDAPI godot_variant_booleanize(const godot_variant *p_self, godot_bool *r_valid);
+
+void GDAPI godot_variant_destroy(godot_variant *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_vector2.cpp b/modules/gdnative/godot/godot_vector2.cpp
index 87e60b6245..0ced800872 100644
--- a/modules/gdnative/godot/godot_vector2.cpp
+++ b/modules/gdnative/godot/godot_vector2.cpp
@@ -28,8 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_vector2.h"
+#include "core/variant.h"
-#include "math/math_2d.h"
+#include "core/math/math_2d.h"
#ifdef __cplusplus
extern "C" {
@@ -37,258 +38,258 @@ extern "C" {
void _vector2_api_anchor() {}
-godot_vector2 GDAPI godot_vector2_new(const godot_real p_x, const godot_real p_y) {
- godot_vector2 value;
- Vector2 *v = (Vector2 *)&value;
- v->x = p_x;
- v->y = p_y;
- return value;
+void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y) {
+
+ Vector2 *dest = (Vector2 *)r_dest;
+ *dest = Vector2(p_x, p_y);
}
-void GDAPI godot_vector2_set_x(godot_vector2 *p_v, const godot_real p_x) {
- Vector2 *v = (Vector2 *)p_v;
- v->x = p_x;
+godot_string GDAPI godot_vector2_as_string(const godot_vector2 *p_self) {
+ godot_string ret;
+ const Vector2 *self = (const Vector2 *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-void GDAPI godot_vector2_set_y(godot_vector2 *p_v, const godot_real p_y) {
- Vector2 *v = (Vector2 *)p_v;
- v->y = p_y;
+godot_vector2 GDAPI godot_vector2_normalized(const godot_vector2 *p_self) {
+ godot_vector2 dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ *((Vector2 *)&dest) = self->normalized();
+ return dest;
}
-godot_real GDAPI godot_vector2_get_x(const godot_vector2 *p_v) {
- const Vector2 *v = (Vector2 *)p_v;
- return v->x;
+godot_real GDAPI godot_vector2_length(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->length();
}
-godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_v) {
- const Vector2 *v = (Vector2 *)p_v;
- return v->y;
+
+godot_real GDAPI godot_vector2_angle(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->angle();
}
-void GDAPI godot_vector2_normalize(godot_vector2 *p_v) {
- Vector2 *v = (Vector2 *)p_v;
- v->normalize();
+godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->length_squared();
}
-godot_vector2 GDAPI godot_vector2_normalized(const godot_vector2 *p_v) {
- godot_vector2 dest;
- const Vector2 *v = (Vector2 *)p_v;
- Vector2 *d = (Vector2 *)&dest;
- *d = v->normalized();
- return dest;
+godot_bool GDAPI godot_vector2_is_normalized(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->is_normalized();
}
-godot_real GDAPI godot_vector2_length(const godot_vector2 *p_v) {
- const Vector2 *v = (Vector2 *)p_v;
- return v->length();
+godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *to = (const Vector2 *)p_to;
+ return self->distance_to(*to);
}
-godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_v) {
- const Vector2 *v = (Vector2 *)p_v;
- return v->length_squared();
+godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *to = (const Vector2 *)p_to;
+ return self->distance_squared_to(*to);
}
-godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_v, const godot_vector2 p_b) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- return v->distance_to(*b);
+godot_real GDAPI godot_vector2_angle_to(const godot_vector2 *p_self, const godot_vector2 *p_to) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *to = (const Vector2 *)p_to;
+ return self->angle_to(*to);
}
-godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_v, const godot_vector2 p_b) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- return v->distance_squared_to(*b);
+godot_real GDAPI godot_vector2_angle_to_point(const godot_vector2 *p_self, const godot_vector2 *p_to) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *to = (const Vector2 *)p_to;
+ return self->angle_to_point(*to);
}
-godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_v, const godot_vector2 p_b) {
+godot_vector2 GDAPI godot_vector2_linear_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- *d = *v + *b;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ *((Vector2 *)&dest) = self->linear_interpolate(*b, p_t);
return dest;
}
-godot_vector2 GDAPI godot_vector2_operator_subtract(const godot_vector2 *p_v, const godot_vector2 p_b) {
+godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- *d = *v - *b;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ const Vector2 *pre_a = (const Vector2 *)p_pre_a;
+ const Vector2 *post_b = (const Vector2 *)p_post_b;
+ *((Vector2 *)&dest) = self->cubic_interpolate(*b, *pre_a, *post_b, p_t);
return dest;
}
-godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_v, const godot_vector2 p_b) {
+godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_self, const godot_real p_phi) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- *d = *v * *b;
+ const Vector2 *self = (const Vector2 *)p_self;
+
+ *((Vector2 *)&dest) = self->rotated(p_phi);
return dest;
}
-godot_vector2 GDAPI godot_vector2_operator_multiply_scalar(const godot_vector2 *p_v, const godot_real p_b) {
+godot_vector2 GDAPI godot_vector2_tangent(const godot_vector2 *p_self) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = *v * p_b;
+ const Vector2 *self = (const Vector2 *)p_self;
+ *((Vector2 *)&dest) = self->tangent();
return dest;
}
-godot_vector2 GDAPI godot_vector2_operator_divide_vector(const godot_vector2 *p_v, const godot_vector2 p_b) {
+godot_vector2 GDAPI godot_vector2_floor(const godot_vector2 *p_self) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- *d = *v / *b;
+ const Vector2 *self = (const Vector2 *)p_self;
+ *((Vector2 *)&dest) = self->floor();
return dest;
}
-godot_vector2 GDAPI godot_vector2_operator_divide_scalar(const godot_vector2 *p_v, const godot_real p_b) {
+godot_vector2 GDAPI godot_vector2_snapped(const godot_vector2 *p_self, const godot_vector2 *p_by) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = *v / p_b;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *by = (const Vector2 *)p_by;
+ *((Vector2 *)&dest) = self->snapped(*by);
return dest;
}
-godot_bool GDAPI godot_vector2_operator_equal(const godot_vector2 *p_v, const godot_vector2 p_b) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- return *v == *b;
+godot_real GDAPI godot_vector2_aspect(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->aspect();
}
-godot_bool GDAPI godot_vector2_operator_less(const godot_vector2 *p_v, const godot_vector2 p_b) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- return *v < *b;
+godot_real GDAPI godot_vector2_dot(const godot_vector2 *p_self, const godot_vector2 *p_with) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *with = (const Vector2 *)p_with;
+ return self->dot(*with);
}
-godot_vector2 GDAPI godot_vector2_abs(const godot_vector2 *p_v) {
+godot_vector2 GDAPI godot_vector2_slide(const godot_vector2 *p_self, const godot_vector2 *p_n) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = v->abs();
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *n = (const Vector2 *)p_n;
+ *((Vector2 *)&dest) = self->slide(*n);
return dest;
}
-godot_real GDAPI godot_vector2_angle(const godot_vector2 *p_v) {
- const Vector2 *v = (Vector2 *)p_v;
- return v->angle();
-}
-
-godot_real GDAPI godot_vector2_angle_to(const godot_vector2 *p_v, const godot_vector2 p_to) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *to = (Vector2 *)&p_to;
- return v->angle_to(*to);
+godot_vector2 GDAPI godot_vector2_bounce(const godot_vector2 *p_self, const godot_vector2 *p_n) {
+ godot_vector2 dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *n = (const Vector2 *)p_n;
+ *((Vector2 *)&dest) = self->bounce(*n);
+ return dest;
}
-godot_real GDAPI godot_vector2_angle_to_point(const godot_vector2 *p_v, const godot_vector2 p_to) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *to = (Vector2 *)&p_to;
- return v->angle_to_point(*to);
+godot_vector2 GDAPI godot_vector2_reflect(const godot_vector2 *p_self, const godot_vector2 *p_n) {
+ godot_vector2 dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *n = (const Vector2 *)p_n;
+ *((Vector2 *)&dest) = self->reflect(*n);
+ return dest;
}
-godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_v, const godot_real length) {
+godot_vector2 GDAPI godot_vector2_abs(const godot_vector2 *p_self) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = v->clamped(length);
+ const Vector2 *self = (const Vector2 *)p_self;
+ *((Vector2 *)&dest) = self->abs();
return dest;
}
-godot_vector2 GDAPI godot_vector2_cubic_interpolate(
- const godot_vector2 *p_v, const godot_vector2 p_b, const godot_vector2 p_pre_a,
- const godot_vector2 p_post_b, godot_real t) {
+godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_self, const godot_real p_length) {
godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- const Vector2 *pre_a = (Vector2 *)&p_pre_a;
- const Vector2 *post_b = (Vector2 *)&p_post_b;
- *d = v->cubic_interpolate(*b, *pre_a, *post_b, t);
+ const Vector2 *self = (const Vector2 *)p_self;
+
+ *((Vector2 *)&dest) = self->clamped(p_length);
return dest;
}
-godot_real GDAPI godot_vector2_dot(const godot_vector2 *p_v, const godot_vector2 p_with) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *with = (Vector2 *)&p_with;
- return v->dot(*with);
+godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ *dest = *self + *b;
+ return raw_dest;
}
-godot_vector2 GDAPI godot_vector2_floor(const godot_vector2 *p_v) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = v->floor();
- return dest;
+godot_vector2 GDAPI godot_vector2_operator_substract(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ *dest = *self - *b;
+ return raw_dest;
}
-godot_real GDAPI godot_vector2_aspect(const godot_vector2 *p_v) {
- const Vector2 *v = (Vector2 *)p_v;
- return v->aspect();
+godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ *dest = *self * *b;
+ return raw_dest;
}
-godot_vector2 GDAPI godot_vector2_linear_interpolate(
- const godot_vector2 *p_v,
- const godot_vector2 p_b,
- godot_real t) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *b = (Vector2 *)&p_b;
- *d = v->linear_interpolate(*b, t);
- return dest;
+godot_vector2 GDAPI godot_vector2_operator_multiply_scalar(const godot_vector2 *p_self, const godot_real p_b) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ *dest = *self * p_b;
+ return raw_dest;
}
-godot_vector2 GDAPI godot_vector2_reflect(const godot_vector2 *p_v, const godot_vector2 p_vec) {
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *vec = (Vector2 *)&p_vec;
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- *d = v->reflect(*vec);
- return dest;
+godot_vector2 GDAPI godot_vector2_operator_divide_vector(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ *dest = *self / *b;
+ return raw_dest;
}
-godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_v, godot_real phi) {
- const Vector2 *v = (Vector2 *)p_v;
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- *d = v->rotated(phi);
- return dest;
+godot_vector2 GDAPI godot_vector2_operator_divide_scalar(const godot_vector2 *p_self, const godot_real p_b) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ *dest = *self / p_b;
+ return raw_dest;
}
-godot_vector2 GDAPI godot_vector2_slide(const godot_vector2 *p_v, godot_vector2 p_vec) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *vec = (Vector2 *)&p_vec;
- *d = v->slide(*vec);
- return dest;
+godot_bool GDAPI godot_vector2_operator_equal(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ return *self == *b;
}
-godot_vector2 GDAPI godot_vector2_snapped(const godot_vector2 *p_v, godot_vector2 p_by) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- const Vector2 *by = (Vector2 *)&p_by;
- *d = v->snapped(*by);
- return dest;
+godot_bool GDAPI godot_vector2_operator_less(const godot_vector2 *p_self, const godot_vector2 *p_b) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ const Vector2 *b = (const Vector2 *)p_b;
+ return *self < *b;
}
-godot_vector2 GDAPI godot_vector2_tangent(const godot_vector2 *p_v) {
- godot_vector2 dest;
- Vector2 *d = (Vector2 *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = v->tangent();
- return dest;
+godot_vector2 GDAPI godot_vector2_operator_neg(const godot_vector2 *p_self) {
+ godot_vector2 raw_dest;
+ Vector2 *dest = (Vector2 *)&raw_dest;
+ const Vector2 *self = (const Vector2 *)p_self;
+ *dest = -(*self);
+ return raw_dest;
}
-godot_string GDAPI godot_vector2_to_string(const godot_vector2 *p_v) {
- godot_string dest;
- String *d = (String *)&dest;
- const Vector2 *v = (Vector2 *)p_v;
- *d = "(" + *v + ")";
- return dest;
+void GDAPI godot_vector2_set_x(godot_vector2 *p_self, const godot_real p_x) {
+ Vector2 *self = (Vector2 *)p_self;
+ self->x = p_x;
+}
+
+void GDAPI godot_vector2_set_y(godot_vector2 *p_self, const godot_real p_y) {
+ Vector2 *self = (Vector2 *)p_self;
+ self->y = p_y;
+}
+
+godot_real GDAPI godot_vector2_get_x(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->x;
+}
+
+godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_self) {
+ const Vector2 *self = (const Vector2 *)p_self;
+ return self->y;
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_vector2.h b/modules/gdnative/godot/godot_vector2.h
index 36a4f01d03..9c7590fedf 100644
--- a/modules/gdnative/godot/godot_vector2.h
+++ b/modules/gdnative/godot/godot_vector2.h
@@ -45,51 +45,79 @@ typedef struct godot_vector2 {
#include "../godot.h"
-godot_vector2 GDAPI godot_vector2_new(const godot_real p_x, const godot_real p_y);
-
-void GDAPI godot_vector2_set_x(godot_vector2 *p_v, const godot_real p_x);
-void GDAPI godot_vector2_set_y(godot_vector2 *p_v, const godot_real p_y);
-godot_real GDAPI godot_vector2_get_x(const godot_vector2 *p_v);
-godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_v);
-
-void GDAPI godot_vector2_normalize(godot_vector2 *p_v);
-godot_vector2 GDAPI godot_vector2_normalized(const godot_vector2 *p_v);
-
-godot_real GDAPI godot_vector2_length(const godot_vector2 *p_v);
-godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_v);
-
-godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_v, const godot_vector2 p_b);
-godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_v, const godot_vector2 p_b);
-
-godot_vector2 GDAPI godot_vector2_abs(const godot_vector2 *p_v);
-godot_real GDAPI godot_vector2_angle(const godot_vector2 *p_v);
-godot_real GDAPI godot_vector2_angle_to(const godot_vector2 *p_v, const godot_vector2 p_to);
-godot_real GDAPI godot_vector2_angle_to_point(const godot_vector2 *p_v, const godot_vector2 p_to);
-godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_v, godot_real length);
-godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_v,
- const godot_vector2 p_b, const godot_vector2 p_pre_a,
- const godot_vector2 p_post_b, godot_real t);
-godot_real GDAPI godot_vector2_dot(const godot_vector2 *p_v, const godot_vector2 p_with);
-godot_vector2 GDAPI godot_vector2_floor(const godot_vector2 *p_v);
-godot_real GDAPI godot_vector2_aspect(const godot_vector2 *p_v);
-godot_vector2 GDAPI godot_vector2_linear_interpolate(const godot_vector2 *p_v,
- const godot_vector2 p_b, godot_real t);
-godot_vector2 GDAPI godot_vector2_reflect(const godot_vector2 *p_v, const godot_vector2 p_vec);
-godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_v, godot_real phi);
-godot_vector2 GDAPI godot_vector2_slide(const godot_vector2 *p_v, godot_vector2 p_vec);
-godot_vector2 GDAPI godot_vector2_snapped(const godot_vector2 *p_v, godot_vector2 p_by);
-godot_vector2 GDAPI godot_vector2_tangent(const godot_vector2 *p_v);
-godot_string GDAPI godot_vector2_to_string(const godot_vector2 *p_v);
-
-godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_v, const godot_vector2 p_b);
-godot_vector2 GDAPI godot_vector2_operator_subtract(const godot_vector2 *p_v, const godot_vector2 p_b);
-godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_v, const godot_vector2 p_b);
-godot_vector2 GDAPI godot_vector2_operator_multiply_scalar(const godot_vector2 *p_v, const godot_real p_b);
-godot_vector2 GDAPI godot_vector2_operator_divide_vector(const godot_vector2 *p_v, const godot_vector2 p_b);
-godot_vector2 GDAPI godot_vector2_operator_divide_scalar(const godot_vector2 *p_v, const godot_real p_b);
-
-godot_bool GDAPI godot_vector2_operator_equal(const godot_vector2 *p_v, const godot_vector2 p_b);
-godot_bool GDAPI godot_vector2_operator_less(const godot_vector2 *p_v, const godot_vector2 p_b);
+void GDAPI godot_vector2_new(godot_vector2 *r_dest, const godot_real p_x, const godot_real p_y);
+
+godot_string GDAPI godot_vector2_as_string(const godot_vector2 *p_self);
+
+godot_vector2 GDAPI godot_vector2_normalized(const godot_vector2 *p_self);
+
+godot_real GDAPI godot_vector2_length(const godot_vector2 *p_self);
+
+godot_real GDAPI godot_vector2_angle(const godot_vector2 *p_self);
+
+godot_real GDAPI godot_vector2_length_squared(const godot_vector2 *p_self);
+
+godot_bool GDAPI godot_vector2_is_normalized(const godot_vector2 *p_self);
+
+godot_real GDAPI godot_vector2_distance_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
+
+godot_real GDAPI godot_vector2_distance_squared_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
+
+godot_real GDAPI godot_vector2_angle_to(const godot_vector2 *p_self, const godot_vector2 *p_to);
+
+godot_real GDAPI godot_vector2_angle_to_point(const godot_vector2 *p_self, const godot_vector2 *p_to);
+
+godot_vector2 GDAPI godot_vector2_linear_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_real p_t);
+
+godot_vector2 GDAPI godot_vector2_cubic_interpolate(const godot_vector2 *p_self, const godot_vector2 *p_b, const godot_vector2 *p_pre_a, const godot_vector2 *p_post_b, const godot_real p_t);
+
+godot_vector2 GDAPI godot_vector2_rotated(const godot_vector2 *p_self, const godot_real p_phi);
+
+godot_vector2 GDAPI godot_vector2_tangent(const godot_vector2 *p_self);
+
+godot_vector2 GDAPI godot_vector2_floor(const godot_vector2 *p_self);
+
+godot_vector2 GDAPI godot_vector2_snapped(const godot_vector2 *p_self, const godot_vector2 *p_by);
+
+godot_real GDAPI godot_vector2_aspect(const godot_vector2 *p_self);
+
+godot_real GDAPI godot_vector2_dot(const godot_vector2 *p_self, const godot_vector2 *p_with);
+
+godot_vector2 GDAPI godot_vector2_slide(const godot_vector2 *p_self, const godot_vector2 *p_n);
+
+godot_vector2 GDAPI godot_vector2_bounce(const godot_vector2 *p_self, const godot_vector2 *p_n);
+
+godot_vector2 GDAPI godot_vector2_reflect(const godot_vector2 *p_self, const godot_vector2 *p_n);
+
+godot_vector2 GDAPI godot_vector2_abs(const godot_vector2 *p_self);
+
+godot_vector2 GDAPI godot_vector2_clamped(const godot_vector2 *p_self, const godot_real p_length);
+
+godot_vector2 GDAPI godot_vector2_operator_add(const godot_vector2 *p_self, const godot_vector2 *p_b);
+
+godot_vector2 GDAPI godot_vector2_operator_substract(const godot_vector2 *p_self, const godot_vector2 *p_b);
+
+godot_vector2 GDAPI godot_vector2_operator_multiply_vector(const godot_vector2 *p_self, const godot_vector2 *p_b);
+
+godot_vector2 GDAPI godot_vector2_operator_multiply_scalar(const godot_vector2 *p_self, const godot_real p_b);
+
+godot_vector2 GDAPI godot_vector2_operator_divide_vector(const godot_vector2 *p_self, const godot_vector2 *p_b);
+
+godot_vector2 GDAPI godot_vector2_operator_divide_scalar(const godot_vector2 *p_self, const godot_real p_b);
+
+godot_bool GDAPI godot_vector2_operator_equal(const godot_vector2 *p_self, const godot_vector2 *p_b);
+
+godot_bool GDAPI godot_vector2_operator_less(const godot_vector2 *p_self, const godot_vector2 *p_b);
+
+godot_vector2 GDAPI godot_vector2_operator_neg(const godot_vector2 *p_self);
+
+void GDAPI godot_vector2_set_x(godot_vector2 *p_self, const godot_real p_x);
+
+void GDAPI godot_vector2_set_y(godot_vector2 *p_self, const godot_real p_y);
+
+godot_real GDAPI godot_vector2_get_x(const godot_vector2 *p_self);
+
+godot_real GDAPI godot_vector2_get_y(const godot_vector2 *p_self);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_vector3.cpp b/modules/gdnative/godot/godot_vector3.cpp
index 5f71b9f7e4..f9942af6e5 100644
--- a/modules/gdnative/godot/godot_vector3.cpp
+++ b/modules/gdnative/godot/godot_vector3.cpp
@@ -28,313 +28,274 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "godot_vector3.h"
+#include "core/variant.h"
-#include "math/vector3.h"
+#include "core/vector.h"
#ifdef __cplusplus
extern "C" {
#endif
-void _vector3_api_anchor() {
-}
+void _vector3_api_anchor() {}
-godot_vector3 GDAPI godot_vector3_new(const godot_real p_x, const godot_real p_y, const godot_real p_z) {
- godot_vector3 value;
- Vector3 *v = (Vector3 *)&value;
- *v = Vector3(p_x, p_y, p_z);
- return value;
-}
+void GDAPI godot_vector3_new(godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z) {
-void GDAPI godot_vector3_set_axis(godot_vector3 *p_v, const godot_int p_axis, const godot_real p_val) {
- Vector3 *v = (Vector3 *)p_v;
- v->set_axis(p_axis, p_val);
+ Vector3 *dest = (Vector3 *)r_dest;
+ *dest = Vector3(p_x, p_y, p_z);
}
-godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_v, const godot_int p_axis) {
- Vector3 *v = (Vector3 *)p_v;
- return v->get_axis(p_axis);
+godot_string GDAPI godot_vector3_as_string(const godot_vector3 *p_self) {
+ godot_string ret;
+ const Vector3 *self = (const Vector3 *)p_self;
+ memnew_placement(&ret, String(*self));
+ return ret;
}
-godot_int GDAPI godot_vector3_min_axis(const godot_vector3 *p_v) {
- Vector3 *v = (Vector3 *)p_v;
- return v->min_axis();
+godot_int GDAPI godot_vector3_min_axis(const godot_vector3 *p_self) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ return self->min_axis();
}
-godot_int GDAPI godot_vector3_max_axis(const godot_vector3 *p_v) {
- Vector3 *v = (Vector3 *)p_v;
- return v->max_axis();
+godot_int GDAPI godot_vector3_max_axis(const godot_vector3 *p_self) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ return self->max_axis();
}
-godot_real GDAPI godot_vector3_length(const godot_vector3 *p_v) {
- Vector3 *v = (Vector3 *)p_v;
- return v->length();
+godot_real GDAPI godot_vector3_length(const godot_vector3 *p_self) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ return self->length();
}
-godot_real GDAPI godot_vector3_length_squared(const godot_vector3 *p_v) {
- Vector3 *v = (Vector3 *)p_v;
- return v->length_squared();
+godot_real GDAPI godot_vector3_length_squared(const godot_vector3 *p_self) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ return self->length_squared();
}
-void GDAPI godot_vector3_normalize(godot_vector3 *p_v) {
- Vector3 *v = (Vector3 *)p_v;
- v->normalize();
+godot_bool GDAPI godot_vector3_is_normalized(const godot_vector3 *p_self) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ return self->is_normalized();
}
-godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_v) {
+godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- *d = v->normalized();
+ const Vector3 *self = (const Vector3 *)p_self;
+ *((Vector3 *)&dest) = self->normalized();
return dest;
}
-godot_vector3 godot_vector3_inverse(const godot_vector3 *p_v) {
+godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = v->inverse();
+ const Vector3 *self = (const Vector3 *)p_self;
+ *((Vector3 *)&dest) = self->inverse();
return dest;
}
-void godot_vector3_zero(godot_vector3 *p_v) {
- Vector3 *v = (Vector3 *)p_v;
- v->zero();
-}
-
-void godot_vector3_snap(godot_vector3 *p_v, const godot_real val) {
- Vector3 *v = (Vector3 *)p_v;
- v->snap(val);
-}
-
-godot_vector3 godot_vector3_snapped(const godot_vector3 *p_v, const godot_real val) {
+godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_real p_by) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = v->snapped(val);
- return dest;
-}
+ const Vector3 *self = (const Vector3 *)p_self;
-void godot_vector3_rotate(godot_vector3 *p_v, const godot_vector3 p_axis, const godot_real phi) {
- Vector3 *v = (Vector3 *)p_v;
- const Vector3 *axis = (Vector3 *)&p_axis;
- v->rotate(*axis, phi);
+ *((Vector3 *)&dest) = self->snapped(p_by);
+ return dest;
}
-godot_vector3 godot_vector3_rotated(const godot_vector3 *p_v, const godot_vector3 p_axis, const godot_real phi) {
+godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *axis = (Vector3 *)&p_axis;
- *d = v->rotated(*axis, phi);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *axis = (const Vector3 *)p_axis;
+ *((Vector3 *)&dest) = self->rotated(*axis, p_phi);
return dest;
}
-godot_vector3 godot_vector3_linear_interpolate(const godot_vector3 *p_v, const godot_vector3 p_b, const godot_real t) {
+godot_vector3 GDAPI godot_vector3_linear_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *b = (Vector3 *)&p_b;
- *d = v->linear_interpolate(*b, t);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *((Vector3 *)&dest) = self->linear_interpolate(*b, p_t);
return dest;
}
-godot_vector3 godot_vector3_cubic_interpolate(const godot_vector3 *p_v,
- const godot_vector3 p_b, const godot_vector3 p_pre_a,
- const godot_vector3 p_post_b, const godot_real t) {
+godot_vector3 GDAPI godot_vector3_cubic_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *b = (Vector3 *)&p_b;
- const Vector3 *pre_a = (Vector3 *)&p_pre_a;
- const Vector3 *post_b = (Vector3 *)&p_post_b;
- *d = v->cubic_interpolate(*b, *pre_a, *post_b, t);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ const Vector3 *pre_a = (const Vector3 *)p_pre_a;
+ const Vector3 *post_b = (const Vector3 *)p_post_b;
+ *((Vector3 *)&dest) = self->cubic_interpolate(*b, *pre_a, *post_b, p_t);
return dest;
}
-godot_vector3 godot_vector3_cubic_interpolaten(const godot_vector3 *p_v,
- const godot_vector3 p_b, const godot_vector3 p_pre_a,
- const godot_vector3 p_post_b, const godot_real t) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *b = (Vector3 *)&p_b;
- const Vector3 *pre_a = (Vector3 *)&p_pre_a;
- const Vector3 *post_b = (Vector3 *)&p_post_b;
- *d = v->cubic_interpolaten(*b, *pre_a, *post_b, t);
- return dest;
+godot_real GDAPI godot_vector3_dot(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ return self->dot(*b);
}
-godot_vector3 godot_vector3_cross(const godot_vector3 *p_v, const godot_vector3 p_b) {
+godot_vector3 GDAPI godot_vector3_cross(const godot_vector3 *p_self, const godot_vector3 *p_b) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *b = (Vector3 *)&p_b;
- *d = v->cross(*b);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *((Vector3 *)&dest) = self->cross(*b);
return dest;
}
-godot_real godot_vector3_dot(const godot_vector3 *p_v, const godot_vector3 p_b) {
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *b = (Vector3 *)&p_b;
- return v->dot(*b);
-}
-
-godot_basis godot_vector3_outer(const godot_vector3 *p_v, const godot_vector3 p_b) {
+godot_basis GDAPI godot_vector3_outer(const godot_vector3 *p_self, const godot_vector3 *p_b) {
godot_basis dest;
- Basis *d = (Basis *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *b = (Vector3 *)&p_b;
- *d = v->outer(*b);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *((Basis *)&dest) = self->outer(*b);
return dest;
}
-godot_basis godot_vector3_to_diagonal_matrix(const godot_vector3 *p_v) {
+godot_basis GDAPI godot_vector3_to_diagonal_matrix(const godot_vector3 *p_self) {
godot_basis dest;
- Basis *d = (Basis *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = v->to_diagonal_matrix();
+ const Vector3 *self = (const Vector3 *)p_self;
+ *((Basis *)&dest) = self->to_diagonal_matrix();
return dest;
}
-godot_vector3 godot_vector3_abs(const godot_vector3 *p_v) {
+godot_vector3 GDAPI godot_vector3_abs(const godot_vector3 *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = v->abs();
+ const Vector3 *self = (const Vector3 *)p_self;
+ *((Vector3 *)&dest) = self->abs();
return dest;
}
-godot_vector3 godot_vector3_floor(const godot_vector3 *p_v) {
+godot_vector3 GDAPI godot_vector3_floor(const godot_vector3 *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = v->floor();
+ const Vector3 *self = (const Vector3 *)p_self;
+ *((Vector3 *)&dest) = self->floor();
return dest;
}
-godot_vector3 godot_vector3_ceil(const godot_vector3 *p_v) {
+godot_vector3 GDAPI godot_vector3_ceil(const godot_vector3 *p_self) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = v->ceil();
+ const Vector3 *self = (const Vector3 *)p_self;
+ *((Vector3 *)&dest) = self->ceil();
return dest;
}
-godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_v, const godot_vector3 p_b) {
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- return v->distance_to(*b);
+godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ return self->distance_to(*b);
}
-godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_v, const godot_vector3 p_b) {
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- return v->distance_squared_to(*b);
+godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ return self->distance_squared_to(*b);
}
-godot_real GDAPI godot_vector3_angle_to(const godot_vector3 *p_v, const godot_vector3 p_b) {
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- return v->angle_to(*b);
+godot_real GDAPI godot_vector3_angle_to(const godot_vector3 *p_self, const godot_vector3 *p_to) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *to = (const Vector3 *)p_to;
+ return self->angle_to(*to);
}
-godot_vector3 godot_vector3_slide(const godot_vector3 *p_v, const godot_vector3 p_vec) {
+godot_vector3 GDAPI godot_vector3_slide(const godot_vector3 *p_self, const godot_vector3 *p_n) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *vec = (Vector3 *)&p_vec;
- *d = v->slide(*vec);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *n = (const Vector3 *)p_n;
+ *((Vector3 *)&dest) = self->slide(*n);
return dest;
}
-godot_vector3 godot_vector3_bounce(const godot_vector3 *p_v, const godot_vector3 p_vec) {
+godot_vector3 GDAPI godot_vector3_bounce(const godot_vector3 *p_self, const godot_vector3 *p_n) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *vec = (Vector3 *)&p_vec;
- *d = v->bounce(*vec);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *n = (const Vector3 *)p_n;
+ *((Vector3 *)&dest) = self->bounce(*n);
return dest;
}
-godot_vector3 godot_vector3_reflect(const godot_vector3 *p_v, const godot_vector3 p_vec) {
+godot_vector3 GDAPI godot_vector3_reflect(const godot_vector3 *p_self, const godot_vector3 *p_n) {
godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- const Vector3 *vec = (Vector3 *)&p_vec;
- *d = v->reflect(*vec);
+ const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *n = (const Vector3 *)p_n;
+ *((Vector3 *)&dest) = self->reflect(*n);
return dest;
}
-godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_v, const godot_vector3 p_b) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- *d = *v + *b;
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ Vector3 *self = (Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *dest = *self + *b;
+ return raw_dest;
}
-godot_vector3 GDAPI godot_vector3_operator_subtract(const godot_vector3 *p_v, const godot_vector3 p_b) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- *d = *v - *b;
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_substract(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ Vector3 *self = (Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *dest = *self - *b;
+ return raw_dest;
}
-godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_v, const godot_vector3 p_b) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- *d = *v * *b;
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ Vector3 *self = (Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *dest = *self * *b;
+ return raw_dest;
}
-godot_vector3 GDAPI godot_vector3_operator_multiply_scalar(const godot_vector3 *p_v, const godot_real p_b) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- *d = *v * p_b;
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_multiply_scalar(const godot_vector3 *p_self, const godot_real p_b) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ Vector3 *self = (Vector3 *)p_self;
+ *dest = *self * p_b;
+ return raw_dest;
}
-godot_vector3 GDAPI godot_vector3_operator_divide_vector(const godot_vector3 *p_v, const godot_vector3 p_b) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- *d = *v / *b;
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_divide_vector(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ Vector3 *self = (Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ *dest = *self / *b;
+ return raw_dest;
}
-godot_vector3 GDAPI godot_vector3_operator_divide_scalar(const godot_vector3 *p_v, const godot_real p_b) {
- godot_vector3 dest;
- Vector3 *d = (Vector3 *)&dest;
- Vector3 *v = (Vector3 *)p_v;
- *d = *v / p_b;
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_divide_scalar(const godot_vector3 *p_self, const godot_real p_b) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ Vector3 *self = (Vector3 *)p_self;
+ *dest = *self / p_b;
+ return raw_dest;
}
-godot_bool GDAPI godot_vector3_operator_equal(const godot_vector3 *p_v, const godot_vector3 p_b) {
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- return *v == *b;
+godot_bool GDAPI godot_vector3_operator_equal(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ Vector3 *self = (Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ return *self == *b;
}
-godot_bool GDAPI godot_vector3_operator_less(const godot_vector3 *p_v, const godot_vector3 p_b) {
- Vector3 *v = (Vector3 *)p_v;
- Vector3 *b = (Vector3 *)&p_b;
- return *v < *b;
+godot_bool GDAPI godot_vector3_operator_less(const godot_vector3 *p_self, const godot_vector3 *p_b) {
+ Vector3 *self = (Vector3 *)p_self;
+ const Vector3 *b = (const Vector3 *)p_b;
+ return *self < *b;
}
-godot_string GDAPI godot_vector3_to_string(const godot_vector3 *p_v) {
- godot_string dest;
- String *d = (String *)&dest;
- const Vector3 *v = (Vector3 *)p_v;
- *d = "(" + *v + ")";
- return dest;
+godot_vector3 GDAPI godot_vector3_operator_neg(const godot_vector3 *p_self) {
+ godot_vector3 raw_dest;
+ Vector3 *dest = (Vector3 *)&raw_dest;
+ const Vector3 *self = (const Vector3 *)p_self;
+ *dest = -(*self);
+ return raw_dest;
+}
+
+void GDAPI godot_vector3_set_axis(godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val) {
+ Vector3 *self = (Vector3 *)p_self;
+ self->set_axis(p_axis, p_val);
+}
+
+godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_self, const godot_vector3_axis p_axis) {
+ const Vector3 *self = (const Vector3 *)p_self;
+ return self->get_axis(p_axis);
}
#ifdef __cplusplus
diff --git a/modules/gdnative/godot/godot_vector3.h b/modules/gdnative/godot/godot_vector3.h
index 654ddd7792..8e2aed8173 100644
--- a/modules/gdnative/godot/godot_vector3.h
+++ b/modules/gdnative/godot/godot_vector3.h
@@ -37,74 +37,94 @@ extern "C" {
#include <stdint.h>
#ifndef GODOT_CORE_API_GODOT_VECTOR3_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_VECTOR3_TYPE_DEFINED
typedef struct godot_vector3 {
uint8_t _dont_touch_that[12];
} godot_vector3;
#endif
-#define GODOT_VECTOR3_AXIX_X 0
-#define GODOT_VECTOR3_AXIX_Y 1
-#define GODOT_VECTOR3_AXIX_Z 2
-
#include "../godot.h"
#include "godot_basis.h"
-godot_vector3 GDAPI godot_vector3_new(const godot_real p_x, const godot_real p_y, const godot_real p_z);
-
-void GDAPI godot_vector3_set_axis(godot_vector3 *p_v, const godot_int p_axis, const godot_real p_val);
-godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_v, const godot_int p_axis);
-
-godot_int GDAPI godot_vector3_min_axis(const godot_vector3 *p_v);
-godot_int GDAPI godot_vector3_max_axis(const godot_vector3 *p_v);
-
-godot_real GDAPI godot_vector3_length(const godot_vector3 *p_v);
-godot_real GDAPI godot_vector3_length_squared(const godot_vector3 *p_v);
-
-void GDAPI godot_vector3_normalize(godot_vector3 *p_v);
-godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_v);
-
-godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_v);
-void GDAPI godot_vector3_zero(godot_vector3 *p_v);
-void GDAPI godot_vector3_snap(godot_vector3 *p_v, const godot_real val);
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_v, const godot_real val);
-void GDAPI godot_vector3_rotate(godot_vector3 *p_v, const godot_vector3 p_axis, const godot_real phi);
-godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_v,
- const godot_vector3 p_axis, const godot_real phi);
-godot_vector3 GDAPI godot_vector3_linear_interpolate(const godot_vector3 *p_v,
- const godot_vector3 p_b, const godot_real t);
-godot_vector3 GDAPI godot_vector3_cubic_interpolate(const godot_vector3 *p_v,
- const godot_vector3 p_b, const godot_vector3 p_pre_a,
- const godot_vector3 p_post_b, const godot_real t);
-godot_vector3 GDAPI godot_vector3_cubic_interpolaten(const godot_vector3 *p_v,
- const godot_vector3 p_b, const godot_vector3 p_pre_a,
- const godot_vector3 p_post_b, const godot_real t);
-godot_vector3 GDAPI godot_vector3_cross(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_real GDAPI godot_vector3_dot(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_basis GDAPI godot_vector3_outer(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_basis GDAPI godot_vector3_to_diagonal_matrix(const godot_vector3 *p_v);
-godot_vector3 GDAPI godot_vector3_abs(const godot_vector3 *p_v);
-godot_vector3 GDAPI godot_vector3_floor(const godot_vector3 *p_v);
-godot_vector3 GDAPI godot_vector3_ceil(const godot_vector3 *p_v);
-
-godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_real GDAPI godot_vector3_angle_to(const godot_vector3 *p_v, const godot_vector3 p_b);
-
-godot_vector3 GDAPI godot_vector3_slide(const godot_vector3 *p_v, const godot_vector3 p_vec);
-godot_vector3 GDAPI godot_vector3_bounce(const godot_vector3 *p_v, const godot_vector3 p_vec);
-godot_vector3 GDAPI godot_vector3_reflect(const godot_vector3 *p_v, const godot_vector3 p_vec);
-
-godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_vector3 GDAPI godot_vector3_operator_subtract(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_vector3 GDAPI godot_vector3_operator_multiply_scalar(const godot_vector3 *p_v, const godot_real p_b);
-godot_vector3 GDAPI godot_vector3_operator_divide_vector(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_vector3 GDAPI godot_vector3_operator_divide_scalar(const godot_vector3 *p_v, const godot_real p_b);
-
-godot_bool GDAPI godot_vector3_operator_equal(const godot_vector3 *p_v, const godot_vector3 p_b);
-godot_bool GDAPI godot_vector3_operator_less(const godot_vector3 *p_v, const godot_vector3 p_b);
-
-godot_string GDAPI godot_vector3_to_string(const godot_vector3 *p_v);
+typedef enum {
+ GODOT_VECTOR3_AXIS_X,
+ GODOT_VECTOR3_AXIS_Y,
+ GODOT_VECTOR3_AXIS_Z,
+} godot_vector3_axis;
+
+void GDAPI godot_vector3_new(godot_vector3 *r_dest, const godot_real p_x, const godot_real p_y, const godot_real p_z);
+
+godot_string GDAPI godot_vector3_as_string(const godot_vector3 *p_self);
+
+godot_int GDAPI godot_vector3_min_axis(const godot_vector3 *p_self);
+
+godot_int GDAPI godot_vector3_max_axis(const godot_vector3 *p_self);
+
+godot_real GDAPI godot_vector3_length(const godot_vector3 *p_self);
+
+godot_real GDAPI godot_vector3_length_squared(const godot_vector3 *p_self);
+
+godot_bool GDAPI godot_vector3_is_normalized(const godot_vector3 *p_self);
+
+godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_self);
+
+godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self);
+
+godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_real p_by);
+
+godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi);
+
+godot_vector3 GDAPI godot_vector3_linear_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_real p_t);
+
+godot_vector3 GDAPI godot_vector3_cubic_interpolate(const godot_vector3 *p_self, const godot_vector3 *p_b, const godot_vector3 *p_pre_a, const godot_vector3 *p_post_b, const godot_real p_t);
+
+godot_real GDAPI godot_vector3_dot(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_vector3 GDAPI godot_vector3_cross(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_basis GDAPI godot_vector3_outer(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_basis GDAPI godot_vector3_to_diagonal_matrix(const godot_vector3 *p_self);
+
+godot_vector3 GDAPI godot_vector3_abs(const godot_vector3 *p_self);
+
+godot_vector3 GDAPI godot_vector3_floor(const godot_vector3 *p_self);
+
+godot_vector3 GDAPI godot_vector3_ceil(const godot_vector3 *p_self);
+
+godot_real GDAPI godot_vector3_distance_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_real GDAPI godot_vector3_distance_squared_to(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_real GDAPI godot_vector3_angle_to(const godot_vector3 *p_self, const godot_vector3 *p_to);
+
+godot_vector3 GDAPI godot_vector3_slide(const godot_vector3 *p_self, const godot_vector3 *p_n);
+
+godot_vector3 GDAPI godot_vector3_bounce(const godot_vector3 *p_self, const godot_vector3 *p_n);
+
+godot_vector3 GDAPI godot_vector3_reflect(const godot_vector3 *p_self, const godot_vector3 *p_n);
+
+godot_vector3 GDAPI godot_vector3_operator_add(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_vector3 GDAPI godot_vector3_operator_substract(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_vector3 GDAPI godot_vector3_operator_multiply_vector(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_vector3 GDAPI godot_vector3_operator_multiply_scalar(const godot_vector3 *p_self, const godot_real p_b);
+
+godot_vector3 GDAPI godot_vector3_operator_divide_vector(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_vector3 GDAPI godot_vector3_operator_divide_scalar(const godot_vector3 *p_self, const godot_real p_b);
+
+godot_bool GDAPI godot_vector3_operator_equal(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_bool GDAPI godot_vector3_operator_less(const godot_vector3 *p_self, const godot_vector3 *p_b);
+
+godot_vector3 GDAPI godot_vector3_operator_neg(const godot_vector3 *p_self);
+
+void GDAPI godot_vector3_set_axis(godot_vector3 *p_self, const godot_vector3_axis p_axis, const godot_real p_val);
+
+godot_real GDAPI godot_vector3_get_axis(const godot_vector3 *p_self, const godot_vector3_axis p_axis);
#ifdef __cplusplus
}
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 5d404e2f7d..eea5b15236 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -1321,7 +1321,7 @@ static void _find_identifiers(GDCompletionContext &context, int p_line, bool p_o
static const char *_type_names[Variant::VARIANT_MAX] = {
"null", "bool", "int", "float", "String", "Vector2", "Rect2", "Vector3", "Transform2D", "Plane", "Quat", "AABB", "Basis", "Transform",
- "Color", "Image", "NodePath", "RID", "Object", "InputEvent", "Dictionary", "Array", "RawArray", "IntArray", "FloatArray", "StringArray",
+ "Color", "NodePath", "RID", "Object", "Dictionary", "Array", "RawArray", "IntArray", "FloatArray", "StringArray",
"Vector2Array", "Vector3Array", "ColorArray"
};
@@ -1425,22 +1425,7 @@ void get_directory_contents(EditorFileSystemDirectory *p_dir, Set<String> &r_lis
static void _find_type_arguments(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, const StringName &p_method, const GDCompletionIdentifier &id, int p_argidx, Set<String> &result, String &arghint) {
//print_line("find type arguments?");
- if (id.type == Variant::INPUT_EVENT && String(p_method) == "is_action" && p_argidx == 0) {
-
- List<PropertyInfo> pinfo;
- GlobalConfig::get_singleton()->get_property_list(&pinfo);
-
- for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
- const PropertyInfo &pi = E->get();
-
- if (!pi.name.begins_with("input/"))
- continue;
-
- String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
- result.insert("\"" + name + "\"");
- }
-
- } else if (id.type == Variant::OBJECT && id.obj_type != StringName()) {
+ if (id.type == Variant::OBJECT && id.obj_type != StringName()) {
MethodBind *m = ClassDB::get_method(id.obj_type, p_method);
if (!m) {
@@ -2266,54 +2251,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
}
} else {
- if (t.type == Variant::INPUT_EVENT) {
-
- //this is hardcoded otherwise it's not obvious
- Set<String> exclude;
-
- for (int i = 0; i < InputEvent::TYPE_MAX; i++) {
-
- InputEvent ie;
- ie.type = InputEvent::Type(i);
- static const char *evnames[] = {
- "# Common",
- "# Key",
- "# MouseMotion",
- "# MouseButton",
- "# JoypadMotion",
- "# JoypadButton",
- "# ScreenTouch",
- "# ScreenDrag",
- "# Action"
- };
-
- r_options->push_back(evnames[i]);
-
- Variant v = ie;
-
- if (i == 0) {
- List<MethodInfo> mi;
- v.get_method_list(&mi);
- for (List<MethodInfo>::Element *E = mi.front(); E; E = E->next()) {
- r_options->push_back(E->get().name + "(");
- }
- }
-
- List<PropertyInfo> pi;
- v.get_property_list(&pi);
-
- for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) {
-
- if (i == 0)
- exclude.insert(E->get().name);
- else if (exclude.has(E->get().name))
- continue;
-
- r_options->push_back(E->get().name);
- }
- }
- return OK;
- } else {
+ //check InputEvent hint
+ {
if (t.value.get_type() == Variant::NIL) {
Variant::CallError ce;
t.value = Variant::construct(t.type, NULL, 0, ce);
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index 608256c88a..fb32d23ad5 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -1433,9 +1433,21 @@ Variant GDFunctionState::_signal_callback(const Variant **p_args, int p_argcount
return ret;
}
-bool GDFunctionState::is_valid() const {
+bool GDFunctionState::is_valid(bool p_extended_check) const {
+
+ if (function == NULL)
+ return false;
+
+ if (p_extended_check) {
+ //class instance gone?
+ if (state.instance_id && !ObjectDB::get_instance(state.instance_id))
+ return false;
+ //script gone?
+ if (state.script_id && !ObjectDB::get_instance(state.script_id))
+ return false;
+ }
- return function != NULL;
+ return true;
}
Variant GDFunctionState::resume(const Variant &p_arg) {
@@ -1464,7 +1476,7 @@ Variant GDFunctionState::resume(const Variant &p_arg) {
void GDFunctionState::_bind_methods() {
ClassDB::bind_method(D_METHOD("resume:Variant", "arg"), &GDFunctionState::resume, DEFVAL(Variant()));
- ClassDB::bind_method(D_METHOD("is_valid"), &GDFunctionState::is_valid);
+ ClassDB::bind_method(D_METHOD("is_valid", "extended_check"), &GDFunctionState::is_valid, DEFVAL(false));
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "_signal_callback", &GDFunctionState::_signal_callback, MethodInfo("_signal_callback"));
}
diff --git a/modules/gdscript/gd_function.h b/modules/gdscript/gd_function.h
index f0bf33147b..6d20b19777 100644
--- a/modules/gdscript/gd_function.h
+++ b/modules/gdscript/gd_function.h
@@ -237,7 +237,7 @@ protected:
static void _bind_methods();
public:
- bool is_valid() const;
+ bool is_valid(bool p_extended_check = false) const;
Variant resume(const Variant &p_arg = Variant());
GDFunctionState();
~GDFunctionState();
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp
index 13674f1f9a..5e1a48ae86 100644
--- a/modules/gdscript/gd_tokenizer.cpp
+++ b/modules/gdscript/gd_tokenizer.cpp
@@ -800,10 +800,8 @@ void GDTokenizerText::_advance() {
{ Variant::BASIS, "Basis" },
{ Variant::TRANSFORM, "Transform" },
{ Variant::COLOR, "Color" },
- { Variant::IMAGE, "Image" },
{ Variant::_RID, "RID" },
{ Variant::OBJECT, "Object" },
- { Variant::INPUT_EVENT, "InputEvent" },
{ Variant::NODE_PATH, "NodePath" },
{ Variant::DICTIONARY, "Dictionary" },
{ Variant::ARRAY, "Array" },
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index d8993710a4..e567e08c79 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -508,146 +508,150 @@ void GridMapEditor::_duplicate_paste() {
}
}
-bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const InputEvent &p_event) {
+bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<InputEvent> &p_event) {
if (!node) {
return false;
}
if (edit_mode->get_selected() == 0) { // regular click
- switch (p_event.type) {
- case InputEvent::MOUSE_BUTTON: {
- if (p_event.mouse_button.button_index == BUTTON_WHEEL_UP && (p_event.mouse_button.mod.command || p_event.mouse_button.mod.shift)) {
- if (p_event.mouse_button.pressed)
- floor->set_value(floor->get_value() + p_event.mouse_button.factor);
+ Ref<InputEventMouseButton> mb = p_event;
- return true; //eaten
- } else if (p_event.mouse_button.button_index == BUTTON_WHEEL_DOWN && (p_event.mouse_button.mod.command || p_event.mouse_button.mod.shift)) {
- if (p_event.mouse_button.pressed)
- floor->set_value(floor->get_value() - p_event.mouse_button.factor);
- return true;
- }
+ if (mb.is_valid()) {
- if (p_event.mouse_button.pressed) {
+ if (mb->get_button_index() == BUTTON_WHEEL_UP && (mb->get_command() || mb->get_shift())) {
+ if (mb->is_pressed())
+ floor->set_value(floor->get_value() + mb->get_factor());
- if (p_event.mouse_button.button_index == BUTTON_LEFT) {
+ return true; //eaten
+ } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && (mb->get_command() || mb->get_shift())) {
+ if (mb->is_pressed())
+ floor->set_value(floor->get_value() - mb->get_factor());
+ return true;
+ }
- if (input_action == INPUT_DUPLICATE) {
+ if (mb->is_pressed()) {
- //paste
- _duplicate_paste();
- input_action = INPUT_NONE;
- _update_duplicate_indicator();
- } else if (p_event.mouse_button.mod.shift) {
- input_action = INPUT_SELECT;
- } else if (p_event.mouse_button.mod.command)
- input_action = INPUT_COPY;
- else {
- input_action = INPUT_PAINT;
- set_items.clear();
- }
- } else if (p_event.mouse_button.button_index == BUTTON_RIGHT)
- if (input_action == INPUT_DUPLICATE) {
-
- input_action = INPUT_NONE;
- _update_duplicate_indicator();
- } else {
- input_action = INPUT_ERASE;
- set_items.clear();
- }
- else
- return false;
+ if (mb->get_button_index() == BUTTON_LEFT) {
- return do_input_action(p_camera, Point2(p_event.mouse_button.x, p_event.mouse_button.y), true);
- } else {
+ if (input_action == INPUT_DUPLICATE) {
- if (
- (p_event.mouse_button.button_index == BUTTON_RIGHT && input_action == INPUT_ERASE) ||
- (p_event.mouse_button.button_index == BUTTON_LEFT && input_action == INPUT_PAINT)) {
+ //paste
+ _duplicate_paste();
+ input_action = INPUT_NONE;
+ _update_duplicate_indicator();
+ } else if (mb->get_shift()) {
+ input_action = INPUT_SELECT;
+ } else if (mb->get_command())
+ input_action = INPUT_COPY;
+ else {
+ input_action = INPUT_PAINT;
+ set_items.clear();
+ }
+ } else if (mb->get_button_index() == BUTTON_RIGHT)
+ if (input_action == INPUT_DUPLICATE) {
- if (set_items.size()) {
- undo_redo->create_action("GridMap Paint");
- for (List<SetItem>::Element *E = set_items.front(); E; E = E->next()) {
+ input_action = INPUT_NONE;
+ _update_duplicate_indicator();
+ } else {
+ input_action = INPUT_ERASE;
+ set_items.clear();
+ }
+ else
+ return false;
+
+ return do_input_action(p_camera, Point2(mb->get_pos().x, mb->get_pos().y), true);
+ } else {
- const SetItem &si = E->get();
- undo_redo->add_do_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.new_value, si.new_orientation);
- }
- for (List<SetItem>::Element *E = set_items.back(); E; E = E->prev()) {
+ if (
+ (mb->get_button_index() == BUTTON_RIGHT && input_action == INPUT_ERASE) ||
+ (mb->get_button_index() == BUTTON_LEFT && input_action == INPUT_PAINT)) {
- const SetItem &si = E->get();
- undo_redo->add_undo_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.old_value, si.old_orientation);
- }
+ if (set_items.size()) {
+ undo_redo->create_action("GridMap Paint");
+ for (List<SetItem>::Element *E = set_items.front(); E; E = E->next()) {
- undo_redo->commit_action();
+ const SetItem &si = E->get();
+ undo_redo->add_do_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.new_value, si.new_orientation);
}
- set_items.clear();
- input_action = INPUT_NONE;
- return true;
- }
+ for (List<SetItem>::Element *E = set_items.back(); E; E = E->prev()) {
- if (p_event.mouse_button.button_index == BUTTON_LEFT && input_action != INPUT_NONE) {
+ const SetItem &si = E->get();
+ undo_redo->add_undo_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.old_value, si.old_orientation);
+ }
- set_items.clear();
- input_action = INPUT_NONE;
- return true;
- }
- if (p_event.mouse_button.button_index == BUTTON_RIGHT && (input_action == INPUT_ERASE || input_action == INPUT_DUPLICATE)) {
- input_action = INPUT_NONE;
- return true;
+ undo_redo->commit_action();
}
+ set_items.clear();
+ input_action = INPUT_NONE;
+ return true;
+ }
+
+ if (mb->get_button_index() == BUTTON_LEFT && input_action != INPUT_NONE) {
+
+ set_items.clear();
+ input_action = INPUT_NONE;
+ return true;
+ }
+ if (mb->get_button_index() == BUTTON_RIGHT && (input_action == INPUT_ERASE || input_action == INPUT_DUPLICATE)) {
+ input_action = INPUT_NONE;
+ return true;
}
- } break;
- case InputEvent::MOUSE_MOTION: {
+ }
+ }
+
+ Ref<InputEventMouseMotion> mm = p_event;
- return do_input_action(p_camera, Point2(p_event.mouse_motion.x, p_event.mouse_motion.y), false);
- } break;
+ if (mm.is_valid()) {
+
+ return do_input_action(p_camera, mm->get_pos(), false);
}
} else if (edit_mode->get_selected() == 1) {
//area mode, select an area
- switch (p_event.type) {
- case InputEvent::MOUSE_BUTTON: {
+ Ref<InputEventMouseButton> mb = p_event;
- if (p_event.mouse_button.button_index == BUTTON_LEFT && p_event.mouse_button.pressed) {
+ if (mb.is_valid()) {
- Point2 point = Point2(p_event.mouse_motion.x, p_event.mouse_motion.y);
+ if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
- Camera *camera = p_camera;
- Vector3 from = camera->project_ray_origin(point);
- Vector3 normal = camera->project_ray_normal(point);
- Transform local_xform = node->get_global_transform().affine_inverse();
- from = local_xform.xform(from);
- normal = local_xform.basis.xform(normal).normalized();
+ Point2 point = mb->get_pos();
- List<int> areas;
- node->get_area_list(&areas);
+ Camera *camera = p_camera;
+ Vector3 from = camera->project_ray_origin(point);
+ Vector3 normal = camera->project_ray_normal(point);
+ Transform local_xform = node->get_global_transform().affine_inverse();
+ from = local_xform.xform(from);
+ normal = local_xform.basis.xform(normal).normalized();
- float min_d = 1e10;
- int min_area = -1;
+ List<int> areas;
+ node->get_area_list(&areas);
- for (List<int>::Element *E = areas.front(); E; E = E->next()) {
+ float min_d = 1e10;
+ int min_area = -1;
- int area = E->get();
- Rect3 aabb = node->area_get_bounds(area);
- aabb.pos *= node->get_cell_size();
- aabb.size *= node->get_cell_size();
+ for (List<int>::Element *E = areas.front(); E; E = E->next()) {
- Vector3 rclip, rnormal;
- if (!aabb.intersects_segment(from, from + normal * 10000, &rclip, &rnormal))
- continue;
+ int area = E->get();
+ Rect3 aabb = node->area_get_bounds(area);
+ aabb.pos *= node->get_cell_size();
+ aabb.size *= node->get_cell_size();
- float d = normal.dot(rclip);
- if (d < min_d) {
- min_d = d;
- min_area = area;
- }
- }
+ Vector3 rclip, rnormal;
+ if (!aabb.intersects_segment(from, from + normal * 10000, &rclip, &rnormal))
+ continue;
- selected_area = min_area;
- update_areas();
+ float d = normal.dot(rclip);
+ if (d < min_d) {
+ min_d = d;
+ min_area = area;
+ }
}
- } break;
+
+ selected_area = min_area;
+ update_areas();
+ }
}
}
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index d928e6afac..1572f4fbe5 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -220,7 +220,7 @@ protected:
static void _bind_methods();
public:
- bool forward_spatial_input_event(Camera *p_camera, const InputEvent &p_event);
+ bool forward_spatial_input_event(Camera *p_camera, const Ref<InputEvent> &p_event);
void edit(GridMap *p_gridmap);
GridMapEditor() {}
@@ -236,7 +236,7 @@ class GridMapEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_spatial_input_event(Camera *p_camera, const InputEvent &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); }
+ virtual bool forward_spatial_input_event(Camera *p_camera, const Ref<InputEvent> &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); }
virtual String get_name() const { return "GridMap"; }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp
index 83685d6446..0741dd198a 100644
--- a/modules/jpg/image_loader_jpegd.cpp
+++ b/modules/jpg/image_loader_jpegd.cpp
@@ -89,7 +89,7 @@ Error jpeg_load_image_from_buffer(Image *p_image, const uint8_t *p_buffer, int p
return OK;
}
-Error ImageLoaderJPG::load_image(Image *p_image, FileAccess *f) {
+Error ImageLoaderJPG::load_image(Ref<Image> p_image, FileAccess *f) {
PoolVector<uint8_t> src_image;
int src_image_len = f->get_len();
@@ -102,7 +102,7 @@ Error ImageLoaderJPG::load_image(Image *p_image, FileAccess *f) {
f->close();
- Error err = jpeg_load_image_from_buffer(p_image, w.ptr(), src_image_len);
+ Error err = jpeg_load_image_from_buffer(p_image.ptr(), w.ptr(), src_image_len);
w = PoolVector<uint8_t>::Write();
@@ -115,10 +115,11 @@ void ImageLoaderJPG::get_recognized_extensions(List<String> *p_extensions) const
p_extensions->push_back("jpeg");
}
-static Image _jpegd_mem_loader_func(const uint8_t *p_png, int p_size) {
+static Ref<Image> _jpegd_mem_loader_func(const uint8_t *p_png, int p_size) {
- Image img;
- Error err = jpeg_load_image_from_buffer(&img, p_png, p_size);
+ Ref<Image> img;
+ img.instance();
+ Error err = jpeg_load_image_from_buffer(img.ptr(), p_png, p_size);
if (err)
ERR_PRINT("Couldn't initialize ImageLoaderJPG with the given resource.");
diff --git a/modules/jpg/image_loader_jpegd.h b/modules/jpg/image_loader_jpegd.h
index d23e8a7d48..57d7a2bb1c 100644
--- a/modules/jpg/image_loader_jpegd.h
+++ b/modules/jpg/image_loader_jpegd.h
@@ -38,7 +38,7 @@
class ImageLoaderJPG : public ImageFormatLoader {
public:
- virtual Error load_image(Image *p_image, FileAccess *f);
+ virtual Error load_image(Ref<Image> p_image, FileAccess *f);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
ImageLoaderJPG();
};
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index 62cbd9cd8d..bdd4779e28 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -164,8 +164,8 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
print_line("flip: " + itos(flags & PVR_VFLIP));
- Image image(width, height, mipmaps, format, data);
- ERR_FAIL_COND_V(image.empty(), RES());
+ Ref<Image> image = memnew(Image(width, height, mipmaps, format, data));
+ ERR_FAIL_COND_V(image->empty(), RES());
Ref<ImageTexture> texture = memnew(ImageTexture);
texture->create_from_image(image, tex_flags);
@@ -193,30 +193,32 @@ String ResourceFormatPVR::get_resource_type(const String &p_path) const {
static void _compress_pvrtc4(Image *p_img) {
- Image img = *p_img;
+ Ref<Image> img = p_img->duplicate();
bool make_mipmaps = false;
- if (img.get_width() % 8 || img.get_height() % 8) {
- make_mipmaps = img.has_mipmaps();
- img.resize(img.get_width() + (8 - (img.get_width() % 8)), img.get_height() + (8 - (img.get_height() % 8)));
+ if (img->get_width() % 8 || img->get_height() % 8) {
+ make_mipmaps = img->has_mipmaps();
+ img->resize(img->get_width() + (8 - (img->get_width() % 8)), img->get_height() + (8 - (img->get_height() % 8)));
}
- img.convert(Image::FORMAT_RGBA8);
- if (!img.has_mipmaps() && make_mipmaps)
- img.generate_mipmaps();
+ img->convert(Image::FORMAT_RGBA8);
+ if (!img->has_mipmaps() && make_mipmaps)
+ img->generate_mipmaps();
- bool use_alpha = img.detect_alpha();
+ bool use_alpha = img->detect_alpha();
- Image new_img;
- new_img.create(img.get_width(), img.get_height(), true, use_alpha ? Image::FORMAT_PVRTC4A : Image::FORMAT_PVRTC4);
- PoolVector<uint8_t> data = new_img.get_data();
+ Ref<Image> new_img;
+ new_img.instance();
+ new_img->create(img->get_width(), img->get_height(), true, use_alpha ? Image::FORMAT_PVRTC4A : Image::FORMAT_PVRTC4);
+
+ PoolVector<uint8_t> data = new_img->get_data();
{
PoolVector<uint8_t>::Write wr = data.write();
- PoolVector<uint8_t>::Read r = img.get_data().read();
+ PoolVector<uint8_t>::Read r = img->get_data().read();
- for (int i = 0; i <= new_img.get_mipmap_count(); i++) {
+ for (int i = 0; i <= new_img->get_mipmap_count(); i++) {
int ofs, size, w, h;
- img.get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h);
+ img->get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h);
Javelin::RgbaBitmap bm(w, h);
copymem(bm.GetData(), &r[ofs], size);
{
@@ -226,12 +228,12 @@ static void _compress_pvrtc4(Image *p_img) {
}
}
- new_img.get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h);
+ new_img->get_mipmap_offset_size_and_dimensions(i, ofs, size, w, h);
Javelin::PvrTcEncoder::EncodeRgba4Bpp(&wr[ofs], bm);
}
}
- *p_img = Image(new_img.get_width(), new_img.get_height(), new_img.has_mipmaps(), new_img.get_format(), data);
+ p_img->create(new_img->get_width(), new_img->get_height(), new_img->has_mipmaps(), new_img->get_format(), data);
}
ResourceFormatPVR::ResourceFormatPVR() {
@@ -676,8 +678,7 @@ static void _pvrtc_decompress(Image *p_img) {
r = PoolVector<uint8_t>::Read();
bool make_mipmaps = p_img->has_mipmaps();
- Image newimg(p_img->get_width(), p_img->get_height(), false, Image::FORMAT_RGBA8, newdata);
+ p_img->create(p_img->get_width(), p_img->get_height(), false, Image::FORMAT_RGBA8, newdata);
if (make_mipmaps)
- newimg.generate_mipmaps();
- *p_img = newimg;
+ p_img->generate_mipmaps();
}
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index 3f7ad8b2c2..5c53492034 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -39,6 +39,46 @@
#include <squish.h>
+void image_decompress_squish(Image *p_image) {
+ int w = p_image->get_width();
+ int h = p_image->get_height();
+
+ Image::Format target_format = Image::FORMAT_RGBA8;
+ PoolVector<uint8_t> data;
+ int target_size = Image::get_image_data_size(w, h, target_format, p_image->has_mipmaps() ? -1 : 0);
+ int mm_count = p_image->get_mipmap_count();
+ data.resize(target_size);
+
+ PoolVector<uint8_t>::Read rb = p_image->get_data().read();
+ PoolVector<uint8_t>::Write wb = data.write();
+
+ int squish_flags = Image::FORMAT_MAX;
+ if (p_image->get_format() == Image::FORMAT_DXT1) {
+ squish_flags = squish::kDxt1;
+ } else if (p_image->get_format() == Image::FORMAT_DXT3) {
+ squish_flags = squish::kDxt3;
+ } else if (p_image->get_format() == Image::FORMAT_DXT5) {
+ squish_flags = squish::kDxt5;
+ } else if (p_image->get_format() == Image::FORMAT_ATI1) {
+ squish_flags = squish::kBc4;
+ } else if (p_image->get_format() == Image::FORMAT_ATI2) {
+ squish_flags = squish::kBc5;
+ } else {
+ ERR_FAIL_COND(true);
+ return;
+ }
+
+ int dst_ofs = 0;
+
+ for (int i = 0; i <= mm_count; i++) {
+ int src_ofs = 0, mipmap_size = 0, mipmap_w = 0, mipmap_h = 0;
+ p_image->get_mipmap_offset_size_and_dimensions(i, src_ofs, mipmap_size, mipmap_w, mipmap_h);
+ squish::DecompressImage(&wb[dst_ofs], mipmap_w, mipmap_h, &rb[src_ofs], squish_flags);
+ }
+
+ p_image->create(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data);
+}
+
void image_compress_squish(Image *p_image) {
int w = p_image->get_width();
@@ -56,7 +96,7 @@ void image_compress_squish(Image *p_image) {
return; //do not compress, already compressed
int shift = 0;
- int squish_comp = squish::kColourRangeFit;
+ int squish_comp = squish::kColourRangeFit; // TODO: use lossy quality setting to determine the quality
Image::Format target_format;
if (p_image->get_format() == Image::FORMAT_LA8) {
diff --git a/modules/squish/image_compress_squish.h b/modules/squish/image_compress_squish.h
index 81f57c6822..519e3537ef 100644
--- a/modules/squish/image_compress_squish.h
+++ b/modules/squish/image_compress_squish.h
@@ -33,5 +33,6 @@
#include "image.h"
void image_compress_squish(Image *p_image);
+void image_decompress_squish(Image *p_image);
#endif // IMAGE_COMPRESS_SQUISH_H
diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp
index 41341db93b..2eeea59836 100644
--- a/modules/squish/register_types.cpp
+++ b/modules/squish/register_types.cpp
@@ -36,6 +36,7 @@
void register_squish_types() {
Image::set_compress_bc_func(image_compress_squish);
+ Image::_image_decompress_bc = image_decompress_squish;
}
void unregister_squish_types() {}
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 61112f20b4..d895f60280 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -138,7 +138,7 @@ void VideoStreamPlaybackTheora::video_write(void) {
format = Image::FORMAT_RGBA8;
}
- Image img(size.x, size.y, 0, Image::FORMAT_RGBA8, frame_data); //zero copy image creation
+ Ref<Image> img = memnew(Image(size.x, size.y, 0, Image::FORMAT_RGBA8, frame_data)); //zero copy image creation
texture->set_data(img); //zero copy send to visual server
diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp
index 4006ad3428..c0467a901b 100644
--- a/modules/visual_script/register_types.cpp
+++ b/modules/visual_script/register_types.cpp
@@ -88,7 +88,7 @@ void register_visual_script_types() {
ClassDB::register_class<VisualScriptWhile>();
ClassDB::register_class<VisualScriptIterator>();
ClassDB::register_class<VisualScriptSequence>();
- ClassDB::register_class<VisualScriptInputFilter>();
+ //ClassDB::register_class<VisualScriptInputFilter>();
ClassDB::register_class<VisualScriptSwitch>();
ClassDB::register_class<VisualScriptYield>();
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 273a819611..72843099c7 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -89,13 +89,11 @@ public:
struct TypeGuess {
Variant::Type type;
- InputEvent::Type ev_type;
StringName GDCLASS;
Ref<Script> script;
TypeGuess() {
type = Variant::NIL;
- ev_type = InputEvent::NONE;
}
};
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index d515f301ce..5839bc9243 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -346,11 +346,9 @@ static Color _color_from_type(Variant::Type p_type) {
case Variant::TRANSFORM: color = Color::html("f6a86e"); break;
case Variant::COLOR: color = Color::html("9dff70"); break;
- case Variant::IMAGE: color = Color::html("93f1b9"); break;
case Variant::NODE_PATH: color = Color::html("6993ec"); break;
case Variant::_RID: color = Color::html("69ec9a"); break;
case Variant::OBJECT: color = Color::html("79f3e8"); break;
- case Variant::INPUT_EVENT: color = Color::html("adf18f"); break;
case Variant::DICTIONARY: color = Color::html("77edb1"); break;
case Variant::ARRAY: color = Color::html("e0e0e0"); break;
@@ -451,11 +449,9 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Control::get_icon("MiniBasis", "EditorIcons"),
Control::get_icon("MiniTransform", "EditorIcons"),
Control::get_icon("MiniColor", "EditorIcons"),
- Control::get_icon("MiniImage", "EditorIcons"),
Control::get_icon("MiniPath", "EditorIcons"),
Control::get_icon("MiniRid", "EditorIcons"),
Control::get_icon("MiniObject", "EditorIcons"),
- Control::get_icon("MiniInput", "EditorIcons"),
Control::get_icon("MiniDictionary", "EditorIcons"),
Control::get_icon("MiniArray", "EditorIcons"),
Control::get_icon("MiniRawArray", "EditorIcons"),
@@ -490,7 +486,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
}
if (EditorSettings::get_singleton()->has("editors/visual_script/color_" + node->get_category())) {
- gnode->set_self_modulate(EditorSettings::get_singleton()->get("editors/visual_script/color_" + node->get_category()));
+ gnode->set_modulate(EditorSettings::get_singleton()->get("editors/visual_script/color_" + node->get_category()));
}
gnode->set_meta("__vnode", node);
@@ -735,11 +731,9 @@ void VisualScriptEditor::_update_members() {
Control::get_icon("MiniMatrix3", "EditorIcons"),
Control::get_icon("MiniTransform", "EditorIcons"),
Control::get_icon("MiniColor", "EditorIcons"),
- Control::get_icon("MiniImage", "EditorIcons"),
Control::get_icon("MiniPath", "EditorIcons"),
Control::get_icon("MiniRid", "EditorIcons"),
Control::get_icon("MiniObject", "EditorIcons"),
- Control::get_icon("MiniInput", "EditorIcons"),
Control::get_icon("MiniDictionary", "EditorIcons"),
Control::get_icon("MiniArray", "EditorIcons"),
Control::get_icon("MiniRawArray", "EditorIcons"),
@@ -1422,9 +1416,11 @@ void VisualScriptEditor::_on_nodes_duplicate() {
}
}
-void VisualScriptEditor::_input(const InputEvent &p_event) {
+void VisualScriptEditor::_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && !p_event.mouse_button.pressed && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
revert_on_drag = String(); //so we can still drag functions
}
}
@@ -2643,7 +2639,7 @@ void VisualScriptEditor::_port_action_menu(int p_option) {
} else {
n->set_call_mode(VisualScriptPropertySet::CALL_MODE_BASIC_TYPE);
n->set_basic_type(tg.type);
- new_connect_node_select->select_property_from_basic_type(tg.type, tg.ev_type);
+ new_connect_node_select->select_property_from_basic_type(tg.type);
}
} break;
case CREATE_GET: {
@@ -2673,7 +2669,7 @@ void VisualScriptEditor::_port_action_menu(int p_option) {
} else {
n->set_call_mode(VisualScriptPropertyGet::CALL_MODE_BASIC_TYPE);
n->set_basic_type(tg.type);
- new_connect_node_select->select_property_from_basic_type(tg.type, tg.ev_type);
+ new_connect_node_select->select_property_from_basic_type(tg.type);
}
} break;
@@ -2833,7 +2829,7 @@ void VisualScriptEditor::_node_filter_changed(const String &p_text) {
void VisualScriptEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
- node_filter_icon->set_texture(Control::get_icon("Search", "EditorIcons"));
+ node_filter_icon->set_texture(Control::get_icon("Zoom", "EditorIcons"));
}
}
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index 1fd97cc1bc..bb832431a0 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -196,7 +196,7 @@ class VisualScriptEditor : public ScriptEditorBase {
String revert_on_drag;
- void _input(const InputEvent &p_event);
+ void _input(const Ref<InputEvent> &p_event);
void _on_nodes_delete();
void _on_nodes_duplicate();
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 2deb6064d3..07d69db207 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -734,6 +734,7 @@ VisualScriptSwitch::VisualScriptSwitch() {
////////////////EVENT ACTION FILTER///////////
//////////////////////////////////////////
+#if 0
int VisualScriptInputFilter::get_output_sequence_port_count() const {
return filters.size();
@@ -758,86 +759,86 @@ String VisualScriptInputFilter::get_output_sequence_port_text(int p_port) const
String text;
switch (filters[p_port].type) {
- case InputEvent::NONE: {
+ case Ref<InputEvent>::NONE: {
text = "None";
} break;
- case InputEvent::KEY: {
+ case Ref<InputEvent>::KEY: {
InputEventKey k = filters[p_port].key;
- if (k.scancode == 0 && k.unicode == 0) {
+ if (k->get_scancode() == 0 && k.unicode == 0) {
text = "No Key";
} else {
- if (k.scancode != 0) {
- text = "KeyCode: " + keycode_get_string(k.scancode);
+ if (k->get_scancode() != 0) {
+ text = "KeyCode: " + keycode_get_string(k->get_scancode());
} else if (k.unicode != 0) {
text = "Uniode: " + String::chr(k.unicode);
}
- if (k.pressed)
+ if (k->is_pressed())
text += ", Pressed";
else
text += ", Released";
if (k.echo)
text += ", Echo";
- if (k.mod.alt)
+ if (k->get_alt())
text = "Alt+" + text;
- if (k.mod.shift)
+ if (k->get_shift())
text = "Shift+" + text;
- if (k.mod.control)
+ if (k->get_control())
text = "Ctrl+" + text;
- if (k.mod.meta)
+ if (k->get_metakey())
text = "Meta+" + text;
}
} break;
- case InputEvent::MOUSE_MOTION: {
+ case Ref<InputEvent>::MOUSE_MOTION: {
InputEventMouseMotion mm = filters[p_port].mouse_motion;
text = "Mouse Motion";
String b = "Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight";
for (int i = 0; i < 7; i++) {
- if (mm.button_mask & (1 << i)) {
+ if (mm->get_button_mask() & (1 << i)) {
text = b.get_slice(",", i) + "+" + text;
}
}
- if (mm.mod.alt)
+ if (mm->get_alt())
text = "Alt+" + text;
- if (mm.mod.shift)
+ if (mm->get_shift())
text = "Shift+" + text;
- if (mm.mod.control)
+ if (mm->get_control())
text = "Ctrl+" + text;
- if (mm.mod.meta)
+ if (mm->get_metakey())
text = "Meta+" + text;
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case Ref<InputEvent>::MOUSE_BUTTON: {
InputEventMouseButton mb = filters[p_port].mouse_button;
String b = "Any,Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight";
- text = b.get_slice(",", mb.button_index) + " Mouse Button";
+ text = b.get_slice(",", mb->get_button_index()) + " Mouse Button";
- if (mb.pressed)
+ if (mb->is_pressed())
text += ", Pressed";
else
text += ", Released";
if (mb.doubleclick)
text += ", DblClick";
- if (mb.mod.alt)
+ if (mb->get_alt())
text = "Alt+" + text;
- if (mb.mod.shift)
+ if (mb->get_shift())
text = "Shift+" + text;
- if (mb.mod.control)
+ if (mb->get_control())
text = "Ctrl+" + text;
- if (mb.mod.meta)
+ if (mb->get_metakey())
text = "Meta+" + text;
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case Ref<InputEvent>::JOYPAD_MOTION: {
InputEventJoypadMotion jm = filters[p_port].joy_motion;
@@ -848,29 +849,29 @@ String VisualScriptInputFilter::get_output_sequence_port_text(int p_port) const
text += " < " + rtos(-jm.axis_value);
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case Ref<InputEvent>::JOYPAD_BUTTON: {
InputEventJoypadButton jb = filters[p_port].joy_button;
- text = "JoyButton " + itos(jb.button_index);
- if (jb.pressed)
+ text = "JoyButton " + itos(jb->get_button_index());
+ if (jb->is_pressed())
text += ", Pressed";
else
text += ", Released";
} break;
- case InputEvent::SCREEN_TOUCH: {
+ case Ref<InputEvent>::SCREEN_TOUCH: {
InputEventScreenTouch sd = filters[p_port].screen_touch;
text = "Touch Finger " + itos(sd.index);
- if (sd.pressed)
+ if (sd->is_pressed())
text += ", Pressed";
else
text += ", Released";
} break;
- case InputEvent::SCREEN_DRAG: {
+ case Ref<InputEvent>::SCREEN_DRAG: {
InputEventScreenDrag sd = filters[p_port].screen_drag;
text = "Drag Finger " + itos(sd.index);
} break;
- case InputEvent::ACTION: {
+ case Ref<InputEvent>::ACTION: {
List<PropertyInfo> pinfo;
GlobalConfig::get_singleton()->get_property_list(&pinfo);
@@ -890,7 +891,7 @@ String VisualScriptInputFilter::get_output_sequence_port_text(int p_port) const
index++;
}
- if (filters[p_port].action.pressed)
+ if (filters[p_port].action->is_pressed())
text += ", Pressed";
else
text += ", Released";
@@ -939,20 +940,20 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
String what = String(p_name).get_slice("/", 1);
if (what == "type") {
- filters[idx] = InputEvent();
- filters[idx].type = InputEvent::Type(int(p_value));
- if (filters[idx].type == InputEvent::JOYPAD_MOTION) {
+ filters[idx] = Ref<InputEvent>();
+ filters[idx].type = Ref<InputEvent>::Type(int(p_value));
+ if (filters[idx].type == Ref<InputEvent>::JOYPAD_MOTION) {
filters[idx].joy_motion.axis_value = 0.5; //for treshold
- } else if (filters[idx].type == InputEvent::KEY) {
- filters[idx].key.pressed = true; //put these as true to make it more user friendly
- } else if (filters[idx].type == InputEvent::MOUSE_BUTTON) {
- filters[idx].mouse_button.pressed = true;
- } else if (filters[idx].type == InputEvent::JOYPAD_BUTTON) {
- filters[idx].joy_button.pressed = true;
- } else if (filters[idx].type == InputEvent::SCREEN_TOUCH) {
- filters[idx].screen_touch.pressed = true;
- } else if (filters[idx].type == InputEvent::ACTION) {
- filters[idx].action.pressed = true;
+ } else if (filters[idx].type == Ref<InputEvent>::KEY) {
+ filters[idx]->is_pressed() = true; //put these as true to make it more user friendly
+ } else if (filters[idx].type == Ref<InputEvent>::MOUSE_BUTTON) {
+ filters[idx]->is_pressed() = true;
+ } else if (filters[idx].type == Ref<InputEvent>::JOYPAD_BUTTON) {
+ filters[idx].joy_button->is_pressed() = true;
+ } else if (filters[idx].type == Ref<InputEvent>::SCREEN_TOUCH) {
+ filters[idx].screen_touch->is_pressed() = true;
+ } else if (filters[idx].type == Ref<InputEvent>::ACTION) {
+ filters[idx].action->is_pressed() = true;
}
_change_notify();
ports_changed_notify();
@@ -967,14 +968,14 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
switch (filters[idx].type) {
- case InputEvent::KEY: {
+ case Ref<InputEvent>::KEY: {
if (what == "scancode") {
String sc = p_value;
if (sc == String()) {
- filters[idx].key.scancode = 0;
+ filters[idx]->get_scancode() = 0;
} else {
- filters[idx].key.scancode = find_keycode(p_value);
+ filters[idx]->get_scancode() = find_keycode(p_value);
}
} else if (what == "unicode") {
@@ -989,22 +990,22 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
} else if (what == "pressed") {
- filters[idx].key.pressed = p_value;
+ filters[idx]->is_pressed() = p_value;
} else if (what == "echo") {
- filters[idx].key.echo = p_value;
+ filters[idx]->is_echo() = p_value;
} else if (what == "mod_alt") {
- filters[idx].key.mod.alt = p_value;
+ filters[idx]->get_alt() = p_value;
} else if (what == "mod_shift") {
- filters[idx].key.mod.shift = p_value;
+ filters[idx]->get_shift() = p_value;
} else if (what == "mod_ctrl") {
- filters[idx].key.mod.control = p_value;
+ filters[idx]->get_control() = p_value;
} else if (what == "mod_meta") {
- filters[idx].key.mod.meta = p_value;
+ filters[idx]->get_metakey() = p_value;
} else {
return false;
}
@@ -1012,22 +1013,22 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
return true;
} break;
- case InputEvent::MOUSE_MOTION: {
+ case Ref<InputEvent>::MOUSE_MOTION: {
if (what == "button_mask") {
- filters[idx].mouse_motion.button_mask = p_value;
+ filters[idx]->get_button_mask() = p_value;
} else if (what == "mod_alt") {
- filters[idx].mouse_motion.mod.alt = p_value;
+ filters[idx].mouse_motion->get_alt() = p_value;
} else if (what == "mod_shift") {
- filters[idx].mouse_motion.mod.shift = p_value;
+ filters[idx].mouse_motion->get_shift() = p_value;
} else if (what == "mod_ctrl") {
- filters[idx].mouse_motion.mod.control = p_value;
+ filters[idx].mouse_motion->get_control() = p_value;
} else if (what == "mod_meta") {
- filters[idx].mouse_motion.mod.meta = p_value;
+ filters[idx].mouse_motion->get_metakey() = p_value;
} else {
return false;
}
@@ -1036,26 +1037,26 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
return true;
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case Ref<InputEvent>::MOUSE_BUTTON: {
if (what == "button_index") {
- filters[idx].mouse_button.button_index = p_value;
+ filters[idx]->get_button_index() = p_value;
} else if (what == "pressed") {
- filters[idx].mouse_button.pressed = p_value;
+ filters[idx]->is_pressed() = p_value;
} else if (what == "doubleclicked") {
filters[idx].mouse_button.doubleclick = p_value;
} else if (what == "mod_alt") {
- filters[idx].mouse_button.mod.alt = p_value;
+ filters[idx].mouse_button->get_alt() = p_value;
} else if (what == "mod_shift") {
- filters[idx].mouse_button.mod.shift = p_value;
+ filters[idx].mouse_button->get_shift() = p_value;
} else if (what == "mod_ctrl") {
- filters[idx].mouse_button.mod.control = p_value;
+ filters[idx].mouse_button->get_control() = p_value;
} else if (what == "mod_meta") {
- filters[idx].mouse_button.mod.meta = p_value;
+ filters[idx].mouse_button->get_metakey() = p_value;
} else {
return false;
}
@@ -1063,7 +1064,7 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
return true;
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case Ref<InputEvent>::JOYPAD_MOTION: {
if (what == "axis") {
filters[idx].joy_motion.axis = int(p_value) << 1 | filters[idx].joy_motion.axis;
@@ -1078,12 +1079,12 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
return true;
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case Ref<InputEvent>::JOYPAD_BUTTON: {
if (what == "button_index") {
- filters[idx].joy_button.button_index = p_value;
+ filters[idx].joy_button->get_button_index() = p_value;
} else if (what == "pressed") {
- filters[idx].joy_button.pressed = p_value;
+ filters[idx].joy_button->is_pressed() = p_value;
} else {
return false;
}
@@ -1091,19 +1092,19 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
return true;
} break;
- case InputEvent::SCREEN_TOUCH: {
+ case Ref<InputEvent>::SCREEN_TOUCH: {
if (what == "finger_index") {
filters[idx].screen_touch.index = p_value;
} else if (what == "pressed") {
- filters[idx].screen_touch.pressed = p_value;
+ filters[idx].screen_touch->is_pressed() = p_value;
} else {
return false;
}
ports_changed_notify();
return true;
} break;
- case InputEvent::SCREEN_DRAG: {
+ case Ref<InputEvent>::SCREEN_DRAG: {
if (what == "finger_index") {
filters[idx].screen_drag.index = p_value;
} else {
@@ -1112,7 +1113,7 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
ports_changed_notify();
return true;
} break;
- case InputEvent::ACTION: {
+ case Ref<InputEvent>::ACTION: {
if (what == "action_name") {
@@ -1144,7 +1145,7 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va
} else if (what == "pressed") {
- filters[idx].action.pressed = p_value;
+ filters[idx].action->is_pressed() = p_value;
ports_changed_notify();
return true;
}
@@ -1181,14 +1182,14 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
switch (filters[idx].type) {
- case InputEvent::KEY: {
+ case Ref<InputEvent>::KEY: {
if (what == "scancode") {
- if (filters[idx].key.scancode == 0)
+ if (filters[idx]->get_scancode() == 0)
r_ret = String();
else {
- r_ret = keycode_get_string(filters[idx].key.scancode);
+ r_ret = keycode_get_string(filters[idx]->get_scancode());
}
} else if (what == "unicode") {
@@ -1202,44 +1203,44 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
} else if (what == "pressed") {
- r_ret = filters[idx].key.pressed;
+ r_ret = filters[idx]->is_pressed();
} else if (what == "echo") {
- r_ret = filters[idx].key.echo;
+ r_ret = filters[idx]->is_echo();
} else if (what == "mod_alt") {
- r_ret = filters[idx].key.mod.alt;
+ r_ret = filters[idx]->get_alt();
} else if (what == "mod_shift") {
- r_ret = filters[idx].key.mod.shift;
+ r_ret = filters[idx]->get_shift();
} else if (what == "mod_ctrl") {
- r_ret = filters[idx].key.mod.control;
+ r_ret = filters[idx]->get_control();
} else if (what == "mod_meta") {
- r_ret = filters[idx].key.mod.meta;
+ r_ret = filters[idx]->get_metakey();
} else {
return false;
}
return true;
} break;
- case InputEvent::MOUSE_MOTION: {
+ case Ref<InputEvent>::MOUSE_MOTION: {
if (what == "button_mask") {
- r_ret = filters[idx].mouse_motion.button_mask;
+ r_ret = filters[idx]->get_button_mask();
} else if (what == "mod_alt") {
- r_ret = filters[idx].mouse_motion.mod.alt;
+ r_ret = filters[idx].mouse_motion->get_alt();
} else if (what == "mod_shift") {
- r_ret = filters[idx].mouse_motion.mod.shift;
+ r_ret = filters[idx].mouse_motion->get_shift();
} else if (what == "mod_ctrl") {
- r_ret = filters[idx].mouse_motion.mod.control;
+ r_ret = filters[idx].mouse_motion->get_control();
} else if (what == "mod_meta") {
- r_ret = filters[idx].mouse_motion.mod.meta;
+ r_ret = filters[idx].mouse_motion->get_metakey();
} else {
return false;
}
@@ -1247,33 +1248,33 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
return true;
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case Ref<InputEvent>::MOUSE_BUTTON: {
if (what == "button_index") {
- r_ret = filters[idx].mouse_button.button_index;
+ r_ret = filters[idx]->get_button_index();
} else if (what == "pressed") {
- r_ret = filters[idx].mouse_button.pressed;
+ r_ret = filters[idx]->is_pressed();
} else if (what == "doubleclicked") {
r_ret = filters[idx].mouse_button.doubleclick;
} else if (what == "mod_alt") {
- r_ret = filters[idx].mouse_button.mod.alt;
+ r_ret = filters[idx].mouse_button->get_alt();
} else if (what == "mod_shift") {
- r_ret = filters[idx].mouse_button.mod.shift;
+ r_ret = filters[idx].mouse_button->get_shift();
} else if (what == "mod_ctrl") {
- r_ret = filters[idx].mouse_button.mod.control;
+ r_ret = filters[idx].mouse_button->get_control();
} else if (what == "mod_meta") {
- r_ret = filters[idx].mouse_button.mod.meta;
+ r_ret = filters[idx].mouse_button->get_metakey();
} else {
return false;
}
return true;
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case Ref<InputEvent>::JOYPAD_MOTION: {
if (what == "axis_index") {
r_ret = filters[idx].joy_motion.axis >> 1;
@@ -1287,30 +1288,30 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
return true;
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case Ref<InputEvent>::JOYPAD_BUTTON: {
if (what == "button_index") {
- r_ret = filters[idx].joy_button.button_index;
+ r_ret = filters[idx].joy_button->get_button_index();
} else if (what == "pressed") {
- r_ret = filters[idx].joy_button.pressed;
+ r_ret = filters[idx].joy_button->is_pressed();
} else {
return false;
}
return true;
} break;
- case InputEvent::SCREEN_TOUCH: {
+ case Ref<InputEvent>::SCREEN_TOUCH: {
if (what == "finger_index") {
r_ret = filters[idx].screen_touch.index;
} else if (what == "pressed") {
- r_ret = filters[idx].screen_touch.pressed;
+ r_ret = filters[idx].screen_touch->is_pressed();
} else {
return false;
}
return true;
} break;
- case InputEvent::SCREEN_DRAG: {
+ case Ref<InputEvent>::SCREEN_DRAG: {
if (what == "finger_index") {
r_ret = filters[idx].screen_drag.index;
} else {
@@ -1318,7 +1319,7 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
}
return true;
} break;
- case InputEvent::ACTION: {
+ case Ref<InputEvent>::ACTION: {
if (what == "action_name") {
@@ -1344,7 +1345,7 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
} else if (what == "pressed") {
- r_ret = filters[idx].action.pressed;
+ r_ret = filters[idx].action->is_pressed();
return true;
}
@@ -1354,7 +1355,7 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con
return false;
}
-static const char *event_type_names[InputEvent::TYPE_MAX] = {
+static const char *event_type_names[Ref<InputEvent>::TYPE_MAX] = {
"None",
"Key",
"MouseMotion",
@@ -1371,7 +1372,7 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
p_list->push_back(PropertyInfo(Variant::INT, "filter_count", PROPERTY_HINT_RANGE, "0,64"));
String et;
- for (int i = 0; i < InputEvent::TYPE_MAX; i++) {
+ for (int i = 0; i < Ref<InputEvent>::TYPE_MAX; i++) {
if (i > 0)
et += ",";
@@ -1388,10 +1389,10 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
p_list->push_back(PropertyInfo(Variant::INT, base + "device"));
switch (filters[i].type) {
- case InputEvent::NONE: {
+ case Ref<InputEvent>::NONE: {
} break;
- case InputEvent::KEY: {
+ case Ref<InputEvent>::KEY: {
if (kc == String()) {
int kcc = keycode_get_count();
kc = "None";
@@ -1410,7 +1411,7 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_meta"));
} break;
- case InputEvent::MOUSE_MOTION: {
+ case Ref<InputEvent>::MOUSE_MOTION: {
p_list->push_back(PropertyInfo(Variant::INT, base + "button_mask", PROPERTY_HINT_FLAGS, "Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight"));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_alt"));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_shift"));
@@ -1418,7 +1419,7 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_meta"));
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case Ref<InputEvent>::MOUSE_BUTTON: {
p_list->push_back(PropertyInfo(Variant::INT, base + "button_index", PROPERTY_HINT_ENUM, "Any,Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight"));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed"));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "doubleclicked"));
@@ -1428,26 +1429,26 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_meta"));
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case Ref<InputEvent>::JOYPAD_MOTION: {
p_list->push_back(PropertyInfo(Variant::INT, base + "axis_index"));
p_list->push_back(PropertyInfo(Variant::INT, base + "mode", PROPERTY_HINT_ENUM, "Min,Max"));
p_list->push_back(PropertyInfo(Variant::REAL, base + "treshold", PROPERTY_HINT_RANGE, "0,1,0.01"));
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case Ref<InputEvent>::JOYPAD_BUTTON: {
p_list->push_back(PropertyInfo(Variant::INT, base + "button_index"));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed"));
} break;
- case InputEvent::SCREEN_TOUCH: {
+ case Ref<InputEvent>::SCREEN_TOUCH: {
p_list->push_back(PropertyInfo(Variant::INT, base + "finger_index"));
p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed"));
} break;
- case InputEvent::SCREEN_DRAG: {
+ case Ref<InputEvent>::SCREEN_DRAG: {
p_list->push_back(PropertyInfo(Variant::INT, base + "finger_index"));
} break;
- case InputEvent::ACTION: {
+ case Ref<InputEvent>::ACTION: {
if (actions == String()) {
@@ -1485,7 +1486,7 @@ void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) con
class VisualScriptNodeInstanceInputFilter : public VisualScriptNodeInstance {
public:
VisualScriptInstance *instance;
- Vector<InputEvent> filters;
+ Vector<Ref<InputEvent>> filters;
//virtual int get_working_memory_size() const { return 0; }
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
@@ -1499,11 +1500,11 @@ public:
return 0;
}
- InputEvent event = *p_inputs[0];
+ Ref<InputEvent> event = *p_inputs[0];
for (int i = 0; i < filters.size(); i++) {
- const InputEvent &ie = filters[i];
+ const Ref<InputEvent> &ie = filters[i];
if (ie.type != event.type)
continue;
@@ -1511,25 +1512,25 @@ public:
switch (ie.type) {
- case InputEvent::NONE: {
+ case Ref<InputEvent>::NONE: {
match = true;
} break;
- case InputEvent::KEY: {
+ case Ref<InputEvent>::KEY: {
InputEventKey k = ie.key;
InputEventKey k2 = event.key;
- if (k.scancode == 0 && k.unicode == 0 && k2.scancode == 0 && k2.unicode == 0) {
+ if (k->get_scancode() == 0 && k.unicode == 0 && k2->get_scancode() == 0 && k2.unicode == 0) {
match = true;
} else {
- if ((k.scancode != 0 && k.scancode == k2.scancode) || (k.unicode != 0 && k.unicode == k2.unicode)) {
+ if ((k->get_scancode() != 0 && k->get_scancode() == k2->get_scancode()) || (k.unicode != 0 && k.unicode == k2.unicode)) {
//key valid
if (
- k.pressed == k2.pressed &&
+ k->is_pressed() == k2->is_pressed() &&
k.echo == k2.echo &&
k.mod == k2.mod) {
match = true;
@@ -1538,30 +1539,30 @@ public:
}
} break;
- case InputEvent::MOUSE_MOTION: {
+ case Ref<InputEvent>::MOUSE_MOTION: {
InputEventMouseMotion mm = ie.mouse_motion;
InputEventMouseMotion mm2 = event.mouse_motion;
- if (mm.button_mask == mm2.button_mask &&
+ if (mm->get_button_mask() == mm2->get_button_mask() &&
mm.mod == mm2.mod) {
match = true;
}
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case Ref<InputEvent>::MOUSE_BUTTON: {
InputEventMouseButton mb = ie.mouse_button;
InputEventMouseButton mb2 = event.mouse_button;
- if (mb.button_index == mb2.button_index &&
- mb.pressed == mb2.pressed &&
+ if (mb->get_button_index() == mb2->get_button_index() &&
+ mb->is_pressed() == mb2->is_pressed() &&
mb.doubleclick == mb2.doubleclick &&
mb.mod == mb2.mod) {
match = true;
}
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case Ref<InputEvent>::JOYPAD_MOTION: {
InputEventJoypadMotion jm = ie.joy_motion;
InputEventJoypadMotion jm2 = event.joy_motion;
@@ -1584,26 +1585,26 @@ public:
}
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case Ref<InputEvent>::JOYPAD_BUTTON: {
InputEventJoypadButton jb = ie.joy_button;
InputEventJoypadButton jb2 = event.joy_button;
- if (jb.button_index == jb2.button_index &&
- jb.pressed == jb2.pressed) {
+ if (jb->get_button_index() == jb2->get_button_index() &&
+ jb->is_pressed() == jb2->is_pressed()) {
match = true;
}
} break;
- case InputEvent::SCREEN_TOUCH: {
+ case Ref<InputEvent>::SCREEN_TOUCH: {
InputEventScreenTouch st = ie.screen_touch;
InputEventScreenTouch st2 = event.screen_touch;
if (st.index == st2.index &&
- st.pressed == st2.pressed) {
+ st->is_pressed() == st2->is_pressed()) {
match = true;
}
} break;
- case InputEvent::SCREEN_DRAG: {
+ case Ref<InputEvent>::SCREEN_DRAG: {
InputEventScreenDrag sd = ie.screen_drag;
InputEventScreenDrag sd2 = event.screen_drag;
@@ -1611,13 +1612,13 @@ public:
match = true;
}
} break;
- case InputEvent::ACTION: {
+ case Ref<InputEvent>::ACTION: {
InputEventAction ia = ie.action;
InputEventAction ia2 = event.action;
if (ia.action == ia2.action &&
- ia.pressed == ia2.pressed) {
+ ia->is_pressed() == ia2->is_pressed()) {
match = true;
}
} break;
@@ -1643,7 +1644,7 @@ VisualScriptNodeInstance *VisualScriptInputFilter::instance(VisualScriptInstance
VisualScriptInputFilter::VisualScriptInputFilter() {
}
-
+#endif
//////////////////////////////////////////
////////////////TYPE CAST///////////
//////////////////////////////////////////
@@ -1832,6 +1833,6 @@ void register_visual_script_flow_control_nodes() {
VisualScriptLanguage::singleton->add_register_func("flow_control/iterator", create_node_generic<VisualScriptIterator>);
VisualScriptLanguage::singleton->add_register_func("flow_control/sequence", create_node_generic<VisualScriptSequence>);
VisualScriptLanguage::singleton->add_register_func("flow_control/switch", create_node_generic<VisualScriptSwitch>);
- VisualScriptLanguage::singleton->add_register_func("flow_control/input_filter", create_node_generic<VisualScriptInputFilter>);
+ //VisualScriptLanguage::singleton->add_register_func("flow_control/input_filter", create_node_generic<VisualScriptInputFilter>);
VisualScriptLanguage::singleton->add_register_func("flow_control/type_cast", create_node_generic<VisualScriptTypeCast>);
}
diff --git a/modules/visual_script/visual_script_flow_control.h b/modules/visual_script/visual_script_flow_control.h
index e3936da9e5..314804602e 100644
--- a/modules/visual_script/visual_script_flow_control.h
+++ b/modules/visual_script/visual_script_flow_control.h
@@ -228,11 +228,12 @@ public:
VisualScriptSwitch();
};
+#if 0
class VisualScriptInputFilter : public VisualScriptNode {
GDCLASS(VisualScriptInputFilter, VisualScriptNode)
- Vector<InputEvent> filters;
+ Vector<Ref<InputEvent>> filters;
protected:
bool _set(const StringName &p_name, const Variant &p_value);
@@ -259,7 +260,7 @@ public:
VisualScriptInputFilter();
};
-
+#endif
class VisualScriptTypeCast : public VisualScriptNode {
GDCLASS(VisualScriptTypeCast, VisualScriptNode)
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 84224dfcbe..b466e64aec 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -943,18 +943,6 @@ static Ref<VisualScriptNode> create_function_call_node(const String &p_name) {
////////////////SET//////////////////////
//////////////////////////////////////////
-static const char *event_type_names[InputEvent::TYPE_MAX] = {
- "None",
- "Key",
- "MouseMotion",
- "MouseButton",
- "JoypadMotion",
- "JoypadButton",
- "ScreenTouch",
- "ScreenDrag",
- "Action"
-};
-
int VisualScriptPropertySet::get_output_sequence_port_count() const {
return call_mode != CALL_MODE_BASIC_TYPE ? 1 : 0;
@@ -1119,24 +1107,6 @@ Variant::Type VisualScriptPropertySet::get_basic_type() const {
return basic_type;
}
-void VisualScriptPropertySet::set_event_type(InputEvent::Type p_type) {
-
- if (event_type == p_type)
- return;
- event_type = p_type;
- if (call_mode == CALL_MODE_BASIC_TYPE) {
- _update_cache();
- }
- _change_notify();
- _update_base_type();
- ports_changed_notify();
-}
-
-InputEvent::Type VisualScriptPropertySet::get_event_type() const {
-
- return event_type;
-}
-
void VisualScriptPropertySet::set_base_type(const StringName &p_type) {
if (base_type == p_type)
@@ -1182,14 +1152,8 @@ void VisualScriptPropertySet::_update_cache() {
//not super efficient..
Variant v;
- if (basic_type == Variant::INPUT_EVENT) {
- InputEvent ev;
- ev.type = event_type;
- v = ev;
- } else {
- Variant::CallError ce;
- v = Variant::construct(basic_type, NULL, 0, ce);
- }
+ Variant::CallError ce;
+ v = Variant::construct(basic_type, NULL, 0, ce);
List<PropertyInfo> pinfo;
v.get_property_list(&pinfo);
@@ -1341,12 +1305,6 @@ void VisualScriptPropertySet::_validate_property(PropertyInfo &property) const {
}
}
- if (property.name == "property/event_type") {
- if (call_mode != CALL_MODE_BASIC_TYPE || basic_type != Variant::INPUT_EVENT) {
- property.usage = 0;
- }
- }
-
if (property.name == "property/node_path") {
if (call_mode != CALL_MODE_NODE_PATH) {
property.usage = 0;
@@ -1418,9 +1376,6 @@ void VisualScriptPropertySet::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_type_cache", "type_cache"), &VisualScriptPropertySet::_set_type_cache);
ClassDB::bind_method(D_METHOD("_get_type_cache"), &VisualScriptPropertySet::_get_type_cache);
- ClassDB::bind_method(D_METHOD("set_event_type", "event_type"), &VisualScriptPropertySet::set_event_type);
- ClassDB::bind_method(D_METHOD("get_event_type"), &VisualScriptPropertySet::get_event_type);
-
ClassDB::bind_method(D_METHOD("set_property", "property"), &VisualScriptPropertySet::set_property);
ClassDB::bind_method(D_METHOD("get_property"), &VisualScriptPropertySet::get_property);
@@ -1438,14 +1393,6 @@ void VisualScriptPropertySet::_bind_methods() {
bt += Variant::get_type_name(Variant::Type(i));
}
- String et;
- for (int i = 0; i < InputEvent::TYPE_MAX; i++) {
- if (i > 0)
- et += ",";
-
- et += event_type_names[i];
- }
-
List<String> script_extensions;
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptServer::get_language(i)->get_recognized_extensions(&script_extensions);
@@ -1463,7 +1410,6 @@ void VisualScriptPropertySet::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property/base_script", PROPERTY_HINT_FILE, script_ext_hint), "set_base_script", "get_base_script");
ADD_PROPERTY(PropertyInfo(Variant::INT, "property/type_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_type_cache", "_get_type_cache");
ADD_PROPERTY(PropertyInfo(Variant::INT, "property/basic_type", PROPERTY_HINT_ENUM, bt), "set_basic_type", "get_basic_type");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "property/event_type", PROPERTY_HINT_ENUM, et), "set_event_type", "get_event_type");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "property/node_path", PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE), "set_base_path", "get_base_path");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property/property"), "set_property", "get_property");
@@ -1574,7 +1520,6 @@ VisualScriptPropertySet::VisualScriptPropertySet() {
call_mode = CALL_MODE_SELF;
base_type = "Object";
basic_type = Variant::NIL;
- event_type = InputEvent::NONE;
}
template <VisualScriptPropertySet::CallMode cmode>
@@ -1764,14 +1709,8 @@ void VisualScriptPropertyGet::_update_cache() {
//not super efficient..
Variant v;
- if (basic_type == Variant::INPUT_EVENT) {
- InputEvent ev;
- ev.type = event_type;
- v = ev;
- } else {
- Variant::CallError ce;
- v = Variant::construct(basic_type, NULL, 0, ce);
- }
+ Variant::CallError ce;
+ v = Variant::construct(basic_type, NULL, 0, ce);
List<PropertyInfo> pinfo;
v.get_property_list(&pinfo);
@@ -1919,24 +1858,6 @@ Variant::Type VisualScriptPropertyGet::get_basic_type() const {
return basic_type;
}
-void VisualScriptPropertyGet::set_event_type(InputEvent::Type p_type) {
-
- if (event_type == p_type)
- return;
- event_type = p_type;
- if (call_mode == CALL_MODE_BASIC_TYPE) {
- _update_cache();
- }
- _change_notify();
- _update_base_type();
- ports_changed_notify();
-}
-
-InputEvent::Type VisualScriptPropertyGet::get_event_type() const {
-
- return event_type;
-}
-
void VisualScriptPropertyGet::_set_type_cache(Variant::Type p_type) {
type_cache = p_type;
}
@@ -1965,11 +1886,6 @@ void VisualScriptPropertyGet::_validate_property(PropertyInfo &property) const {
property.usage = 0;
}
}
- if (property.name == "property/event_type") {
- if (call_mode != CALL_MODE_BASIC_TYPE || basic_type != Variant::INPUT_EVENT) {
- property.usage = 0;
- }
- }
if (property.name == "property/node_path") {
if (call_mode != CALL_MODE_NODE_PATH) {
@@ -2041,9 +1957,6 @@ void VisualScriptPropertyGet::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_type_cache", "type_cache"), &VisualScriptPropertyGet::_set_type_cache);
ClassDB::bind_method(D_METHOD("_get_type_cache"), &VisualScriptPropertyGet::_get_type_cache);
- ClassDB::bind_method(D_METHOD("set_event_type", "event_type"), &VisualScriptPropertyGet::set_event_type);
- ClassDB::bind_method(D_METHOD("get_event_type"), &VisualScriptPropertyGet::get_event_type);
-
ClassDB::bind_method(D_METHOD("set_property", "property"), &VisualScriptPropertyGet::set_property);
ClassDB::bind_method(D_METHOD("get_property"), &VisualScriptPropertyGet::get_property);
@@ -2061,14 +1974,6 @@ void VisualScriptPropertyGet::_bind_methods() {
bt += Variant::get_type_name(Variant::Type(i));
}
- String et;
- for (int i = 0; i < InputEvent::TYPE_MAX; i++) {
- if (i > 0)
- et += ",";
-
- et += event_type_names[i];
- }
-
List<String> script_extensions;
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptServer::get_language(i)->get_recognized_extensions(&script_extensions);
@@ -2086,7 +1991,6 @@ void VisualScriptPropertyGet::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property/base_script", PROPERTY_HINT_FILE, script_ext_hint), "set_base_script", "get_base_script");
ADD_PROPERTY(PropertyInfo(Variant::INT, "property/type_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_type_cache", "_get_type_cache");
ADD_PROPERTY(PropertyInfo(Variant::INT, "property/basic_type", PROPERTY_HINT_ENUM, bt), "set_basic_type", "get_basic_type");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "property/event_type", PROPERTY_HINT_ENUM, et), "set_event_type", "get_event_type");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "property/node_path", PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE), "set_base_path", "get_base_path");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property/property"), "set_property", "get_property");
@@ -2184,7 +2088,6 @@ VisualScriptPropertyGet::VisualScriptPropertyGet() {
call_mode = CALL_MODE_SELF;
base_type = "Object";
basic_type = Variant::NIL;
- event_type = InputEvent::NONE;
type_cache = Variant::NIL;
}
diff --git a/modules/visual_script/visual_script_func_nodes.h b/modules/visual_script/visual_script_func_nodes.h
index b56a3c2bcc..3b284952c5 100644
--- a/modules/visual_script/visual_script_func_nodes.h
+++ b/modules/visual_script/visual_script_func_nodes.h
@@ -155,7 +155,6 @@ private:
String base_script;
NodePath base_path;
StringName property;
- InputEvent::Type event_type;
Node *_get_base_node() const;
StringName _get_base_type() const;
@@ -197,9 +196,6 @@ public:
void set_basic_type(Variant::Type p_type);
Variant::Type get_basic_type() const;
- void set_event_type(InputEvent::Type p_type);
- InputEvent::Type get_event_type() const;
-
void set_property(const StringName &p_type);
StringName get_property() const;
@@ -238,7 +234,6 @@ private:
String base_script;
NodePath base_path;
StringName property;
- InputEvent::Type event_type;
void _update_base_type();
Node *_get_base_node() const;
@@ -279,9 +274,6 @@ public:
void set_basic_type(Variant::Type p_type);
Variant::Type get_basic_type() const;
- void set_event_type(InputEvent::Type p_type);
- InputEvent::Type get_event_type() const;
-
void set_property(const StringName &p_type);
StringName get_property() const;
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 08f4191d3d..8ea3b8098d 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -3460,14 +3460,8 @@ void VisualScriptDeconstruct::_update_elements() {
elements.clear();
Variant v;
- if (type == Variant::INPUT_EVENT) {
- InputEvent ie;
- ie.type = input_type;
- v = ie;
- } else {
- Variant::CallError ce;
- v = Variant::construct(type, NULL, 0, ce);
- }
+ Variant::CallError ce;
+ v = Variant::construct(type, NULL, 0, ce);
List<PropertyInfo> pinfo;
v.get_property_list(&pinfo);
@@ -3497,21 +3491,6 @@ Variant::Type VisualScriptDeconstruct::get_deconstruct_type() const {
return type;
}
-void VisualScriptDeconstruct::set_deconstruct_input_type(InputEvent::Type p_input_type) {
-
- if (input_type == p_input_type)
- return;
-
- input_type = p_input_type;
- _update_elements();
- ports_changed_notify();
-}
-
-InputEvent::Type VisualScriptDeconstruct::get_deconstruct_input_type() const {
-
- return input_type;
-}
-
void VisualScriptDeconstruct::_set_elem_cache(const Array &p_elements) {
ERR_FAIL_COND(p_elements.size() % 2 == 1);
@@ -3570,12 +3549,6 @@ VisualScriptNodeInstance *VisualScriptDeconstruct::instance(VisualScriptInstance
}
void VisualScriptDeconstruct::_validate_property(PropertyInfo &property) const {
-
- if (property.name == "input_type") {
- if (type != Variant::INPUT_EVENT) {
- property.usage = 0;
- }
- }
}
void VisualScriptDeconstruct::_bind_methods() {
@@ -3583,9 +3556,6 @@ void VisualScriptDeconstruct::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_deconstruct_type", "type"), &VisualScriptDeconstruct::set_deconstruct_type);
ClassDB::bind_method(D_METHOD("get_deconstruct_type"), &VisualScriptDeconstruct::get_deconstruct_type);
- ClassDB::bind_method(D_METHOD("set_deconstruct_input_type", "input_type"), &VisualScriptDeconstruct::set_deconstruct_input_type);
- ClassDB::bind_method(D_METHOD("get_deconstruct_input_type"), &VisualScriptDeconstruct::get_deconstruct_input_type);
-
ClassDB::bind_method(D_METHOD("_set_elem_cache", "_cache"), &VisualScriptDeconstruct::_set_elem_cache);
ClassDB::bind_method(D_METHOD("_get_elem_cache"), &VisualScriptDeconstruct::_get_elem_cache);
@@ -3594,17 +3564,13 @@ void VisualScriptDeconstruct::_bind_methods() {
argt += "," + Variant::get_type_name(Variant::Type(i));
}
- String iet = "None,Key,MouseMotion,MouseButton,JoypadMotion,JoypadButton,ScreenTouch,ScreenDrag,Action";
-
ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, argt), "set_deconstruct_type", "get_deconstruct_type");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "input_type", PROPERTY_HINT_ENUM, iet), "set_deconstruct_input_type", "get_deconstruct_input_type");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "elem_cache", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_elem_cache", "_get_elem_cache");
}
VisualScriptDeconstruct::VisualScriptDeconstruct() {
type = Variant::NIL;
- input_type = InputEvent::NONE;
}
void register_visual_script_nodes() {
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index c0933d1a78..402093fa80 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -923,7 +923,6 @@ class VisualScriptDeconstruct : public VisualScriptNode {
void _update_elements();
Variant::Type type;
- InputEvent::Type input_type;
void _set_elem_cache(const Array &p_elements);
Array _get_elem_cache() const;
@@ -952,9 +951,6 @@ public:
void set_deconstruct_type(Variant::Type p_type);
Variant::Type get_deconstruct_type() const;
- void set_deconstruct_input_type(InputEvent::Type p_input_type);
- InputEvent::Type get_deconstruct_input_type() const;
-
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
VisualScriptDeconstruct();
diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp
index 889eac71a7..7313cb6c7c 100644
--- a/modules/webp/image_loader_webp.cpp
+++ b/modules/webp/image_loader_webp.cpp
@@ -37,23 +37,23 @@
#include <webp/decode.h>
#include <webp/encode.h>
-static PoolVector<uint8_t> _webp_lossy_pack(const Image &p_image, float p_quality) {
+static PoolVector<uint8_t> _webp_lossy_pack(const Ref<Image> &p_image, float p_quality) {
- ERR_FAIL_COND_V(p_image.empty(), PoolVector<uint8_t>());
+ ERR_FAIL_COND_V(p_image.is_null() || p_image->empty(), PoolVector<uint8_t>());
- Image img = p_image;
- if (img.detect_alpha())
- img.convert(Image::FORMAT_RGBA8);
+ Ref<Image> img = p_image->duplicate();
+ if (img->detect_alpha())
+ img->convert(Image::FORMAT_RGBA8);
else
- img.convert(Image::FORMAT_RGB8);
+ img->convert(Image::FORMAT_RGB8);
- Size2 s(img.get_width(), img.get_height());
- PoolVector<uint8_t> data = img.get_data();
+ Size2 s(img->get_width(), img->get_height());
+ PoolVector<uint8_t> data = img->get_data();
PoolVector<uint8_t>::Read r = data.read();
uint8_t *dst_buff = NULL;
size_t dst_size = 0;
- if (img.get_format() == Image::FORMAT_RGB8) {
+ if (img->get_format() == Image::FORMAT_RGB8) {
dst_size = WebPEncodeRGB(r.ptr(), s.width, s.height, 3 * s.width, CLAMP(p_quality * 100.0, 0, 100.0), &dst_buff);
} else {
@@ -74,17 +74,17 @@ static PoolVector<uint8_t> _webp_lossy_pack(const Image &p_image, float p_qualit
return dst;
}
-static Image _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) {
+static Ref<Image> _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) {
int size = p_buffer.size() - 4;
- ERR_FAIL_COND_V(size <= 0, Image());
+ ERR_FAIL_COND_V(size <= 0, Ref<Image>());
PoolVector<uint8_t>::Read r = p_buffer.read();
- ERR_FAIL_COND_V(r[0] != 'W' || r[1] != 'E' || r[2] != 'B' || r[3] != 'P', Image());
+ ERR_FAIL_COND_V(r[0] != 'W' || r[1] != 'E' || r[2] != 'B' || r[3] != 'P', Ref<Image>());
WebPBitstreamFeatures features;
if (WebPGetFeatures(&r[4], size, &features) != VP8_STATUS_OK) {
ERR_EXPLAIN("Error unpacking WEBP image:");
- ERR_FAIL_V(Image());
+ ERR_FAIL_V(Ref<Image>());
}
/*
@@ -107,14 +107,15 @@ static Image _webp_lossy_unpack(const PoolVector<uint8_t> &p_buffer) {
}
//ERR_EXPLAIN("Error decoding webp! - "+p_file);
- ERR_FAIL_COND_V(errdec, Image());
+ ERR_FAIL_COND_V(errdec, Ref<Image>());
dst_w = PoolVector<uint8_t>::Write();
- return Image(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image);
+ Ref<Image> img = memnew(Image(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image));
+ return img;
}
-Error ImageLoaderWEBP::load_image(Image *p_image, FileAccess *f) {
+Error ImageLoaderWEBP::load_image(Ref<Image> p_image, FileAccess *f) {
uint32_t size = f->get_len();
PoolVector<uint8_t> src_image;
@@ -160,7 +161,7 @@ Error ImageLoaderWEBP::load_image(Image *p_image, FileAccess *f) {
src_r = PoolVector<uint8_t>::Read();
dst_w = PoolVector<uint8_t>::Write();
- *p_image = Image(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image);
+ p_image->create(features.width, features.height, 0, features.has_alpha ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8, dst_image);
return OK;
}
diff --git a/modules/webp/image_loader_webp.h b/modules/webp/image_loader_webp.h
index 2d0ac796d3..ba817e0ecd 100644
--- a/modules/webp/image_loader_webp.h
+++ b/modules/webp/image_loader_webp.h
@@ -38,7 +38,7 @@
class ImageLoaderWEBP : public ImageFormatLoader {
public:
- virtual Error load_image(Image *p_image, FileAccess *f);
+ virtual Error load_image(Ref<Image> p_image, FileAccess *f);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
ImageLoaderWEBP();
};
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index e8de93067f..2732fc3c29 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -31,7 +31,7 @@ android {
}
compileSdkVersion 23
- buildToolsVersion "23.0.3"
+ buildToolsVersion "25.0.3"
useLibrary 'org.apache.http.legacy'
packagingOptions {
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 72d665329e..84fc4f10bf 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -3523,7 +3523,7 @@ public:
EditorExportAndroid() {
- Image img(_android_logo);
+ Ref<Image> img = memnew(Image(_android_logo));
logo = Ref<ImageTexture>(memnew(ImageTexture));
logo->create_from_image(img);
diff --git a/platform/android/java/res/drawable/icon.png b/platform/android/java/res/drawable/icon.png
index a0a0f4af25..29c4a7b8fc 100644
--- a/platform/android/java/res/drawable/icon.png
+++ b/platform/android/java/res/drawable/icon.png
Binary files differ
diff --git a/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java b/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java
index 044efba1f3..6f308af360 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java
@@ -355,36 +355,35 @@ public class PaymentsManager {
tempList.add(s);
}
packs.add(tempList);
-
- for (ArrayList<String> skuPartList : packs) {
- Bundle querySkus = new Bundle();
- querySkus.putStringArrayList("ITEM_ID_LIST", skuPartList);
- Bundle skuDetails = null;
- try {
- skuDetails = mService.getSkuDetails(3, activity.getPackageName(), "inapp", querySkus);
- if (!skuDetails.containsKey("DETAILS_LIST")) {
- int response = getResponseCodeFromBundle(skuDetails);
- if (response != BILLING_RESPONSE_RESULT_OK) {
- godotPaymentV3.errorSkuDetail(getResponseDesc(response));
- } else {
- godotPaymentV3.errorSkuDetail("No error but no detail list.");
- }
- return;
+ }
+ for (ArrayList<String> skuPartList : packs) {
+ Bundle querySkus = new Bundle();
+ querySkus.putStringArrayList("ITEM_ID_LIST", skuPartList);
+ Bundle skuDetails = null;
+ try {
+ skuDetails = mService.getSkuDetails(3, activity.getPackageName(), "inapp", querySkus);
+ if (!skuDetails.containsKey("DETAILS_LIST")) {
+ int response = getResponseCodeFromBundle(skuDetails);
+ if (response != BILLING_RESPONSE_RESULT_OK) {
+ godotPaymentV3.errorSkuDetail(getResponseDesc(response));
+ } else {
+ godotPaymentV3.errorSkuDetail("No error but no detail list.");
}
+ return;
+ }
- ArrayList<String> responseList = skuDetails.getStringArrayList("DETAILS_LIST");
+ ArrayList<String> responseList = skuDetails.getStringArrayList("DETAILS_LIST");
- for (String thisResponse : responseList) {
- Log.d("godot", "response = "+thisResponse);
- godotPaymentV3.addSkuDetail(thisResponse);
- }
- } catch (RemoteException e) {
- e.printStackTrace();
- godotPaymentV3.errorSkuDetail("RemoteException error!");
+ for (String thisResponse : responseList) {
+ Log.d("godot", "response = "+thisResponse);
+ godotPaymentV3.addSkuDetail(thisResponse);
}
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ godotPaymentV3.errorSkuDetail("RemoteException error!");
}
- godotPaymentV3.completeSkuDetail();
}
+ godotPaymentV3.completeSkuDetail();
}
})).start();
}
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 6882dad4f0..37f53a2478 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -610,7 +610,7 @@ struct JAndroidPointerEvent {
};
static List<JAndroidPointerEvent> pointer_events;
-static List<InputEvent> key_events;
+static List<Ref<InputEvent> > key_events;
static List<OS_Android::JoypadEvent> joy_events;
static bool initialized = false;
static Mutex *input_mutex = NULL;
@@ -1036,7 +1036,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
while (key_events.size()) {
- InputEvent event = key_events.front()->get();
+ Ref<InputEvent> event = key_events.front()->get();
os_android->process_event(event);
key_events.pop_front();
@@ -1367,7 +1367,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env
jevent.device = p_device;
jevent.type = OS_Android::JOY_EVENT_BUTTON;
jevent.index = p_button;
- jevent.pressed = p_pressed;
+ jevent->is_pressed() = p_pressed;
input_mutex->lock();
joy_events.push_back(jevent);
@@ -1419,30 +1419,23 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jobject obj, jint p_scancode, jint p_unicode_char, jboolean p_pressed) {
- InputEvent ievent;
- ievent.type = InputEvent::KEY;
- ievent.device = 0;
+ Ref<InputEventKey> ievent;
int val = p_unicode_char;
int scancode = android_get_keysym(p_scancode);
- ievent.key.scancode = scancode;
- ievent.key.unicode = val;
- ievent.key.pressed = p_pressed;
+ ievent->set_scancode(scancode);
+ ievent->set_unicode(val);
+ ievent->set_pressed(p_pressed);
- print_line("Scancode: " + String::num(p_scancode) + ":" + String::num(ievent.key.scancode) + " Unicode: " + String::num(val));
-
- ievent.key.mod.shift = false;
- ievent.key.mod.alt = false;
- ievent.key.mod.control = false;
- ievent.key.echo = false;
+ print_line("Scancode: " + String::num(p_scancode) + ":" + String::num(ievent->get_scancode()) + " Unicode: " + String::num(val));
if (val == '\n') {
- ievent.key.scancode = KEY_ENTER;
+ ievent->set_scancode(KEY_ENTER);
} else if (val == 61448) {
- ievent.key.scancode = KEY_BACKSPACE;
- ievent.key.unicode = KEY_BACKSPACE;
+ ievent->set_scancode(KEY_BACKSPACE);
+ ievent->set_unicode(KEY_BACKSPACE);
} else if (val == 61453) {
- ievent.key.scancode = KEY_ENTER;
- ievent.key.unicode = KEY_ENTER;
+ ievent->set_scancode(KEY_ENTER);
+ ievent->set_unicode(KEY_ENTER);
} else if (p_scancode == 4) {
go_back_request = true;
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 6772964c2f..1c721c645c 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -344,7 +344,7 @@ void OS_Android::process_joy_event(OS_Android::JoypadEvent p_event) {
switch (p_event.type) {
case JOY_EVENT_BUTTON:
- input->joy_button(p_event.device, p_event.index, p_event.pressed);
+ input->joy_button(p_event.device, p_event.index, p_event->is_pressed());
break;
case JOY_EVENT_AXIS:
InputDefault::JoyAxis value;
@@ -360,7 +360,7 @@ void OS_Android::process_joy_event(OS_Android::JoypadEvent p_event) {
}
}
-void OS_Android::process_event(InputEvent p_event) {
+void OS_Android::process_event(Ref<InputEvent> p_event) {
input->parse_input_event(p_event);
}
@@ -374,25 +374,24 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
if (touch.size()) {
//end all if exist
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.button_mask = BUTTON_MASK_LEFT;
- ev.mouse_button.pressed = false;
- ev.mouse_button.x = touch[0].pos.x;
- ev.mouse_button.y = touch[0].pos.y;
- ev.mouse_button.global_x = touch[0].pos.x;
- ev.mouse_button.global_y = touch[0].pos.y;
- input->parse_input_event(ev);
+ {
+ Ref<InputEventMouseButton> ev;
+ ev.instance();
+ ev->set_button_index(BUTTON_LEFT);
+ ev->set_button_mask(BUTTON_MASK_LEFT);
+ ev->set_pressed(false);
+ ev->set_pos(touch[0].pos);
+ ev->set_global_pos(touch[0].pos);
+ input->parse_input_event(ev);
+ }
for (int i = 0; i < touch.size(); i++) {
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch.index = touch[i].id;
- ev.screen_touch.pressed = false;
- ev.screen_touch.x = touch[i].pos.x;
- ev.screen_touch.y = touch[i].pos.y;
+ Ref<InputEventScreenTouch> ev;
+ ev.instance();
+ ev->set_index(touch[i].id);
+ ev->set_pressed(false);
+ ev->set_pos(touch[i].pos);
input->parse_input_event(ev);
}
}
@@ -405,15 +404,14 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
{
//send mouse
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.button_mask = BUTTON_MASK_LEFT;
- ev.mouse_button.pressed = true;
- ev.mouse_button.x = touch[0].pos.x;
- ev.mouse_button.y = touch[0].pos.y;
- ev.mouse_button.global_x = touch[0].pos.x;
- ev.mouse_button.global_y = touch[0].pos.y;
+ Ref<InputEventMouseButton> ev;
+ ev.instance();
+ ev.type = Ref<InputEvent>::MOUSE_BUTTON;
+ ev->set_button_index(BUTTON_LEFT);
+ ev->set_button_mask(BUTTON_MASK_LEFT);
+ ev->set_pressed(true);
+ ev->set_pos(touch[0].pos);
+ ev->set_global_pos(touch[0].pos);
input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y));
last_mouse = touch[0].pos;
input->parse_input_event(ev);
@@ -422,12 +420,11 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
//send touch
for (int i = 0; i < touch.size(); i++) {
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch.index = touch[i].id;
- ev.screen_touch.pressed = true;
- ev.screen_touch.x = touch[i].pos.x;
- ev.screen_touch.y = touch[i].pos.y;
+ Ref<InputEventScreenTouch> ev;
+ ev.instance();
+ ev->set_index(touch[i].id);
+ ev->set_pressed(true);
+ ev->set_pos(touch[i].pos.x);
input->parse_input_event(ev);
}
@@ -436,16 +433,13 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
if (p_points.size()) {
//send mouse, should look for point 0?
- InputEvent ev;
- ev.type = InputEvent::MOUSE_MOTION;
- ev.mouse_motion.button_mask = BUTTON_MASK_LEFT;
- ev.mouse_motion.x = p_points[0].pos.x;
- ev.mouse_motion.y = p_points[0].pos.y;
+ Ref<InputEventMouseMotion> ev;
+ ev.instance();
+ ev->set_button_mask(BUTTON_MASK_LEFT);
+ ev->set_pos(p_points[0].pos.x);
input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
- ev.mouse_motion.speed_x = input->get_last_mouse_speed().x;
- ev.mouse_motion.speed_y = input->get_last_mouse_speed().y;
- ev.mouse_motion.relative_x = p_points[0].pos.x - last_mouse.x;
- ev.mouse_motion.relative_y = p_points[0].pos.y - last_mouse.y;
+ ev->set_speed(input->get_last_mouse_speed());
+ ev->set_relative(p_points[0].pos - last_mouse);
last_mouse = p_points[0].pos;
input->parse_input_event(ev);
}
@@ -468,13 +462,11 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
if (touch[i].pos == p_points[idx].pos)
continue; //no move unncesearily
- InputEvent ev;
- ev.type = InputEvent::SCREEN_DRAG;
- ev.screen_drag.index = touch[i].id;
- ev.screen_drag.x = p_points[idx].pos.x;
- ev.screen_drag.y = p_points[idx].pos.y;
- ev.screen_drag.relative_x = p_points[idx].pos.x - touch[i].pos.x;
- ev.screen_drag.relative_y = p_points[idx].pos.y - touch[i].pos.y;
+ Ref<InputEventScreenDrag> ev;
+ ev.instance();
+ ev->set_index(touch[i].id);
+ ev->set_pos(p_points[idx].pos.x);
+ ev->set_relative(p_points[idx].pos - touch[i].pos);
input->parse_input_event(ev);
touch[i].pos = p_points[idx].pos;
}
@@ -484,26 +476,23 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
if (touch.size()) {
//end all if exist
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.button_mask = BUTTON_MASK_LEFT;
- ev.mouse_button.pressed = false;
- ev.mouse_button.x = touch[0].pos.x;
- ev.mouse_button.y = touch[0].pos.y;
- ev.mouse_button.global_x = touch[0].pos.x;
- ev.mouse_button.global_y = touch[0].pos.y;
+ Ref<InputEventMouseButton> ev;
+ ev.instance();
+ ev->set_button_index(BUTTON_LEFT);
+ ev->set_button_mask(BUTTON_MASK_LEFT);
+ ev->set_pressed(false);
+ ev->set_pos(touch[0].pos.x);
+ ev->set_global_pos(touch[0].pos.x);
input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y));
input->parse_input_event(ev);
for (int i = 0; i < touch.size(); i++) {
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch.index = touch[i].id;
- ev.screen_touch.pressed = false;
- ev.screen_touch.x = touch[i].pos.x;
- ev.screen_touch.y = touch[i].pos.y;
+ Ref<InputEventScreenTouch> ev;
+ ev.instance();
+ ev->set_index(touch[i].id);
+ ev->set_pressed(false);
+ ev->set_pos(touch[i].pos);
input->parse_input_event(ev);
}
touch.clear();
@@ -517,12 +506,12 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
TouchPos tp = p_points[p_pointer];
touch.push_back(tp);
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch.index = tp.id;
- ev.screen_touch.pressed = true;
- ev.screen_touch.x = tp.pos.x;
- ev.screen_touch.y = tp.pos.y;
+ Ref<InputEventScreenTouch> ev;
+ ev.instance();
+
+ ev->set_index(tp.id);
+ ev->set_pressed(true);
+ ev->set_pos(tp.pos);
input->parse_input_event(ev);
} break;
@@ -531,12 +520,11 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos>
for (int i = 0; i < touch.size(); i++) {
if (touch[i].id == p_pointer) {
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch.index = touch[i].id;
- ev.screen_touch.pressed = false;
- ev.screen_touch.x = touch[i].pos.x;
- ev.screen_touch.y = touch[i].pos.y;
+ Ref<InputEventScreenTouch> ev;
+ ev.instance();
+ ev->set_index(touch[i].id);
+ ev->set_pressed(false);
+ ev->set_pos(touch[i].pos);
input->parse_input_event(ev);
touch.remove(i);
i--;
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index f1da2867f0..897c71a7df 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -231,7 +231,7 @@ public:
void process_gyroscope(const Vector3 &p_gyroscope);
void process_touch(int p_what, int p_pointer, const Vector<TouchPos> &p_points);
void process_joy_event(JoypadEvent p_event);
- void process_event(InputEvent p_event);
+ void process_event(Ref<InputEvent> p_event);
void init_video_mode(int p_video_width, int p_video_height);
virtual Error native_video_play(String p_path, float p_volume);
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index fb6d9afd85..4a9f8c780d 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -151,35 +151,35 @@ void HaikuDirectWindow::HandleMouseButton(BMessage *message) {
}
*/
- InputEvent mouse_event;
- mouse_event.type = InputEvent::MOUSE_BUTTON;
+ Ref<InputEvent> mouse_event;
+ mouse_event.type = Ref<InputEvent>::MOUSE_BUTTON;
mouse_event.device = 0;
mouse_event.mouse_button.mod = GetKeyModifierState(modifiers);
- mouse_event.mouse_button.button_mask = GetMouseButtonState(buttons);
- mouse_event.mouse_button.x = where.x;
- mouse_event.mouse_button.y = where.y;
+ mouse_event->get_button_mask() = GetMouseButtonState(buttons);
+ mouse_event->get_pos().x = where.x;
+ mouse_event->get_pos().y = where.y;
mouse_event.mouse_button.global_x = where.x;
mouse_event.mouse_button.global_y = where.y;
switch (button) {
default:
case B_PRIMARY_MOUSE_BUTTON:
- mouse_event.mouse_button.button_index = 1;
+ mouse_event->get_button_index() = 1;
break;
case B_SECONDARY_MOUSE_BUTTON:
- mouse_event.mouse_button.button_index = 2;
+ mouse_event->get_button_index() = 2;
break;
case B_TERTIARY_MOUSE_BUTTON:
- mouse_event.mouse_button.button_index = 3;
+ mouse_event->get_button_index() = 3;
break;
}
- mouse_event.mouse_button.pressed = (message->what == B_MOUSE_DOWN);
+ mouse_event->is_pressed() = (message->what == B_MOUSE_DOWN);
- if (message->what == B_MOUSE_DOWN && mouse_event.mouse_button.button_index == 1) {
+ if (message->what == B_MOUSE_DOWN && mouse_event->get_button_index() == 1) {
int32 clicks = message->FindInt32("clicks");
if (clicks > 1) {
@@ -207,12 +207,12 @@ void HaikuDirectWindow::HandleMouseMoved(BMessage *message) {
Point2i rel = pos - last_mouse_position;
- InputEvent motion_event;
- motion_event.type = InputEvent::MOUSE_MOTION;
+ Ref<InputEvent> motion_event;
+ motion_event.type = Ref<InputEvent>::MOUSE_MOTION;
motion_event.device = 0;
motion_event.mouse_motion.mod = GetKeyModifierState(modifiers);
- motion_event.mouse_motion.button_mask = GetMouseButtonState(buttons);
+ motion_event->get_button_mask() = GetMouseButtonState(buttons);
motion_event.mouse_motion.x = pos.x;
motion_event.mouse_motion.y = pos.y;
input->set_mouse_position(pos);
@@ -221,8 +221,8 @@ void HaikuDirectWindow::HandleMouseMoved(BMessage *message) {
motion_event.mouse_motion.speed_x = input->get_last_mouse_speed().x;
motion_event.mouse_motion.speed_y = input->get_last_mouse_speed().y;
- motion_event.mouse_motion.relative_x = rel.x;
- motion_event.mouse_motion.relative_y = rel.y;
+ motion_event->get_relative().x = rel.x;
+ motion_event->get_relative().y = rel.y;
last_mouse_position = pos;
@@ -235,22 +235,22 @@ void HaikuDirectWindow::HandleMouseWheelChanged(BMessage *message) {
return;
}
- InputEvent mouse_event;
- mouse_event.type = InputEvent::MOUSE_BUTTON;
+ Ref<InputEvent> mouse_event;
+ mouse_event.type = Ref<InputEvent>::MOUSE_BUTTON;
mouse_event.device = 0;
- mouse_event.mouse_button.button_index = wheel_delta_y < 0 ? 4 : 5;
+ mouse_event->get_button_index() = wheel_delta_y < 0 ? 4 : 5;
mouse_event.mouse_button.mod = GetKeyModifierState(last_key_modifier_state);
- mouse_event.mouse_button.button_mask = last_button_mask;
- mouse_event.mouse_button.x = last_mouse_position.x;
- mouse_event.mouse_button.y = last_mouse_position.y;
+ mouse_event->get_button_mask() = last_button_mask;
+ mouse_event->get_pos().x = last_mouse_position.x;
+ mouse_event->get_pos().y = last_mouse_position.y;
mouse_event.mouse_button.global_x = last_mouse_position.x;
mouse_event.mouse_button.global_y = last_mouse_position.y;
- mouse_event.mouse_button.pressed = true;
+ mouse_event->is_pressed() = true;
input->parse_input_event(mouse_event);
- mouse_event.mouse_button.pressed = false;
+ mouse_event->is_pressed() = false;
input->parse_input_event(mouse_event);
}
@@ -271,13 +271,13 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
return;
}
- InputEvent event;
- event.type = InputEvent::KEY;
+ Ref<InputEvent> event;
+ event.type = Ref<InputEvent>::KEY;
event.device = 0;
event.key.mod = GetKeyModifierState(modifiers);
- event.key.pressed = (message->what == B_KEY_DOWN);
- event.key.scancode = KeyMappingHaiku::get_keysym(raw_char, key);
- event.key.echo = message->HasInt32("be:key_repeat");
+ event->is_pressed() = (message->what == B_KEY_DOWN);
+ event->get_scancode() = KeyMappingHaiku::get_keysym(raw_char, key);
+ event->is_echo() = message->HasInt32("be:key_repeat");
event.key.unicode = 0;
const char *bytes = NULL;
@@ -286,9 +286,9 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
}
//make it consistent across platforms.
- if (event.key.scancode == KEY_BACKTAB) {
- event.key.scancode = KEY_TAB;
- event.key.mod.shift = true;
+ if (event->get_scancode() == KEY_BACKTAB) {
+ event->get_scancode() = KEY_TAB;
+ event->get_shift() = true;
}
input->parse_input_event(event);
@@ -308,13 +308,13 @@ void HaikuDirectWindow::HandleKeyboardModifierEvent(BMessage *message) {
int32 key = old_modifiers ^ modifiers;
- InputEvent event;
- event.type = InputEvent::KEY;
+ Ref<InputEvent> event;
+ event.type = Ref<InputEvent>::KEY;
event.device = 0;
event.key.mod = GetKeyModifierState(modifiers);
- event.key.pressed = ((modifiers & key) != 0);
- event.key.scancode = KeyMappingHaiku::get_modifier_keysym(key);
- event.key.echo = false;
+ event->is_pressed() = ((modifiers & key) != 0);
+ event->get_scancode() = KeyMappingHaiku::get_modifier_keysym(key);
+ event->is_echo() = false;
event.key.unicode = 0;
input->parse_input_event(event);
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub
index 5d3267cff3..466b8241de 100644
--- a/platform/iphone/SCsub
+++ b/platform/iphone/SCsub
@@ -5,7 +5,6 @@ Import('env')
iphone_lib = [
'os_iphone.cpp',
- #'rasterizer_iphone.cpp',
'audio_driver_iphone.cpp',
'sem_iphone.cpp',
'gl_view.mm',
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index e075941d36..0d9750d701 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -49,6 +49,8 @@
#import <Parse/Parse.h>
#endif
+#import "GameController/GameController.h"
+
#define kFilteringFactor 0.1
#define kRenderingFrequency 60
#define kAccelerometerFrequency 100.0 // Hz
@@ -89,6 +91,282 @@ static ViewController *mainViewController = nil;
return mainViewController;
}
+NSMutableDictionary *ios_joysticks = nil;
+
+- (GCControllerPlayerIndex)getFreePlayerIndex {
+ bool have_player_1 = false;
+ bool have_player_2 = false;
+ bool have_player_3 = false;
+ bool have_player_4 = false;
+
+ if (ios_joysticks == nil) {
+ NSArray *keys = [ios_joysticks allKeys];
+ for (NSNumber *key in keys) {
+ GCController *controller = [ios_joysticks objectForKey:key];
+ if (controller.playerIndex == GCControllerPlayerIndex1) {
+ have_player_1 = true;
+ } else if (controller.playerIndex == GCControllerPlayerIndex2) {
+ have_player_2 = true;
+ } else if (controller.playerIndex == GCControllerPlayerIndex3) {
+ have_player_3 = true;
+ } else if (controller.playerIndex == GCControllerPlayerIndex4) {
+ have_player_4 = true;
+ };
+ };
+ };
+
+ if (!have_player_1) {
+ return GCControllerPlayerIndex1;
+ } else if (!have_player_2) {
+ return GCControllerPlayerIndex2;
+ } else if (!have_player_3) {
+ return GCControllerPlayerIndex3;
+ } else if (!have_player_4) {
+ return GCControllerPlayerIndex4;
+ } else {
+ return GCControllerPlayerIndexUnset;
+ };
+};
+
+- (void)controllerWasConnected:(NSNotification *)notification {
+ // create our dictionary if we don't have one yet
+ if (ios_joysticks == nil) {
+ ios_joysticks = [[NSMutableDictionary alloc] init];
+ };
+
+ // get our controller
+ GCController *controller = (GCController *)notification.object;
+ if (controller == nil) {
+ printf("Couldn't retrieve new controller\n");
+ } else if ([[ios_joysticks allKeysForObject:controller] count] != 0) {
+ printf("Controller is already registered\n");
+ } else {
+ // get a new id for our controller
+ int joy_id = OSIPhone::get_singleton()->get_unused_joy_id();
+ if (joy_id != -1) {
+ // assign our player index
+ if (controller.playerIndex == GCControllerPlayerIndexUnset) {
+ controller.playerIndex = [self getFreePlayerIndex];
+ };
+
+ // tell Godot about our new controller
+ OSIPhone::get_singleton()->joy_connection_changed(
+ joy_id, true, [controller.vendorName UTF8String]);
+
+ // add it to our dictionary, this will retain our controllers
+ [ios_joysticks setObject:controller
+ forKey:[NSNumber numberWithInt:joy_id]];
+
+ // set our input handler
+ [self setControllerInputHandler:controller];
+ } else {
+ printf("Couldn't retrieve new joy id\n");
+ };
+ };
+};
+
+- (void)controllerWasDisconnected:(NSNotification *)notification {
+ if (ios_joysticks != nil) {
+ // find our joystick, there should be only one in our dictionary
+ GCController *controller = (GCController *)notification.object;
+ NSArray *keys = [ios_joysticks allKeysForObject:controller];
+ for (NSNumber *key in keys) {
+ // tell Godot this joystick is no longer there
+ int joy_id = [key intValue];
+ OSIPhone::get_singleton()->joy_connection_changed(joy_id, false, "");
+
+ // and remove it from our dictionary
+ [ios_joysticks removeObjectForKey:key];
+ };
+ };
+};
+
+- (int)getJoyIdForController:(GCController *)controller {
+ if (ios_joysticks != nil) {
+ // find our joystick, there should be only one in our dictionary
+ NSArray *keys = [ios_joysticks allKeysForObject:controller];
+ for (NSNumber *key in keys) {
+ int joy_id = [key intValue];
+ return joy_id;
+ };
+ };
+
+ return -1;
+};
+
+- (void)setControllerInputHandler:(GCController *)controller {
+ // Hook in the callback handler for the correct gamepad profile.
+ // This is a bit of a weird design choice on Apples part.
+ // You need to select the most capable gamepad profile for the
+ // gamepad attached.
+ if (controller.extendedGamepad != nil) {
+ // The extended gamepad profile has all the input you could possibly find on
+ // a gamepad but will only be active if your gamepad actually has all of
+ // these...
+ controller.extendedGamepad.valueChangedHandler = ^(
+ GCExtendedGamepad *gamepad, GCControllerElement *element) {
+ int joy_id = [self getJoyIdForController:controller];
+
+ if (element == gamepad.buttonA) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_0,
+ gamepad.buttonA.isPressed);
+ } else if (element == gamepad.buttonB) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_1,
+ gamepad.buttonB.isPressed);
+ } else if (element == gamepad.buttonX) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_2,
+ gamepad.buttonX.isPressed);
+ } else if (element == gamepad.buttonY) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_3,
+ gamepad.buttonY.isPressed);
+ } else if (element == gamepad.leftShoulder) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_L,
+ gamepad.leftShoulder.isPressed);
+ } else if (element == gamepad.rightShoulder) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_R,
+ gamepad.rightShoulder.isPressed);
+ } else if (element == gamepad.leftTrigger) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_L2,
+ gamepad.leftTrigger.isPressed);
+ } else if (element == gamepad.rightTrigger) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_R2,
+ gamepad.rightTrigger.isPressed);
+ } else if (element == gamepad.dpad) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_UP,
+ gamepad.dpad.up.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_DOWN,
+ gamepad.dpad.down.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_LEFT,
+ gamepad.dpad.left.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_RIGHT,
+ gamepad.dpad.right.isPressed);
+ };
+
+ InputDefault::JoyAxis jx;
+ jx.min = -1;
+ if (element == gamepad.leftThumbstick) {
+ jx.value = gamepad.leftThumbstick.xAxis.value;
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_LX, jx);
+ jx.value = -gamepad.leftThumbstick.yAxis.value;
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_LY, jx);
+ } else if (element == gamepad.rightThumbstick) {
+ jx.value = gamepad.rightThumbstick.xAxis.value;
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_RX, jx);
+ jx.value = -gamepad.rightThumbstick.yAxis.value;
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_RY, jx);
+ } else if (element == gamepad.leftTrigger) {
+ jx.value = gamepad.leftTrigger.value;
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_L2, jx);
+ } else if (element == gamepad.rightTrigger) {
+ jx.value = gamepad.rightTrigger.value;
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_R2, jx);
+ };
+ };
+ } else if (controller.gamepad != nil) {
+ // gamepad is the standard profile with 4 buttons, shoulder buttons and a
+ // D-pad
+ controller.gamepad.valueChangedHandler = ^(GCGamepad *gamepad,
+ GCControllerElement *element) {
+ int joy_id = [self getJoyIdForController:controller];
+
+ if (element == gamepad.buttonA) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_0,
+ gamepad.buttonA.isPressed);
+ } else if (element == gamepad.buttonB) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_1,
+ gamepad.buttonB.isPressed);
+ } else if (element == gamepad.buttonX) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_2,
+ gamepad.buttonX.isPressed);
+ } else if (element == gamepad.buttonY) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_3,
+ gamepad.buttonY.isPressed);
+ } else if (element == gamepad.leftShoulder) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_L,
+ gamepad.leftShoulder.isPressed);
+ } else if (element == gamepad.rightShoulder) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_R,
+ gamepad.rightShoulder.isPressed);
+ } else if (element == gamepad.dpad) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_UP,
+ gamepad.dpad.up.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_DOWN,
+ gamepad.dpad.down.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_LEFT,
+ gamepad.dpad.left.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_RIGHT,
+ gamepad.dpad.right.isPressed);
+ };
+ };
+#ifdef ADD_MICRO_GAMEPAD // disabling this for now, only available on iOS 9+,
+ // while we are setting that as the minimum, seems our
+ // build environment doesn't like it
+ } else if (controller.microGamepad != nil) {
+ // micro gamepads were added in OS 9 and feature just 2 buttons and a d-pad
+ controller.microGamepad.valueChangedHandler =
+ ^(GCMicroGamepad *gamepad, GCControllerElement *element) {
+ int joy_id = [self getJoyIdForController:controller];
+
+ if (element == gamepad.buttonA) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_0,
+ gamepad.buttonA.isPressed);
+ } else if (element == gamepad.buttonX) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_2,
+ gamepad.buttonX.isPressed);
+ } else if (element == gamepad.dpad) {
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_UP,
+ gamepad.dpad.up.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_DOWN,
+ gamepad.dpad.down.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_LEFT,
+ gamepad.dpad.left.isPressed);
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_RIGHT,
+ gamepad.dpad.right.isPressed);
+ };
+ };
+#endif
+ };
+
+ ///@TODO need to add support for controller.motion which gives us access to
+ /// the orientation of the device (if supported)
+
+ ///@TODO need to add support for controllerPausedHandler which should be a
+ /// toggle
+};
+
+- (void)initGameControllers {
+ // get told when controllers connect, this will be called right away for
+ // already connected controllers
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(controllerWasConnected:)
+ name:GCControllerDidConnectNotification
+ object:nil];
+
+ // get told when controllers disconnect
+ [[NSNotificationCenter defaultCenter]
+ addObserver:self
+ selector:@selector(controllerWasDisconnected:)
+ name:GCControllerDidDisconnectNotification
+ object:nil];
+};
+
+- (void)deinitGameControllers {
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:GCControllerDidConnectNotification
+ object:nil];
+ [[NSNotificationCenter defaultCenter]
+ removeObserver:self
+ name:GCControllerDidDisconnectNotification
+ object:nil];
+
+ if (ios_joysticks != nil) {
+ [ios_joysticks dealloc];
+ ios_joysticks = nil;
+ };
+};
+
static int frame_count = 0;
- (void)drawView:(GLView *)view;
{
@@ -97,8 +375,10 @@ static int frame_count = 0;
case 0: {
int backingWidth;
int backingHeight;
- glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
- glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
+ glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
+ GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
+ glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
+ GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
OS::VideoMode vm;
vm.fullscreen = true;
@@ -112,25 +392,35 @@ static int frame_count = 0;
};
++frame_count;
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
+ NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
- //NSString *documentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
- OSIPhone::get_singleton()->set_data_dir(String::utf8([documentsDirectory UTF8String]));
+ // NSString *documentsDirectory = [[[NSFileManager defaultManager]
+ // URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]
+ // lastObject];
+ OSIPhone::get_singleton()->set_data_dir(
+ String::utf8([documentsDirectory UTF8String]));
- NSString *locale_code = [[[NSLocale preferredLanguages] objectAtIndex:0] substringToIndex:2];
- OSIPhone::get_singleton()->set_locale(String::utf8([locale_code UTF8String]));
+ NSString *locale_code =
+ [[[NSLocale preferredLanguages] objectAtIndex:0] substringToIndex:2];
+ OSIPhone::get_singleton()->set_locale(
+ String::utf8([locale_code UTF8String]));
NSString *uuid;
- if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {
+ if ([[UIDevice currentDevice]
+ respondsToSelector:@selector(identifierForVendor)]) {
uuid = [UIDevice currentDevice].identifierForVendor.UUIDString;
} else {
// before iOS 6, so just generate an identifier and store it
- uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"identiferForVendor"];
+ uuid = [[NSUserDefaults standardUserDefaults]
+ objectForKey:@"identiferForVendor"];
if (!uuid) {
CFUUIDRef cfuuid = CFUUIDCreate(NULL);
uuid = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, cfuuid);
CFRelease(cfuuid);
- [[NSUserDefaults standardUserDefaults] setObject:uuid forKey:@"identifierForVendor"];
+ [[NSUserDefaults standardUserDefaults]
+ setObject:uuid
+ forKey:@"identifierForVendor"];
}
}
@@ -138,9 +428,9 @@ static int frame_count = 0;
}; break;
/*
- case 1: {
- ++frame_count;
- }; break;
+ case 1: {
+ ++frame_count;
+ }; break;
*/
case 1: {
@@ -173,9 +463,9 @@ static int frame_count = 0;
}; break;
/*
- case 3: {
- ++frame_count;
- }; break;
+ case 3: {
+ ++frame_count;
+ }; break;
*/
case 2: {
@@ -186,53 +476,85 @@ static int frame_count = 0;
default: {
if (OSIPhone::get_singleton()) {
- //OSIPhone::get_singleton()->update_accelerometer(accel[0], accel[1], accel[2]);
+ // OSIPhone::get_singleton()->update_accelerometer(accel[0], accel[1],
+ // accel[2]);
if (motionInitialised) {
- // Just using polling approach for now, we can set this up so it sends data to us in intervals, might be better.
- // See Apple reference pages for more details:
+ // Just using polling approach for now, we can set this up so it sends
+ // data to us in intervals, might be better. See Apple reference pages
+ // for more details:
// https://developer.apple.com/reference/coremotion/cmmotionmanager?language=objc
- // Apple splits our accelerometer date into a gravity and user movement component. We add them back together
+ // Apple splits our accelerometer date into a gravity and user movement
+ // component. We add them back together
CMAcceleration gravity = motionManager.deviceMotion.gravity;
- CMAcceleration acceleration = motionManager.deviceMotion.userAcceleration;
+ CMAcceleration acceleration =
+ motionManager.deviceMotion.userAcceleration;
- ///@TODO We don't seem to be getting data here, is my device broken or is this code incorrect?
- CMMagneticField magnetic = motionManager.deviceMotion.magneticField.field;
+ ///@TODO We don't seem to be getting data here, is my device broken or
+ /// is this code incorrect?
+ CMMagneticField magnetic =
+ motionManager.deviceMotion.magneticField.field;
- ///@TODO we can access rotationRate as a CMRotationRate variable (processed date) or CMGyroData (raw data), have to see what works best
+ ///@TODO we can access rotationRate as a CMRotationRate variable
+ ///(processed date) or CMGyroData (raw data), have to see what works
+ /// best
CMRotationRate rotation = motionManager.deviceMotion.rotationRate;
// Adjust for screen orientation.
- // [[UIDevice currentDevice] orientation] changes even if we've fixed our orientation which is not
- // a good thing when you're trying to get your user to move the screen in all directions and want consistent output
-
- ///@TODO Using [[UIApplication sharedApplication] statusBarOrientation] is a bit of a hack. Godot obviously knows the orientation so maybe we
+ // [[UIDevice currentDevice] orientation] changes even if we've fixed
+ // our orientation which is not a good thing when you're trying to get
+ // your user to move the screen in all directions and want consistent
+ // output
+
+ ///@TODO Using [[UIApplication sharedApplication] statusBarOrientation]
+ /// is a bit of a hack. Godot obviously knows the orientation so maybe
+ /// we
// can use that instead? (note that left and right seem swapped)
switch ([[UIApplication sharedApplication] statusBarOrientation]) {
case UIDeviceOrientationLandscapeLeft: {
- OSIPhone::get_singleton()->update_gravity(-gravity.y, gravity.x, gravity.z);
- OSIPhone::get_singleton()->update_accelerometer(-(acceleration.y + gravity.y), (acceleration.x + gravity.x), acceleration.z + gravity.z);
- OSIPhone::get_singleton()->update_magnetometer(-magnetic.y, magnetic.x, magnetic.z);
- OSIPhone::get_singleton()->update_gyroscope(-rotation.y, rotation.x, rotation.z);
+ OSIPhone::get_singleton()->update_gravity(-gravity.y, gravity.x,
+ gravity.z);
+ OSIPhone::get_singleton()->update_accelerometer(
+ -(acceleration.y + gravity.y), (acceleration.x + gravity.x),
+ acceleration.z + gravity.z);
+ OSIPhone::get_singleton()->update_magnetometer(
+ -magnetic.y, magnetic.x, magnetic.z);
+ OSIPhone::get_singleton()->update_gyroscope(-rotation.y, rotation.x,
+ rotation.z);
}; break;
case UIDeviceOrientationLandscapeRight: {
- OSIPhone::get_singleton()->update_gravity(gravity.y, -gravity.x, gravity.z);
- OSIPhone::get_singleton()->update_accelerometer((acceleration.y + gravity.y), -(acceleration.x + gravity.x), acceleration.z + gravity.z);
- OSIPhone::get_singleton()->update_magnetometer(magnetic.y, -magnetic.x, magnetic.z);
- OSIPhone::get_singleton()->update_gyroscope(rotation.y, -rotation.x, rotation.z);
+ OSIPhone::get_singleton()->update_gravity(gravity.y, -gravity.x,
+ gravity.z);
+ OSIPhone::get_singleton()->update_accelerometer(
+ (acceleration.y + gravity.y), -(acceleration.x + gravity.x),
+ acceleration.z + gravity.z);
+ OSIPhone::get_singleton()->update_magnetometer(
+ magnetic.y, -magnetic.x, magnetic.z);
+ OSIPhone::get_singleton()->update_gyroscope(rotation.y, -rotation.x,
+ rotation.z);
}; break;
case UIDeviceOrientationPortraitUpsideDown: {
- OSIPhone::get_singleton()->update_gravity(-gravity.x, gravity.y, gravity.z);
- OSIPhone::get_singleton()->update_accelerometer(-(acceleration.x + gravity.x), (acceleration.y + gravity.y), acceleration.z + gravity.z);
- OSIPhone::get_singleton()->update_magnetometer(-magnetic.x, magnetic.y, magnetic.z);
- OSIPhone::get_singleton()->update_gyroscope(-rotation.x, rotation.y, rotation.z);
+ OSIPhone::get_singleton()->update_gravity(-gravity.x, gravity.y,
+ gravity.z);
+ OSIPhone::get_singleton()->update_accelerometer(
+ -(acceleration.x + gravity.x), (acceleration.y + gravity.y),
+ acceleration.z + gravity.z);
+ OSIPhone::get_singleton()->update_magnetometer(
+ -magnetic.x, magnetic.y, magnetic.z);
+ OSIPhone::get_singleton()->update_gyroscope(-rotation.x, rotation.y,
+ rotation.z);
}; break;
default: { // assume portrait
- OSIPhone::get_singleton()->update_gravity(gravity.x, gravity.y, gravity.z);
- OSIPhone::get_singleton()->update_accelerometer(acceleration.x + gravity.x, acceleration.y + gravity.y, acceleration.z + gravity.z);
- OSIPhone::get_singleton()->update_magnetometer(magnetic.x, magnetic.y, magnetic.z);
- OSIPhone::get_singleton()->update_gyroscope(rotation.x, rotation.y, rotation.z);
+ OSIPhone::get_singleton()->update_gravity(gravity.x, gravity.y,
+ gravity.z);
+ OSIPhone::get_singleton()->update_accelerometer(
+ acceleration.x + gravity.x, acceleration.y + gravity.y,
+ acceleration.z + gravity.z);
+ OSIPhone::get_singleton()->update_magnetometer(magnetic.x, magnetic.y,
+ magnetic.z);
+ OSIPhone::get_singleton()->update_gyroscope(rotation.x, rotation.y,
+ rotation.z);
}; break;
};
}
@@ -247,7 +569,8 @@ static int frame_count = 0;
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
printf("****************** did receive memory warning!\n");
- OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_MEMORY_WARNING);
+ OS::get_singleton()->get_main_loop()->notification(
+ MainLoop::NOTIFICATION_OS_MEMORY_WARNING);
};
- (void)applicationDidFinishLaunching:(UIApplication *)application {
@@ -257,53 +580,66 @@ static int frame_count = 0;
[application setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
// disable idle timer
- //application.idleTimerDisabled = YES;
+ // application.idleTimerDisabled = YES;
- //Create a full-screen window
+ // Create a full-screen window
window = [[UIWindow alloc] initWithFrame:rect];
- //window.autoresizesSubviews = YES;
- //[window setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleWidth];
+ // window.autoresizesSubviews = YES;
+ //[window setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
+ // UIViewAutoresizingFlexibleWidth];
- //Create the OpenGL ES view and add it to the window
+ // Create the OpenGL ES view and add it to the window
GLView *glView = [[GLView alloc] initWithFrame:rect];
printf("glview is %p\n", glView);
//[window addSubview:glView];
glView.delegate = self;
- //glView.autoresizesSubviews = YES;
- //[glView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleWidth];
+ // glView.autoresizesSubviews = YES;
+ //[glView setAutoresizingMask:UIViewAutoresizingFlexibleWidth |
+ // UIViewAutoresizingFlexibleWidth];
int backingWidth;
int backingHeight;
- glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
- glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
-
- iphone_main(backingWidth, backingHeight, gargc, gargv);
+ glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
+ GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
+ glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES,
+ GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
+
+ int err = iphone_main(backingWidth, backingHeight, gargc, gargv);
+ if (err != 0) {
+ // bail, things did not go very well for us, should probably output a message on screen with our error code...
+ exit(0);
+ return;
+ };
view_controller = [[ViewController alloc] init];
view_controller.view = glView;
window.rootViewController = view_controller;
_set_keep_screen_on(bool(GLOBAL_DEF("display/keep_screen_on", true)) ? YES : NO);
- glView.useCADisplayLink = bool(GLOBAL_DEF("display.iOS/use_cadisplaylink", true)) ? YES : NO;
+ glView.useCADisplayLink =
+ bool(GLOBAL_DEF("display.iOS/use_cadisplaylink", true)) ? YES : NO;
printf("cadisaplylink: %d", glView.useCADisplayLink);
glView.animationInterval = 1.0 / kRenderingFrequency;
[glView startAnimation];
- //Show the window
+ // Show the window
[window makeKeyAndVisible];
- //Configure and start accelerometer
+ // Configure and start accelerometer
if (!motionInitialised) {
motionManager = [[CMMotionManager alloc] init];
if (motionManager.deviceMotionAvailable) {
motionManager.deviceMotionUpdateInterval = 1.0 / 70.0;
- [motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
+ [motionManager startDeviceMotionUpdatesUsingReferenceFrame:
+ CMAttitudeReferenceFrameXMagneticNorthZVertical];
motionInitialised = YES;
};
};
- //OSIPhone::screen_width = rect.size.width - rect.origin.x;
- //OSIPhone::screen_height = rect.size.height - rect.origin.y;
+ [self initGameControllers];
+
+ // OSIPhone::screen_width = rect.size.width - rect.origin.x;
+ // OSIPhone::screen_height = rect.size.height - rect.origin.y;
mainViewController = view_controller;
@@ -319,24 +655,33 @@ static int frame_count = 0;
String adid = GLOBAL_DEF("mobileapptracker/advertiser_id", "");
String convkey = GLOBAL_DEF("mobileapptracker/conversion_key", "");
- NSString *advertiser_id = [NSString stringWithUTF8String:adid.utf8().get_data()];
- NSString *conversion_key = [NSString stringWithUTF8String:convkey.utf8().get_data()];
+ NSString *advertiser_id =
+ [NSString stringWithUTF8String:adid.utf8().get_data()];
+ NSString *conversion_key =
+ [NSString stringWithUTF8String:convkey.utf8().get_data()];
// Account Configuration info - must be set
- [MobileAppTracker initializeWithMATAdvertiserId:advertiser_id MATConversionKey:conversion_key];
+ [MobileAppTracker initializeWithMATAdvertiserId:advertiser_id
+ MATConversionKey:conversion_key];
// Used to pass us the IFA, enables highly accurate 1-to-1 attribution.
// Required for many advertising networks.
- [MobileAppTracker setAppleAdvertisingIdentifier:[[ASIdentifierManager sharedManager] advertisingIdentifier]
- advertisingTrackingEnabled:[[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]];
+ [MobileAppTracker
+ setAppleAdvertisingIdentifier:[[ASIdentifierManager sharedManager]
+ advertisingIdentifier]
+ advertisingTrackingEnabled:[[ASIdentifierManager sharedManager]
+ isAdvertisingTrackingEnabled]];
#endif
+
};
- (void)applicationWillTerminate:(UIApplication *)application {
printf("********************* will terminate\n");
+ [self deinitGameControllers];
+
if (motionInitialised) {
///@TODO is this the right place to clean this up?
[motionManager stopDeviceMotionUpdates];
@@ -353,7 +698,8 @@ static int frame_count = 0;
///@TODO maybe add pause motionManager? and where would we unpause it?
if (OS::get_singleton()->get_main_loop())
- OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT);
+ OS::get_singleton()->get_main_loop()->notification(
+ MainLoop::NOTIFICATION_WM_FOCUS_OUT);
[view_controller.view stopAnimation];
if (OS::get_singleton()->native_video_is_playing()) {
@@ -363,14 +709,15 @@ static int frame_count = 0;
- (void)applicationWillEnterForeground:(UIApplication *)application {
printf("********************* did enter foreground\n");
- //OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
+ // OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
[view_controller.view startAnimation];
}
- (void)applicationWillResignActive:(UIApplication *)application {
printf("********************* will resign active\n");
- //OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT);
- [view_controller.view stopAnimation]; // FIXME: pause seems to be recommended elsewhere
+ // OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT);
+ [view_controller.view
+ stopAnimation]; // FIXME: pause seems to be recommended elsewhere
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
@@ -380,9 +727,11 @@ static int frame_count = 0;
[MobileAppTracker measureSession];
#endif
if (OS::get_singleton()->get_main_loop())
- OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
+ OS::get_singleton()->get_main_loop()->notification(
+ MainLoop::NOTIFICATION_WM_FOCUS_IN);
- [view_controller.view startAnimation]; // FIXME: resume seems to be recommended elsewhere
+ [view_controller.view
+ startAnimation]; // FIXME: resume seems to be recommended elsewhere
if (OSIPhone::get_singleton()->native_video_is_playing()) {
OSIPhone::get_singleton()->native_video_unpause();
};
@@ -397,14 +746,17 @@ static int frame_count = 0;
}
// For 4.2+ support
-- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
+- (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ sourceApplication:(NSString *)sourceApplication
+ annotation:(id)annotation {
#ifdef MODULE_PARSE_ENABLED
NSLog(@"Handling application openURL");
- return [[FBSDKApplicationDelegate sharedInstance]
- application:application
- openURL:url
- sourceApplication:sourceApplication
- annotation:annotation];
+ return
+ [[FBSDKApplicationDelegate sharedInstance] application:application
+ openURL:url
+ sourceApplication:sourceApplication
+ annotation:annotation];
#endif
#ifdef MODULE_FACEBOOKSCORER_IOS_ENABLED
@@ -414,21 +766,25 @@ static int frame_count = 0;
#endif
}
-- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
+- (void)application:(UIApplication *)application
+ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
#ifdef MODULE_PARSE_ENABLED
// Store the deviceToken in the current installation and save it to Parse.
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
- //NSString* token = [[NSString alloc] initWithData:deviceToken encoding:NSUTF8StringEncoding];
+ // NSString* token = [[NSString alloc] initWithData:deviceToken
+ // encoding:NSUTF8StringEncoding];
NSLog(@"Device Token : %@ ", deviceToken);
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackground];
#endif
}
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
+- (void)application:(UIApplication *)application
+ didReceiveRemoteNotification:(NSDictionary *)userInfo {
#ifdef MODULE_PARSE_ENABLED
[PFPush handlePush:userInfo];
- NSDictionary *aps = [userInfo objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
+ NSDictionary *aps =
+ [userInfo objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSLog(@"Push Notification Payload (app active) %@", aps);
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index 248c73982b..970abc7daa 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -59,15 +59,16 @@ def configure(env):
env["arch"] = "x86"
env["bits"] = "32"
env['CCFLAGS'] = string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fasm-blocks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')
- elif (env["arch"] == "arm64"): # arm64
+ elif (env["arch"] == "arm" or env["arch"] == "arm32" or env["arch"] == "armv7" or env["bits"] == "32"): # arm
+ env["arch"] = "arm"
+ env["bits"] = "32"
+ env['CCFLAGS'] = string.split('-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=9.0 -MMD -MT dependencies -isysroot $IPHONESDK')
+ else: # armv64
+ env["arch"] = "arm64"
env["bits"] = "64"
- env['CCFLAGS'] = string.split('-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=7.0 -isysroot $IPHONESDK')
+ env['CCFLAGS'] = string.split('-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=9.0 -isysroot $IPHONESDK')
env.Append(CPPFLAGS=['-DNEED_LONG_INT'])
env.Append(CPPFLAGS=['-DLIBYUV_DISABLE_NEON'])
- else: # armv7
- env["arch"] = "arm"
- env["bits"] = "32"
- env['CCFLAGS'] = string.split('-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=7.0 -MMD -MT dependencies -isysroot $IPHONESDK')
if (env["arch"] == "x86"):
env['IPHONEPLATFORM'] = 'iPhoneSimulator'
@@ -93,7 +94,7 @@ def configure(env):
'-F$IPHONESDK',
])
elif (env["arch"] == "arm64"):
- env.Append(LINKFLAGS=['-arch', 'arm64', '-Wl,-dead_strip', '-miphoneos-version-min=7.0',
+ env.Append(LINKFLAGS=['-arch', 'arm64', '-Wl,-dead_strip', '-miphoneos-version-min=9.0',
'-isysroot', '$IPHONESDK',
#'-stdlib=libc++',
'-framework', 'Foundation',
@@ -112,7 +113,7 @@ def configure(env):
'-framework', 'CoreMotion',
])
else:
- env.Append(LINKFLAGS=['-arch', 'armv7', '-Wl,-dead_strip', '-miphoneos-version-min=7.0',
+ env.Append(LINKFLAGS=['-arch', 'armv7', '-Wl,-dead_strip', '-miphoneos-version-min=9.0',
'-isysroot', '$IPHONESDK',
'-framework', 'Foundation',
'-framework', 'UIKit',
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index ea229e64da..0d7913446e 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -195,24 +195,24 @@ bool OSIPhone::iterate() {
void OSIPhone::key(uint32_t p_key, bool p_pressed) {
- InputEvent ev;
- ev.type = InputEvent::KEY;
- ev.key.echo = false;
- ev.key.pressed = p_pressed;
- ev.key.scancode = p_key;
- ev.key.unicode = p_key;
+ Ref<InputEventKey> ev;
+ ev.instance();
+ ev->set_echo(false);
+ ev->set_pressed(p_pressed);
+ ev->set_scancode(p_key);
+ ev->set_unicode(p_key);
queue_event(ev);
};
void OSIPhone::mouse_button(int p_idx, int p_x, int p_y, bool p_pressed, bool p_doubleclick, bool p_use_as_mouse) {
if (!GLOBAL_DEF("debug/disable_touch", false)) {
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
- ev.screen_touch.index = p_idx;
- ev.screen_touch.pressed = p_pressed;
- ev.screen_touch.x = p_x;
- ev.screen_touch.y = p_y;
+ Ref<InputEventScreenTouch> ev;
+ ev.instance();
+
+ ev->set_index(p_idx);
+ ev->set_pressed(p_pressed);
+ ev->set_pos(Vector2(p_x, p_y));
queue_event(ev);
};
@@ -220,23 +220,20 @@ void OSIPhone::mouse_button(int p_idx, int p_x, int p_y, bool p_pressed, bool p_
if (p_use_as_mouse) {
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.device = 0;
- ev.mouse_button.pointer_index = p_idx;
-
+ Ref<InputEventMouseButton> ev;
+ ev.instance();
// swaped it for tilted screen
- //ev.mouse_button.x = ev.mouse_button.global_x = video_mode.height - p_y;
- //ev.mouse_button.y = ev.mouse_button.global_y = p_x;
- ev.mouse_button.x = ev.mouse_button.global_x = p_x;
- ev.mouse_button.y = ev.mouse_button.global_y = p_y;
+ //ev->get_pos().x = ev.mouse_button.global_x = video_mode.height - p_y;
+ //ev->get_pos().y = ev.mouse_button.global_y = p_x;
+ ev->set_pos(Vector2(video_mode.height - p_y, p_x));
+ ev->set_global_pos(Vector2(video_mode.height - p_y, p_x));
//mouse_list.pressed[p_idx] = p_pressed;
- input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.doubleclick = p_doubleclick;
- ev.mouse_button.pressed = p_pressed;
+ input->set_mouse_position(ev->get_pos());
+ ev->set_button_index(BUTTON_LEFT);
+ ev->set_doubleclick(p_doubleclick);
+ ev->set_pressed(p_pressed);
queue_event(ev);
};
@@ -246,46 +243,31 @@ void OSIPhone::mouse_move(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_
if (!GLOBAL_DEF("debug/disable_touch", false)) {
- InputEvent ev;
- ev.type = InputEvent::SCREEN_DRAG;
- ev.screen_drag.index = p_idx;
- ev.screen_drag.x = p_x;
- ev.screen_drag.y = p_y;
- ev.screen_drag.relative_x = p_x - p_prev_x;
- ev.screen_drag.relative_y = p_y - p_prev_y;
+ Ref<InputEventScreenDrag> ev;
+ ev.instance();
+ ev->set_index(p_idx);
+ ev->set_pos(Vector2(p_x, p_y));
+ ev->set_relative(Vector2(p_x - p_prev_x, p_y - p_prev_y));
queue_event(ev);
};
if (p_use_as_mouse) {
- InputEvent ev;
- ev.type = InputEvent::MOUSE_MOTION;
- ev.device = 0;
- ev.mouse_motion.pointer_index = p_idx;
+ Ref<InputEventMouseMotion> ev;
+ ev.instance();
- if (true) { // vertical
+ ev->set_pos(Vector2(p_x, p_y));
+ ev->set_global_pos(Vector2(p_x, p_y));
+ ev->set_relative(Vector2(p_x - p_prev_x, p_y - p_prev_y));
- ev.mouse_motion.x = ev.mouse_button.global_x = p_x;
- ev.mouse_motion.y = ev.mouse_button.global_y = p_y;
- ev.mouse_motion.relative_x = ev.mouse_motion.x - p_prev_x;
- ev.mouse_motion.relative_y = ev.mouse_motion.y - p_prev_y;
-
- } else { // horizontal?
- ev.mouse_motion.x = ev.mouse_button.global_x = video_mode.height - p_y;
- ev.mouse_motion.y = ev.mouse_button.global_y = p_x;
- ev.mouse_motion.relative_x = ev.mouse_motion.x - (video_mode.height - p_prev_x);
- ev.mouse_motion.relative_y = ev.mouse_motion.y - p_prev_x;
- };
-
- input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
- ev.mouse_motion.speed_x = input->get_last_mouse_speed().x;
- ev.mouse_motion.speed_y = input->get_last_mouse_speed().y;
- ev.mouse_motion.button_mask = 1; // pressed
+ input->set_mouse_position(ev->get_pos());
+ ev->set_speed(input->get_last_mouse_speed());
+ ev->set_button_mask(BUTTON_LEFT); // pressed
queue_event(ev);
};
};
-void OSIPhone::queue_event(const InputEvent &p_event) {
+void OSIPhone::queue_event(const Ref<InputEvent> &p_event) {
ERR_FAIL_INDEX(event_count, MAX_EVENTS);
@@ -357,6 +339,22 @@ void OSIPhone::update_gyroscope(float p_x, float p_y, float p_z) {
input->set_gyroscope(Vector3(p_x, p_y, p_z));
};
+int OSIPhone::get_unused_joy_id() {
+ return input->get_unused_joy_id();
+};
+
+void OSIPhone::joy_connection_changed(int p_idx, bool p_connected, String p_name) {
+ input->joy_connection_changed(p_idx, p_connected, p_name);
+};
+
+void OSIPhone::joy_button(int p_device, int p_button, bool p_pressed) {
+ input->joy_button(p_device, p_button, p_pressed);
+};
+
+void OSIPhone::joy_axis(int p_device, int p_axis, const InputDefault::JoyAxis &p_value) {
+ input->joy_axis(p_device, p_axis, p_value);
+};
+
void OSIPhone::delete_main_loop() {
if (main_loop) {
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index bf7e897efe..4031b7524c 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -118,9 +118,9 @@ private:
Vector3 last_accel;
- InputEvent event_queue[MAX_EVENTS];
+ Ref<InputEvent> event_queue[MAX_EVENTS];
int event_count;
- void queue_event(const InputEvent &p_event);
+ void queue_event(const Ref<InputEvent> &p_event);
String data_dir;
String unique_ID;
@@ -145,6 +145,11 @@ public:
void update_magnetometer(float p_x, float p_y, float p_z);
void update_gyroscope(float p_x, float p_y, float p_z);
+ int get_unused_joy_id();
+ void joy_connection_changed(int p_idx, bool p_connected, String p_name);
+ void joy_button(int p_device, int p_button, bool p_pressed);
+ void joy_axis(int p_device, int p_axis, const InputDefault::JoyAxis &p_value);
+
static OSIPhone *get_singleton();
virtual void set_mouse_show(bool p_show);
diff --git a/platform/iphone/rasterizer_iphone.cpp b/platform/iphone/rasterizer_iphone.cpp
deleted file mode 100644
index ff13ff1b89..0000000000
--- a/platform/iphone/rasterizer_iphone.cpp
+++ /dev/null
@@ -1,2585 +0,0 @@
-/*************************************************************************/
-/* rasterizer_iphone.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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. */
-/*************************************************************************/
-#ifdef IPHONE_ENABLED
-
-#include "rasterizer_iphone.h"
-#include "global_config.h"
-#include "os/os.h"
-#include <stdio.h>
-
-_FORCE_INLINE_ static void _gl_load_transform(const Transform &tr) {
-
- GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
- glLoadMatrixf(matrix);
-};
-
-_FORCE_INLINE_ static void _gl_mult_transform(const Transform &tr) {
-
- GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
- glMultMatrixf(matrix);
-};
-
-static const GLenum prim_type[] = { GL_POINTS, GL_LINES, GL_TRIANGLES, GL_TRIANGLE_FAN };
-
-static void _draw_primitive(int p_points, const float *p_vertices, const float *p_normals, const float *p_colors, const float *p_uvs, const Plane *p_tangents = NULL, int p_instanced = 1) {
-
- ERR_FAIL_COND(!p_vertices);
- ERR_FAIL_COND(p_points < 1 || p_points > 4);
-
- GLenum type = prim_type[p_points - 1];
-
- if (!p_colors) {
- glColor4f(1, 1, 1, 1);
- };
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, (GLvoid *)p_vertices);
-
- if (p_normals) {
-
- glEnableClientState(GL_NORMAL_ARRAY);
- glNormalPointer(GL_FLOAT, 0, (GLvoid *)p_normals);
- };
-
- if (p_colors) {
- glEnableClientState(GL_COLOR_ARRAY);
- glColorPointer(4, GL_FLOAT, 0, p_colors);
- };
-
- if (p_uvs) {
-
- glClientActiveTexture(GL_TEXTURE0);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glTexCoordPointer(2, GL_FLOAT, 0, p_uvs);
- };
-
- glDrawArrays(type, 0, p_points);
-
- glDisableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
- glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-};
-
-/* TEXTURE API */
-
-static Image _get_gl_image_and_format(const Image &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, int &r_gl_components, bool &r_has_alpha_cache) {
-
- r_has_alpha_cache = false;
- Image image = p_image;
-
- switch (p_format) {
-
- case Image::FORMAT_L8: {
- r_gl_components = 1;
- r_gl_format = GL_LUMINANCE;
-
- } break;
- case Image::FORMAT_INTENSITY: {
-
- image.convert(Image::FORMAT_RGBA8);
- r_gl_components = 4;
- r_gl_format = GL_RGBA;
- r_has_alpha_cache = true;
- } break;
- case Image::FORMAT_LA8: {
-
- image.convert(Image::FORMAT_RGBA8);
- r_gl_components = 4;
- r_gl_format = GL_RGBA;
- r_has_alpha_cache = true;
- } break;
-
- case Image::FORMAT_INDEXED: {
-
- image.convert(Image::FORMAT_RGB8);
- r_gl_components = 3;
- r_gl_format = GL_RGB;
-
- } break;
-
- case Image::FORMAT_INDEXED_ALPHA: {
-
- image.convert(Image::FORMAT_RGBA8);
- r_gl_components = 4;
- r_gl_format = GL_RGB;
- r_has_alpha_cache = true;
-
- } break;
- case Image::FORMAT_RGB8: {
-
- r_gl_components = 3;
- r_gl_format = GL_RGB;
- } break;
- case Image::FORMAT_RGBA8: {
-
- r_gl_components = 4;
- r_gl_format = GL_RGBA;
- r_has_alpha_cache = true;
- } break;
- default: {
-
- ERR_FAIL_V(Image());
- }
- }
-
- return image;
-}
-
-RID RasterizerIPhone::texture_create() {
-
- Texture *texture = memnew(Texture);
- ERR_FAIL_COND_V(!texture, RID());
- glGenTextures(1, &texture->tex_id);
- texture->active = false;
-
- return texture_owner.make_rid(texture);
-}
-
-void RasterizerIPhone::texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags) {
-
- bool has_alpha_cache;
- int components;
- GLenum format;
-
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
- texture->width = p_width;
- texture->height = p_height;
- texture->format = p_format;
- texture->flags = p_flags;
- //texture->target = (p_flags & VS::TEXTURE_FLAG_CUBEMAP) ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D;
- texture->target = GL_TEXTURE_2D;
-
- _get_gl_image_and_format(Image(), texture->format, texture->flags, format, components, has_alpha_cache);
-
- texture->gl_components_cache = components;
- texture->gl_format_cache = format;
- texture->format_has_alpha = has_alpha_cache;
- texture->has_alpha = false; //by default it doesn't have alpha unless something with alpha is blitteds
-
- glBindTexture(texture->target, texture->tex_id);
-
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS) {
- glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
- }
-
- if (texture->target == GL_TEXTURE_2D) {
- glTexImage2D(texture->target, 0, format, texture->width, texture->height, 0, format, GL_UNSIGNED_BYTE, NULL);
- }
-
- /*
- else {
- //cubemappor
- for (int i=0;i<6;i++)
- glTexImage2D(_cube_side_enum[i], 0, format, texture->width, texture->height, 0, format, GL_UNSIGNED_BYTE,NULL);
- }
- */
-
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Linear Filtering
-
- if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS) {
- //glTexParameteri(texture->target,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
- };
- }
-
- if (texture->flags & VS::TEXTURE_FLAG_REPEAT /* && texture->target != GL_TEXTURE_CUBE_MAP*/) {
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- } else {
-
- //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- }
-
- texture->active = true;
-}
-
-void RasterizerIPhone::texture_blit_rect(RID p_texture, int p_x, int p_y, const Image &p_image, VS::CubeMapSide p_cube_side) {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
- ERR_FAIL_COND(!texture->active);
- ERR_FAIL_COND(texture->format != p_image.get_format());
-
- int components;
- GLenum format;
- bool alpha;
-
- Image img = _get_gl_image_and_format(p_image, p_image.get_format(), texture->flags, format, components, alpha);
-
- if (img.detect_alpha())
- texture->has_alpha = true;
-
- GLenum blit_target = GL_TEXTURE_2D; //(texture->target == GL_TEXTURE_CUBE_MAP)?_cube_side_enum[p_cube_side]:GL_TEXTURE_2D;
-
- PoolVector<uint8_t>::Read read = img.get_data().read();
-
- glBindTexture(texture->target, texture->tex_id);
- glTexSubImage2D(blit_target, 0, p_x, p_y, img.get_width(), img.get_height(), format, GL_UNSIGNED_BYTE, read.ptr());
-
- //glGenerateMipmap( texture->target );
-}
-
-Image RasterizerIPhone::texture_get_rect(RID p_texture, int p_x, int p_y, int p_width, int p_height, VS::CubeMapSide p_cube_side) const {
-
- return Image();
-}
-void RasterizerIPhone::texture_set_flags(RID p_texture, uint32_t p_flags) {
-
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
-
- glBindTexture(texture->target, texture->tex_id);
- uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
- texture->flags = p_flags | cube; // can't remove a cube from being a cube
-
- if (texture->flags & VS::TEXTURE_FLAG_REPEAT /*&& texture->target != GL_TEXTURE_CUBE_MAP*/) {
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- } else {
- //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- }
-
- if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS)
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
-
- } else {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // nearest
- }
-}
-uint32_t RasterizerIPhone::texture_get_flags(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->flags;
-}
-Image::Format RasterizerIPhone::texture_get_format(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, Image::FORMAT_L8);
-
- return texture->format;
-}
-uint32_t RasterizerIPhone::texture_get_width(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->width;
-}
-uint32_t RasterizerIPhone::texture_get_height(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->height;
-}
-
-bool RasterizerIPhone::texture_has_alpha(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->has_alpha;
-}
-
-/* SHADER API */
-
-RID RasterizerIPhone::shader_create() {
-
- return RID();
-}
-
-void RasterizerIPhone::shader_node_add(RID p_shader, VS::ShaderNodeType p_type, int p_id) {
-}
-void RasterizerIPhone::shader_node_remove(RID p_shader, int p_id) {
-}
-void RasterizerIPhone::shader_node_change_type(RID p_shader, int p_id, VS::ShaderNodeType p_type) {
-}
-void RasterizerIPhone::shader_node_set_param(RID p_shader, int p_id, const Variant &p_value) {
-}
-
-void RasterizerIPhone::shader_get_node_list(RID p_shader, List<int> *p_node_list) const {
-}
-VS::ShaderNodeType RasterizerIPhone::shader_node_get_type(RID p_shader, int p_id) const {
-
- return VS::NODE_ADD;
-}
-Variant RasterizerIPhone::shader_node_get_param(RID p_shader, int p_id) const {
-
- return Variant();
-}
-
-void RasterizerIPhone::shader_connect(RID p_shader, int p_src_id, int p_src_slot, int p_dst_id, int p_dst_slot) {
-}
-bool RasterizerIPhone::shader_is_connected(RID p_shader, int p_src_id, int p_src_slot, int p_dst_id, int p_dst_slot) const {
-
- return false;
-}
-
-void RasterizerIPhone::shader_disconnect(RID p_shader, int p_src_id, int p_src_slot, int p_dst_id, int p_dst_slot) {
-}
-
-void RasterizerIPhone::shader_get_connections(RID p_shader, List<VS::ShaderConnection> *p_connections) const {
-}
-
-void RasterizerIPhone::shader_clear(RID p_shader) {
-}
-
-/* COMMON MATERIAL API */
-
-void RasterizerIPhone::material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) {
-}
-Variant RasterizerIPhone::material_get_param(RID p_material, const StringName &p_param) const {
-
- return Variant();
-}
-void RasterizerIPhone::material_get_param_list(RID p_material, List<String> *p_param_list) const {
-}
-
-void RasterizerIPhone::material_set_flag(RID p_material, VS::MaterialFlag p_flag, bool p_enabled) {
-}
-bool RasterizerIPhone::material_get_flag(RID p_material, VS::MaterialFlag p_flag) const {
-
- return false;
-}
-
-void RasterizerIPhone::material_set_blend_mode(RID p_material, VS::MaterialBlendMode p_mode) {
-}
-VS::MaterialBlendMode RasterizerIPhone::material_get_blend_mode(RID p_material) const {
-
- return VS::MATERIAL_BLEND_MODE_ADD;
-}
-
-void RasterizerIPhone::material_set_line_width(RID p_material, float p_line_width) {
-}
-float RasterizerIPhone::material_get_line_width(RID p_material) const {
-
- return 0;
-}
-
-/* FIXED MATERIAL */
-
-RID RasterizerIPhone::material_create() {
-
- return material_owner.make_rid(memnew(Material));
-}
-
-void RasterizerIPhone::fixed_material_set_parameter(RID p_material, VS::SpatialMaterialParam p_parameter, const Variant &p_value) {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX);
-
- m->parameters[p_parameter] = p_value;
-}
-Variant RasterizerIPhone::fixed_material_get_parameter(RID p_material, VS::SpatialMaterialParam p_parameter) const {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND_V(!m, Variant());
- ERR_FAIL_INDEX_V(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX, Variant());
-
- return m->parameters[p_parameter];
-}
-
-void RasterizerIPhone::fixed_material_set_texture(RID p_material, VS::SpatialMaterialParam p_parameter, RID p_texture) {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX);
-
- m->textures[p_parameter] = p_texture;
-}
-RID RasterizerIPhone::fixed_material_get_texture(RID p_material, VS::SpatialMaterialParam p_parameter) const {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND_V(!m, RID());
- ERR_FAIL_INDEX_V(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX, Variant());
-
- return m->textures[p_parameter];
-}
-
-void RasterizerIPhone::fixed_material_set_detail_blend_mode(RID p_material, VS::MaterialBlendMode p_mode) {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND(!m);
-
- m->detail_blend_mode = p_mode;
-}
-VS::MaterialBlendMode RasterizerIPhone::fixed_material_get_detail_blend_mode(RID p_material) const {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND_V(!m, VS::MATERIAL_BLEND_MODE_MIX);
-
- return m->detail_blend_mode;
-}
-
-void RasterizerIPhone::fixed_material_set_texcoord_mode(RID p_material, VS::SpatialMaterialParam p_parameter, VS::SpatialMaterialTexCoordMode p_mode) {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND(!m);
- ERR_FAIL_INDEX(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX);
-
- m->texcoord_mode[p_parameter] = p_mode;
-}
-VS::SpatialMaterialTexCoordMode RasterizerIPhone::fixed_material_get_texcoord_mode(RID p_material, VS::SpatialMaterialParam p_parameter) const {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND_V(!m, VS::FIXED_MATERIAL_TEXCOORD_TEXGEN);
- ERR_FAIL_INDEX_V(p_parameter, VisualServer::FIXED_MATERIAL_PARAM_MAX, VS::FIXED_MATERIAL_TEXCOORD_UV);
-
- return m->texcoord_mode[p_parameter]; // for now
-}
-
-void RasterizerIPhone::fixed_material_set_texgen_mode(RID p_material, VS::SpatialMaterialTexGenMode p_mode) {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND(!m);
-
- m->texgen_mode = p_mode;
-};
-
-VS::SpatialMaterialTexGenMode RasterizerIPhone::fixed_material_get_texgen_mode(RID p_material) const {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND_V(!m, VS::FIXED_MATERIAL_TEXGEN_SPHERE);
-
- return m->texgen_mode;
-};
-
-void RasterizerIPhone::fixed_material_set_uv_transform(RID p_material, const Transform &p_transform) {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND(!m);
-
- m->uv_transform = p_transform;
-}
-Transform RasterizerIPhone::fixed_material_get_uv_transform(RID p_material) const {
-
- Material *m = material_owner.get(p_material);
- ERR_FAIL_COND_V(!m, Transform());
-
- return m->uv_transform;
-}
-
-/* SHADER MATERIAL */
-
-RID RasterizerIPhone::shader_material_create() const {
-
- return RID();
-}
-
-void RasterizerIPhone::shader_material_set_vertex_shader(RID p_material, RID p_shader, bool p_owned) {
-}
-RID RasterizerIPhone::shader_material_get_vertex_shader(RID p_material) const {
-
- return RID();
-}
-
-void RasterizerIPhone::shader_material_set_fragment_shader(RID p_material, RID p_shader, bool p_owned) {
-}
-RID RasterizerIPhone::shader_material_get_fragment_shader(RID p_material) const {
-
- return RID();
-}
-
-/* MESH API */
-
-RID RasterizerIPhone::mesh_create() {
-
- return mesh_owner.make_rid(memnew(Mesh));
-}
-
-void RasterizerIPhone::mesh_add_surface(RID p_mesh, VS::PrimitiveType p_primitive, uint32_t p_format, int p_array_len, int p_index_array_len) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
-
- ERR_FAIL_COND((p_format & VS::ARRAY_FORMAT_VERTEX) == 0); // mandatory
- ERR_FAIL_COND(p_array_len <= 0);
- ERR_FAIL_COND(p_index_array_len == 0);
- ERR_FAIL_INDEX(p_primitive, VS::PRIMITIVE_MAX);
-
- Surface *surface = memnew(Surface);
- ERR_FAIL_COND(!surface);
-
- int total_elem_size = 0;
-
- bool use_VBO = true; //glGenBuffersARB!=NULL; // TODO detect if it's in there
- if (p_format & VS::ARRAY_FORMAT_WEIGHTS) {
-
- use_VBO = false;
- }
-
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
-
- Surface::ArrayData &ad = surface->array[i];
- ad.size = 0;
- ad.configured = false;
- ad.ofs = 0;
- int elem_size = 0;
- int elem_count = 0;
-
- if (!(p_format & (1 << i))) // no array
- continue;
-
- switch (i) {
-
- case VS::ARRAY_VERTEX:
- case VS::ARRAY_NORMAL: {
-
- elem_size = 3 * sizeof(GLfloat); // vertex
- elem_count = 3;
- } break;
- case VS::ARRAY_TANGENT: {
- elem_size = 4 * sizeof(GLfloat); // vertex
- elem_count = 4;
-
- } break;
- case VS::ARRAY_COLOR: {
-
- elem_size = 4; /* RGBA */
- elem_count = 4;
- } break;
- case VS::ARRAY_TEX_UV: {
- elem_size = 2 * sizeof(GLfloat);
- elem_count = 2;
-
- } break;
- case VS::ARRAY_WEIGHTS:
- case VS::ARRAY_BONES: {
-
- elem_size = VS::ARRAY_WEIGHTS_SIZE * sizeof(GLfloat);
- elem_count = VS::ARRAY_WEIGHTS_SIZE;
-
- } break;
- case VS::ARRAY_INDEX: {
-
- if (p_index_array_len <= 0) {
- ERR_PRINT("p_index_array_len==NO_INDEX_ARRAY");
- break;
- }
- /* determine wether using 8 or 16 bits indices */
- if (p_index_array_len > (1 << 8)) {
-
- elem_size = 2;
- } else {
- elem_size = 1;
- }
-
- if (use_VBO) {
-
- glGenBuffers(1, &surface->index_id);
- ERR_FAIL_COND(surface->index_id == 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, p_index_array_len * elem_size, NULL, GL_STATIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //unbind
- } else {
- surface->index_array_local = (uint8_t *)memalloc(p_index_array_len * elem_size);
- };
-
- surface->index_array_len = p_index_array_len; // only way it can exist
- ad.ofs = 0;
- ad.size = elem_size;
- ad.configured = false;
- ad.components = 1;
-
- continue;
- } break;
- default: {
- ERR_FAIL();
- }
- }
-
- ad.ofs = total_elem_size;
- ad.size = elem_size;
- ad.components = elem_count;
- total_elem_size += elem_size;
- ad.configured = false;
- }
-
- surface->stride = total_elem_size;
- surface->array_len = p_array_len;
- surface->format = p_format;
- surface->primitive = p_primitive;
-
- /* bind the bigass buffers */
- if (use_VBO) {
-
- glGenBuffers(1, &surface->vertex_id);
- ERR_FAIL_COND(surface->vertex_id == 0);
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
- glBufferData(GL_ARRAY_BUFFER, surface->array_len * surface->stride, NULL, GL_STATIC_DRAW);
- glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
- } else {
- surface->array_local = (uint8_t *)memalloc(surface->array_len * surface->stride);
- };
-
- mesh->surfaces.push_back(surface);
-}
-
-Error RasterizerIPhone::mesh_surface_set_array(RID p_mesh, int p_surface, VS::ArrayType p_type, const Variant &p_array) {
-
- ERR_FAIL_INDEX_V(p_type, VS::ARRAY_MAX, ERR_INVALID_PARAMETER);
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, ERR_INVALID_PARAMETER);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), ERR_INVALID_PARAMETER);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, ERR_INVALID_PARAMETER);
-
- ERR_FAIL_COND_V(surface->array[p_type].size == 0, ERR_INVALID_PARAMETER);
-
- Surface::ArrayData &a = surface->array[p_type];
-
- switch (p_type) {
-
- case VS::ARRAY_INDEX: {
- ERR_FAIL_COND_V(surface->index_array_len <= 0, ERR_INVALID_DATA);
- ERR_FAIL_COND_V(p_array.get_type() != Variant::INT_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<int> indices = p_array;
- ERR_FAIL_COND_V(indices.size() == 0, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V(indices.size() != surface->index_array_len, ERR_INVALID_PARAMETER);
-
- /* determine wether using 16 or 32 bits indices */
-
- if (surface->index_array_local == 0) {
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id);
- };
-
- PoolVector<int>::Read read = indices.read();
- const int *src = read.ptr();
-
- for (int i = 0; i < surface->index_array_len; i++) {
-
- if (surface->index_array_local) {
-
- if (a.size <= (1 << 8)) {
- uint8_t v = src[i];
-
- copymem(&surface->array_local[i * a.size], &v, a.size);
- } else {
- uint16_t v = src[i];
-
- copymem(&surface->array_local[i * a.size], &v, a.size);
- }
-
- } else {
- if (a.size <= (1 << 8)) {
- uint8_t v = src[i];
-
- glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, i * a.size, a.size, &v);
- } else {
- uint16_t v = src[i];
-
- glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, i * a.size, a.size, &v);
- }
- };
- }
- if (surface->index_array_local == 0) {
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- };
- a.configured = true;
- return OK;
- } break;
- case VS::ARRAY_VERTEX:
- case VS::ARRAY_NORMAL: {
-
- ERR_FAIL_COND_V(p_array.get_type() != Variant::VECTOR3_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector3> array = p_array;
- ERR_FAIL_COND_V(array.size() != surface->array_len, ERR_INVALID_PARAMETER);
-
- if (surface->array_local == 0) {
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
- };
-
- PoolVector<Vector3>::Read read = array.read();
- const Vector3 *src = read.ptr();
-
- // setting vertices means regenerating the AABB
- if (p_type == VS::ARRAY_VERTEX)
- surface->aabb = AABB();
-
- for (int i = 0; i < surface->array_len; i++) {
-
- GLfloat vector[3] = { src[i].x, src[i].y, src[i].z };
-
- if (surface->array_local == 0) {
- glBufferSubData(GL_ARRAY_BUFFER, a.ofs + i * surface->stride, a.size, vector);
- } else {
- copymem(&surface->array_local[a.ofs + i * surface->stride], vector, a.size);
- }
-
- if (p_type == VS::ARRAY_VERTEX) {
-
- if (i == 0) {
-
- surface->aabb = AABB(src[i], Vector3());
- } else {
-
- surface->aabb.expand_to(src[i]);
- }
- }
- }
-
- if (surface->array_local == 0) {
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- };
-
- } break;
- case VS::ARRAY_TANGENT: {
-
- ERR_FAIL_COND_V(p_array.get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<real_t> array = p_array;
-
- ERR_FAIL_COND_V(array.size() != surface->array_len * 4, ERR_INVALID_PARAMETER);
-
- if (surface->array_local == 0) {
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
- };
-
- PoolVector<real_t>::Read read = array.read();
- const real_t *src = read.ptr();
-
- for (int i = 0; i < surface->array_len; i++) {
-
- GLfloat xyzw[4] = {
- src[i * 4 + 0],
- src[i * 4 + 1],
- src[i * 4 + 2],
- src[i * 4 + 3]
- };
-
- if (surface->array_local == 0) {
-
- glBufferSubData(GL_ARRAY_BUFFER, a.ofs + i * surface->stride, a.size, xyzw);
- } else {
-
- copymem(&surface->array_local[a.ofs + i * surface->stride], xyzw, a.size);
- };
- }
-
- if (surface->array_local == 0) {
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- };
- } break;
- case VS::ARRAY_COLOR: {
-
- ERR_FAIL_COND_V(p_array.get_type() != Variant::COLOR_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Color> array = p_array;
-
- ERR_FAIL_COND_V(array.size() != surface->array_len, ERR_INVALID_PARAMETER);
-
- if (surface->array_local == 0)
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
-
- PoolVector<Color>::Read read = array.read();
- const Color *src = read.ptr();
- surface->has_alpha_cache = false;
-
- for (int i = 0; i < surface->array_len; i++) {
-
- if (src[i].a < 0.98) // tolerate alpha a bit, for crappy exporters
- surface->has_alpha_cache = true;
- uint8_t colors[4] = { src[i].r * 255.0, src[i].g * 255.0, src[i].b * 255.0, src[i].a * 255.0 };
- // I'm not sure if this is correct, endianness-wise, i should re-check the GL spec
-
- if (surface->array_local == 0)
- glBufferSubData(GL_ARRAY_BUFFER, a.ofs + i * surface->stride, a.size, colors);
- else
- copymem(&surface->array_local[a.ofs + i * surface->stride], colors, a.size);
- }
-
- if (surface->array_local == 0)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-
- } break;
- case VS::ARRAY_TEX_UV: {
-
- ERR_FAIL_COND_V(p_array.get_type() != Variant::VECTOR3_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector3> array = p_array;
-
- ERR_FAIL_COND_V(array.size() != surface->array_len, ERR_INVALID_PARAMETER);
-
- if (surface->array_local == 0)
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
-
- PoolVector<Vector3>::Read read = array.read();
-
- const Vector3 *src = read.ptr();
-
- for (int i = 0; i < surface->array_len; i++) {
-
- GLfloat uv[2] = { src[i].x, src[i].y };
-
- if (surface->array_local == 0)
- glBufferSubData(GL_ARRAY_BUFFER, a.ofs + i * surface->stride, a.size, uv);
- else
- copymem(&surface->array_local[a.ofs + i * surface->stride], uv, a.size);
- }
-
- if (surface->array_local == 0)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-
- } break;
- case VS::ARRAY_BONES:
- case VS::ARRAY_WEIGHTS: {
-
- ERR_FAIL_COND_V(p_array.get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<real_t> array = p_array;
-
- ERR_FAIL_COND_V(array.size() != surface->array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER);
-
- if (surface->array_local == 0)
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
-
- PoolVector<real_t>::Read read = array.read();
-
- const real_t *src = read.ptr();
-
- for (int i = 0; i < surface->array_len; i++) {
-
- GLfloat data[VS::ARRAY_WEIGHTS_SIZE];
- for (int j = 0; j < VS::ARRAY_WEIGHTS_SIZE; j++)
- data[j] = src[i * VS::ARRAY_WEIGHTS_SIZE + j];
-
- if (surface->array_local == 0)
- glBufferSubData(GL_ARRAY_BUFFER, a.ofs + i * surface->stride, a.size, data);
- else
- copymem(&surface->array_local[a.ofs + i * surface->stride], data, a.size);
- }
-
- if (surface->array_local == 0)
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- } break;
- default: { ERR_FAIL_V(ERR_INVALID_PARAMETER); }
- }
-
- a.configured = true;
-
- return OK;
-}
-Variant RasterizerIPhone::mesh_surface_get_array(RID p_mesh, int p_surface, VS::ArrayType p_type) const {
-
- return Variant();
-}
-
-void RasterizerIPhone::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material, bool p_owned) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_surface, mesh->surfaces.size());
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND(!surface);
-
- if (surface->material_owned && surface->material.is_valid())
- free(surface->material);
-
- surface->material_owned = p_owned;
-
- surface->material = p_material;
-}
-
-RID RasterizerIPhone::mesh_surface_get_material(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, RID());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), RID());
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, RID());
-
- return surface->material;
-}
-
-int RasterizerIPhone::mesh_surface_get_array_len(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), -1);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, -1);
-
- return surface->array_len;
-}
-int RasterizerIPhone::mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), -1);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, -1);
-
- return surface->index_array_len;
-}
-uint32_t RasterizerIPhone::mesh_surface_get_format(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, 0);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), 0);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, 0);
-
- return surface->format;
-}
-VS::PrimitiveType RasterizerIPhone::mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, VS::PRIMITIVE_POINTS);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), VS::PRIMITIVE_POINTS);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, VS::PRIMITIVE_POINTS);
-
- return surface->primitive;
-}
-
-void RasterizerIPhone::mesh_erase_surface(RID p_mesh, int p_index) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_index, mesh->surfaces.size());
- Surface *surface = mesh->surfaces[p_index];
- ERR_FAIL_COND(!surface);
-
- memdelete(mesh->surfaces[p_index]);
- mesh->surfaces.remove(p_index);
-}
-int RasterizerIPhone::mesh_get_surface_count(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
-
- return mesh->surfaces.size();
-}
-
-AABB RasterizerIPhone::mesh_get_aabb(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, AABB());
-
- AABB aabb;
-
- for (int i = 0; i < mesh->surfaces.size(); i++) {
-
- if (i == 0)
- aabb = mesh->surfaces[i]->aabb;
- else
- aabb.merge_with(mesh->surfaces[i]->aabb);
- }
-
- return aabb;
-}
-
-/* MULTIMESH API */
-
-RID RasterizerIPhone::multimesh_create() {
-
- return RID();
-}
-
-void RasterizerIPhone::multimesh_set_instance_count(RID p_multimesh, int p_count) {
-}
-int RasterizerIPhone::multimesh_get_instance_count(RID p_multimesh) const {
-
- return 0;
-}
-
-void RasterizerIPhone::multimesh_set_mesh(RID p_multimesh, RID p_mesh) {
-}
-void RasterizerIPhone::multimesh_set_aabb(RID p_multimesh, const AABB &p_aabb) {
-}
-void RasterizerIPhone::multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform) {
-}
-void RasterizerIPhone::multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) {
-}
-
-RID RasterizerIPhone::multimesh_get_mesh(RID p_multimesh) const {
-
- return RID();
-}
-AABB RasterizerIPhone::multimesh_get_aabb(RID p_multimesh) const {
-
- return AABB();
-}
-
-Transform RasterizerIPhone::multimesh_instance_get_transform(RID p_multimesh, int p_index) const {
-
- return Transform();
-}
-Color RasterizerIPhone::multimesh_instance_get_color(RID p_multimesh, int p_index) const {
-
- return Color();
-}
-
-/* POLY API */
-
-RID RasterizerIPhone::poly_create() {
-
- return RID();
-}
-void RasterizerIPhone::poly_set_material(RID p_poly, RID p_material, bool p_owned) {
-}
-void RasterizerIPhone::poly_add_primitive(RID p_poly, const Vector<Vector3> &p_points, const Vector<Vector3> &p_normals, const Vector<Color> &p_colors, const Vector<Vector3> &p_uvs) {
-}
-void RasterizerIPhone::poly_clear(RID p_poly) {
-}
-
-AABB RasterizerIPhone::poly_get_aabb(RID p_poly) const {
-
- return AABB();
-}
-
-/* PARTICLES API */
-
-RID RasterizerIPhone::particles_create() {
-
- return RID();
-}
-
-void RasterizerIPhone::particles_set_amount(RID p_particles, int p_amount) {
-}
-int RasterizerIPhone::particles_get_amount(RID p_particles) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_emitting(RID p_particles, bool p_emitting) {
-}
-
-bool RasterizerIPhone::particles_is_emitting(RID p_particles) const {
-
- return false;
-}
-
-void RasterizerIPhone::particles_set_visibility_aabb(RID p_particles, const AABB &p_visibility) {
-}
-AABB RasterizerIPhone::particles_get_visibility_aabb(RID p_particles) const {
-
- return AABB();
-}
-
-void RasterizerIPhone::particles_set_emission_half_extents(RID p_particles, const Vector3 &p_half_extents) {
-}
-Vector3 RasterizerIPhone::particles_get_emission_half_extents(RID p_particles) const {
-
- return Vector3();
-}
-
-void RasterizerIPhone::particles_set_gravity_normal(RID p_particles, const Vector3 &p_normal) {
-}
-Vector3 RasterizerIPhone::particles_get_gravity_normal(RID p_particles) const {
-
- return Vector3();
-}
-
-void RasterizerIPhone::particles_set_variable(RID p_particles, VS::ParticleVariable p_variable, float p_value) {
-}
-float RasterizerIPhone::particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable, float p_randomness) {
-}
-float RasterizerIPhone::particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos) {
-}
-float RasterizerIPhone::particles_get_color_phase_pos(RID p_particles, int p_phase) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_color_phases(RID p_particles, int p_phases) {
-}
-int RasterizerIPhone::particles_get_color_phases(RID p_particles) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_color_phase_color(RID p_particles, int p_phase, const Color &p_color) {
-}
-Color RasterizerIPhone::particles_get_color_phase_color(RID p_particles, int p_phase) const {
-
- return Color();
-}
-
-void RasterizerIPhone::particles_set_attractors(RID p_particles, int p_attractors) {
-}
-int RasterizerIPhone::particles_get_attractors(RID p_particles) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3 &p_pos) {
-}
-Vector3 RasterizerIPhone::particles_get_attractor_pos(RID p_particles, int p_attractor) const {
-
- return Vector3();
-}
-
-void RasterizerIPhone::particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force) {
-}
-float RasterizerIPhone::particles_get_attractor_strength(RID p_particles, int p_attractor) const {
-
- return 0;
-}
-
-void RasterizerIPhone::particles_set_material(RID p_particles, RID p_material, bool p_owned) {
-}
-
-RID RasterizerIPhone::particles_get_material(RID p_particles) const {
-
- return RID();
-}
-
-AABB RasterizerIPhone::particles_get_aabb(RID p_particles) const {
-
- return AABB();
-}
-/* BEAM API */
-
-RID RasterizerIPhone::beam_create() {
-
- return RID();
-}
-
-void RasterizerIPhone::beam_set_point_count(RID p_beam, int p_count) {
-}
-int RasterizerIPhone::beam_get_point_count(RID p_beam) const {
-
- return 0;
-}
-void RasterizerIPhone::beam_clear(RID p_beam) {
-}
-
-void RasterizerIPhone::beam_set_point(RID p_beam, int p_point, Vector3 &p_pos) {
-}
-Vector3 RasterizerIPhone::beam_get_point(RID p_beam, int p_point) const {
-
- return Vector3();
-}
-
-void RasterizerIPhone::beam_set_primitive(RID p_beam, VS::BeamPrimitive p_primitive) {
-}
-
-VS::BeamPrimitive RasterizerIPhone::beam_get_primitive(RID p_beam) const {
-
- return VS::BEAM_CUBIC;
-}
-
-void RasterizerIPhone::beam_set_material(RID p_beam, RID p_material) {
-}
-RID RasterizerIPhone::beam_get_material(RID p_beam) const {
-
- return RID();
-}
-
-AABB RasterizerIPhone::beam_get_aabb(RID p_particles) const {
-
- return AABB();
-}
-/* SKELETON API */
-
-RID RasterizerIPhone::skeleton_create() {
-
- Skeleton *skeleton = memnew(Skeleton);
- ERR_FAIL_COND_V(!skeleton, RID());
- return skeleton_owner.make_rid(skeleton);
-}
-void RasterizerIPhone::skeleton_resize(RID p_skeleton, int p_bones) {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND(!skeleton);
- if (p_bones == skeleton->bones.size()) {
- return;
- };
- ERR_FAIL_COND(p_bones < 0 || p_bones > 256);
-
- skeleton->bones.resize(p_bones);
-}
-int RasterizerIPhone::skeleton_get_bone_count(RID p_skeleton) const {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND_V(!skeleton, -1);
- return skeleton->bones.size();
-}
-void RasterizerIPhone::skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND(!skeleton);
- ERR_FAIL_INDEX(p_bone, skeleton->bones.size());
-
- skeleton->bones[p_bone] = p_transform;
-}
-Transform RasterizerIPhone::skeleton_bone_get_transform(RID p_skeleton, int p_bone) {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND_V(!skeleton, Transform());
- ERR_FAIL_INDEX_V(p_bone, skeleton->bones.size(), Transform());
-
- // something
- return skeleton->bones[p_bone];
-}
-
-/* LIGHT API */
-
-RID RasterizerIPhone::light_create(VS::LightType p_type) {
-
- Light *light = memnew(Light);
- light->type = p_type;
- return light_owner.make_rid(light);
-}
-
-VS::LightType RasterizerIPhone::light_get_type(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, VS::LIGHT_OMNI);
- return light->type;
-}
-
-void RasterizerIPhone::light_set_color(RID p_light, VS::LightColor p_type, const Color &p_color) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- ERR_FAIL_INDEX(p_type, 3);
- light->colors[p_type] = p_color;
-}
-Color RasterizerIPhone::light_get_color(RID p_light, VS::LightColor p_type) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, Color());
- ERR_FAIL_INDEX_V(p_type, 3, Color());
- return light->colors[p_type];
-}
-
-void RasterizerIPhone::light_set_shadow(RID p_light, bool p_enabled) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->shadow_enabled = p_enabled;
-}
-
-bool RasterizerIPhone::light_has_shadow(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, false);
- return light->shadow_enabled;
-}
-
-void RasterizerIPhone::light_set_volumetric(RID p_light, bool p_enabled) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->volumetric_enabled = p_enabled;
-}
-bool RasterizerIPhone::light_is_volumetric(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, false);
- return light->volumetric_enabled;
-}
-
-void RasterizerIPhone::light_set_projector(RID p_light, RID p_texture) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->projector = p_texture;
-}
-RID RasterizerIPhone::light_get_projector(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, RID());
- return light->projector;
-}
-
-void RasterizerIPhone::light_set_var(RID p_light, VS::LightParam p_var, float p_value) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- ERR_FAIL_INDEX(p_var, VS::LIGHT_PARAM_MAX);
-
- light->vars[p_var] = p_value;
-}
-float RasterizerIPhone::light_get_var(RID p_light, VS::LightParam p_var) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, 0);
-
- ERR_FAIL_INDEX_V(p_var, VS::LIGHT_PARAM_MAX, 0);
-
- return light->vars[p_var];
-}
-
-AABB RasterizerIPhone::light_get_aabb(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, AABB());
-
- switch (light->type) {
-
- case VS::LIGHT_SPOT: {
-
- float len = light->vars[VS::LIGHT_PARAM_RADIUS];
- float size = Math::tan(Math::deg2rad(light->vars[VS::LIGHT_PARAM_SPOT_ANGLE])) * len;
- return AABB(Vector3(-size, -size, -len), Vector3(size * 2, size * 2, len));
- } break;
- case VS::LIGHT_OMNI: {
-
- float r = light->vars[VS::LIGHT_PARAM_RADIUS];
- return AABB(-Vector3(r, r, r), Vector3(r, r, r) * 2);
- } break;
- case VS::LIGHT_DIRECTIONAL: {
-
- return AABB();
- } break;
- default: {}
- }
-
- ERR_FAIL_V(AABB());
-}
-
-RID RasterizerIPhone::light_instance_create(RID p_light) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, RID());
-
- LightInstance *light_instance = memnew(LightInstance);
-
- light_instance->light = p_light;
- light_instance->base = light;
- light_instance->last_pass = 0;
-
- return light_instance_owner.make_rid(light_instance);
-}
-void RasterizerIPhone::light_instance_set_transform(RID p_light_instance, const Transform &p_transform) {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!lighti);
- lighti->transform = p_transform;
-}
-
-void RasterizerIPhone::light_instance_set_active_hint(RID p_light_instance) {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!lighti);
- lighti->last_pass = frame;
-}
-bool RasterizerIPhone::light_instance_has_shadow(RID p_light_instance) const {
-
- return false;
-}
-bool RasterizerIPhone::light_instance_assign_shadow(RID p_light_instance) {
-
- return false;
-}
-Rasterizer::ShadowType RasterizerIPhone::light_instance_get_shadow_type(RID p_light_instance) const {
-
- return Rasterizer::SHADOW_CUBE;
-}
-int RasterizerIPhone::light_instance_get_shadow_passes(RID p_light_instance) const {
-
- return 0;
-}
-void RasterizerIPhone::light_instance_set_pssm_split_info(RID p_light_instance, int p_split, float p_near, float p_far, const CameraMatrix &p_camera, const Transform &p_transform) {
-}
-
-/* PARTICLES INSTANCE */
-
-RID RasterizerIPhone::particles_instance_create(RID p_particles) {
-
- return RID();
-}
-void RasterizerIPhone::particles_instance_set_transform(RID p_particles_instance, const Transform &p_transform) {
-}
-
-/* RENDER API */
-/* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
-static GLfloat rtri; // Angle For The Triangle ( NEW )
-static GLfloat rquad; // Angle For The Quad ( NEW )
-
-void RasterizerIPhone::begin_frame() {
-
- window_size = Size2(OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height);
-
- double time = (OS::get_singleton()->get_ticks_usec() / 1000); // get msec
- time /= 1000.0; // make secs
- time_delta = time - last_time;
- last_time = time;
- frame++;
- glClearColor(0, 0, 1, 1);
- glClear(GL_COLOR_BUFFER_BIT);
-
-/* nehe ?*/
-
-#if 0
- glViewport(0,0,window_size.width,window_size.height); // Reset The Current Viewport
-
- glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
- glLoadIdentity(); // Reset The Projection Matrix
-
- // Calculate The Aspect Ratio Of The Window
- gluPerspective(45.0f,(GLfloat)window_size.width/(GLfloat)window_size.height,0.1f,100.0f);
-
- glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
- glLoadIdentity(); // Reset The Modelview Matrix
-
-
-
- glShadeModel(GL_SMOOTH); // Enable Smooth Shading
- glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
- glClearDepth(1.0f); // Depth Buffer Setup
- glEnable(GL_DEPTH_TEST); // Enables Depth Testing
- glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
- glLoadIdentity(); // Reset The Current Modelview Matrix
- glTranslatef(-1.5f,0.0f,-6.0f); // Move Left 1.5 Units And Into The Screen 6.0
- glRotatef(rtri,0.0f,1.0f,0.0f); // Rotate The Triangle On The Y axis ( NEW )
- glBegin(GL_TRIANGLES); // Start Drawing A Triangle
- glColor3f(1.0f,0.0f,0.0f); // Red
- glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Front)
- glColor3f(0.0f,1.0f,0.0f); // Green
- glVertex3f(-1.0f,-1.0f, 1.0f); // Left Of Triangle (Front)
- glColor3f(0.0f,0.0f,1.0f); // Blue
- glVertex3f( 1.0f,-1.0f, 1.0f); // Right Of Triangle (Front)
- glColor3f(1.0f,0.0f,0.0f); // Red
- glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Right)
- glColor3f(0.0f,0.0f,1.0f); // Blue
- glVertex3f( 1.0f,-1.0f, 1.0f); // Left Of Triangle (Right)
- glColor3f(0.0f,1.0f,0.0f); // Green
- glVertex3f( 1.0f,-1.0f, -1.0f); // Right Of Triangle (Right)
- glColor3f(1.0f,0.0f,0.0f); // Red
- glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Back)
- glColor3f(0.0f,1.0f,0.0f); // Green
- glVertex3f( 1.0f,-1.0f, -1.0f); // Left Of Triangle (Back)
- glColor3f(0.0f,0.0f,1.0f); // Blue
- glVertex3f(-1.0f,-1.0f, -1.0f); // Right Of Triangle (Back)
- glColor3f(1.0f,0.0f,0.0f); // Red
- glVertex3f( 0.0f, 1.0f, 0.0f); // Top Of Triangle (Left)
- glColor3f(0.0f,0.0f,1.0f); // Blue
- glVertex3f(-1.0f,-1.0f,-1.0f); // Left Of Triangle (Left)
- glColor3f(0.0f,1.0f,0.0f); // Green
- glVertex3f(-1.0f,-1.0f, 1.0f); // Right Of Triangle (Left)
- glEnd(); // Done Drawing The Pyramid
-
- glLoadIdentity(); // Reset The Current Modelview Matrix
- glTranslatef(1.5f,0.0f,-7.0f); // Move Right 1.5 Units And Into The Screen 7.0
- glRotatef(rquad,1.0f,1.0f,1.0f); // Rotate The Quad On The X axis ( NEW )
- glBegin(GL_QUADS); // Draw A Quad
- glColor3f(0.0f,1.0f,0.0f); // Set The Color To Green
- glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Top)
- glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Top)
- glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Quad (Top)
- glVertex3f( 1.0f, 1.0f, 1.0f); // Bottom Right Of The Quad (Top)
- glColor3f(1.0f,0.5f,0.0f); // Set The Color To Orange
- glVertex3f( 1.0f,-1.0f, 1.0f); // Top Right Of The Quad (Bottom)
- glVertex3f(-1.0f,-1.0f, 1.0f); // Top Left Of The Quad (Bottom)
- glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Bottom)
- glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Bottom)
- glColor3f(1.0f,0.0f,0.0f); // Set The Color To Red
- glVertex3f( 1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Front)
- glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Front)
- glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Front)
- glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Front)
- glColor3f(1.0f,1.0f,0.0f); // Set The Color To Yellow
- glVertex3f( 1.0f,-1.0f,-1.0f); // Top Right Of The Quad (Back)
- glVertex3f(-1.0f,-1.0f,-1.0f); // Top Left Of The Quad (Back)
- glVertex3f(-1.0f, 1.0f,-1.0f); // Bottom Left Of The Quad (Back)
- glVertex3f( 1.0f, 1.0f,-1.0f); // Bottom Right Of The Quad (Back)
- glColor3f(0.0f,0.0f,1.0f); // Set The Color To Blue
- glVertex3f(-1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Left)
- glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Left)
- glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Left)
- glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Left)
- glColor3f(1.0f,0.0f,1.0f); // Set The Color To Violet
- glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Right)
- glVertex3f( 1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Right)
- glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Right)
- glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Right)
- glEnd(); // Done Drawing The Quad
-
- rtri+=0.2f; // Increase The Rotation Variable For The Triangle ( NEW )
- rquad-=0.15f; // Decrease The Rotation Variable For The Quad ( NEW )
-
-#endif
-}
-
-void RasterizerIPhone::set_viewport(const VS::ViewportRect &p_viewport) {
-
- viewport = p_viewport;
- canvas_transform = Transform();
- canvas_transform.translate(-(viewport.width / 2.0f), -(viewport.height / 2.0f), 0.0f);
- canvas_transform.scale(Vector3(2.0f / viewport.width, -2.0f / viewport.height, 1.0f));
-
- glViewport(viewport.x, window_size.height - (viewport.height + viewport.y), viewport.width, viewport.height);
-}
-
-void RasterizerIPhone::begin_scene(RID p_fx, VS::ScenarioDebugMode p_debug) {
-
- opaque_render_list.clear();
- alpha_render_list.clear();
- light_instance_count = 0;
- scene_fx = p_fx.is_valid() ? fx_owner.get(p_fx) : NULL;
-};
-
-void RasterizerIPhone::begin_shadow_map(RID p_light_instance, int p_shadow_pass) {
-}
-
-void RasterizerIPhone::set_camera(const Transform &p_world, const CameraMatrix &p_projection) {
-
- camera_transform = p_world;
- camera_transform_inverse = camera_transform.inverse();
- camera_projection = p_projection;
- camera_plane = Plane(camera_transform.origin, camera_transform.basis.get_axis(2));
- camera_z_near = camera_projection.get_z_near();
- camera_z_far = camera_projection.get_z_far();
- camera_projection.get_viewport_size(camera_vp_size.x, camera_vp_size.y);
-}
-
-void RasterizerIPhone::add_light(RID p_light_instance) {
-
-#define LIGHT_FADE_TRESHOLD 0.05
-
- ERR_FAIL_COND(light_instance_count >= MAX_LIGHTS);
-
- LightInstance *li = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!li);
-
- /* make light hash */
-
- // actually, not really a hash, but helps to sort the lights
- // and avoid recompiling redudant shader versions
-
- li->hash_aux = li->base->type;
-
- if (li->base->shadow_enabled)
- li->hash_aux |= (1 << 3);
-
- if (li->base->projector.is_valid())
- li->hash_aux |= (1 << 4);
-
- if (li->base->shadow_enabled && li->base->volumetric_enabled)
- li->hash_aux |= (1 << 5);
-
- switch (li->base->type) {
-
- case VisualServer::LIGHT_DIRECTIONAL: {
-
- Vector3 dir = li->transform.basis.get_axis(2);
- li->light_vector.x = dir.x;
- li->light_vector.y = dir.y;
- li->light_vector.z = dir.z;
-
- } break;
- case VisualServer::LIGHT_OMNI: {
-
- float radius = li->base->vars[VisualServer::LIGHT_PARAM_RADIUS];
- if (radius == 0)
- radius = 0.0001;
- li->linear_att = (1 / LIGHT_FADE_TRESHOLD) / radius;
- li->light_vector.x = li->transform.origin.x;
- li->light_vector.y = li->transform.origin.y;
- li->light_vector.z = li->transform.origin.z;
-
- } break;
- case VisualServer::LIGHT_SPOT: {
-
- float radius = li->base->vars[VisualServer::LIGHT_PARAM_RADIUS];
- if (radius == 0)
- radius = 0.0001;
- li->linear_att = (1 / LIGHT_FADE_TRESHOLD) / radius;
- li->light_vector.x = li->transform.origin.x;
- li->light_vector.y = li->transform.origin.y;
- li->light_vector.z = li->transform.origin.z;
- Vector3 dir = -li->transform.basis.get_axis(2);
- li->spot_vector.x = dir.x;
- li->spot_vector.y = dir.y;
- li->spot_vector.z = dir.z;
-
- } break;
- }
-
- light_instances[light_instance_count++] = li;
-}
-
-void RasterizerIPhone::_add_geometry(const Geometry *p_geometry, const Transform &p_world, uint32_t p_vertex_format, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides, const Skeleton *p_skeleton, GeometryOwner *p_owner) {
-
- Material *m = NULL;
-
- if (p_geometry->material.is_valid())
- m = material_owner.get(p_geometry->material);
-
- if (!m) {
- m = material_owner.get(default_material);
- }
-
- ERR_FAIL_COND(!m);
-
- LightInstance *lights[RenderList::MAX_LIGHTS];
- int light_count = 0;
-
- RenderList *render_list = &opaque_render_list;
- if (p_geometry->has_alpha || m->detail_blend_mode != VS::MATERIAL_BLEND_MODE_MIX) {
- render_list = &alpha_render_list;
- };
-
- if (!m->flags[VS::MATERIAL_FLAG_UNSHADED]) {
-
- light_count = p_light_count;
- for (int i = 0; i < light_count; i++) {
- lights[i] = light_instance_owner.get(p_light_instances[i]);
- }
- }
-
- render_list->add_element(p_geometry, m, p_world, lights, light_count, p_material_overrides, p_skeleton, camera_plane.distance(p_world.origin), p_owner);
-}
-
-void RasterizerIPhone::add_mesh(RID p_mesh, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides, RID p_skeleton) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
-
- int ssize = mesh->surfaces.size();
-
- for (int i = 0; i < ssize; i++) {
-
- Surface *s = mesh->surfaces[i];
- Skeleton *sk = p_skeleton.is_valid() ? skeleton_owner.get(p_skeleton) : NULL;
-
- _add_geometry(s, *p_world, s->format, p_light_instances, p_light_count, p_material_overrides, sk, NULL);
- }
-
- mesh->last_pass = frame;
-}
-
-void RasterizerIPhone::add_multimesh(RID p_multimesh, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides) {
-}
-
-void RasterizerIPhone::add_poly(RID p_poly, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides) {
-
- Poly *p = poly_owner.get(p_poly);
- if (!p->primitives.empty()) {
- const Poly::Primitive *pp = &p->primitives[0];
-
- uint32_t format = VisualServer::ARRAY_FORMAT_VERTEX;
-
- if (!pp->normals.empty())
- format |= VisualServer::ARRAY_FORMAT_NORMAL;
- if (!pp->colors.empty())
- format |= VisualServer::ARRAY_FORMAT_COLOR;
- if (!pp->uvs.empty())
- format |= VisualServer::ARRAY_TEX_UV;
-
- _add_geometry(p, *p_world, format, p_light_instances, p_light_count, p_material_overrides, NULL, NULL);
- }
-}
-
-void RasterizerIPhone::add_beam(RID p_beam, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides) {
-}
-
-void RasterizerIPhone::add_particles(RID p_particle_instance, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides) {
-}
-
-void RasterizerIPhone::_setup_material(const Geometry *p_geometry, const Material *p_material) {
-
- if (p_material->flags[VS::MATERIAL_FLAG_DOUBLE_SIDED])
- glDisable(GL_CULL_FACE);
- else {
- glEnable(GL_CULL_FACE);
- glCullFace((p_material->flags[VS::MATERIAL_FLAG_INVERT_FACES]) ? GL_FRONT : GL_BACK);
- }
-
- glEnable(GL_COLOR_MATERIAL); /* unused, unless color array */
- //glColorMaterial( GL_FRONT_AND_BACK, GL_DIFFUSE );
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
- ///ambient @TODO offer global ambient group option
- float ambient_rgba[4] = {
- 1,
- 1,
- 1,
- 1.0
- };
- glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, ambient_rgba);
-
- ///diffuse
- const Color &diffuse_color = p_material->parameters[VS::FIXED_MATERIAL_PARAM_DIFFUSE];
- float diffuse_rgba[4] = {
- (float)diffuse_color.r,
- (float)diffuse_color.g,
- (float)diffuse_color.b,
- (float)diffuse_color.a
- };
-
- glColor4f(diffuse_rgba[0], diffuse_rgba[1], diffuse_rgba[2], diffuse_rgba[3]);
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse_rgba);
-
- //specular
-
- const Color &specular_color = p_material->parameters[VS::FIXED_MATERIAL_PARAM_SPECULAR];
- float specular_rgba[4] = {
- (float)specular_color.r,
- (float)specular_color.g,
- (float)specular_color.b,
- 1.0
- };
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular_rgba);
-
- const Color &emission_color = p_material->parameters[VS::FIXED_MATERIAL_PARAM_EMISSION];
- float emission_rgba[4] = {
- (float)emission_color.r,
- (float)emission_color.g,
- (float)emission_color.b,
- 1.0
- };
-
- glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emission_rgba);
-
- glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, p_material->parameters[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP]);
-
- if (p_material->flags[VS::MATERIAL_FLAG_UNSHADED]) {
- glDisable(GL_LIGHTING);
- } else {
- glEnable(GL_LIGHTING);
- glDisable(GL_LIGHTING);
- }
-
- //depth test?
- /*
- if (p_material->flags[VS::MATERIAL_FLAG_WIREFRAME])
- glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
- else
- glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
- */
- if (p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE]) {
-
- Texture *texture = texture_owner.get(p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE]);
- ERR_FAIL_COND(!texture);
- glActiveTexture(GL_TEXTURE0);
- glEnable(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D, texture->tex_id);
- };
-};
-
-void RasterizerIPhone::_setup_light(LightInstance *p_instance, int p_idx) {
-
- Light *ld = p_instance->base;
-
- int glid = GL_LIGHT0 + p_idx;
- glLightfv(glid, GL_AMBIENT, ld->colors[VS::LIGHT_COLOR_AMBIENT].components);
- glLightfv(glid, GL_DIFFUSE, ld->colors[VS::LIGHT_COLOR_DIFFUSE].components);
- glLightfv(glid, GL_SPECULAR, ld->colors[VS::LIGHT_COLOR_SPECULAR].components);
-
- switch (ld->type) {
-
- case VS::LIGHT_DIRECTIONAL: {
- /* This doesn't have attenuation */
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- Vector3 v(0.0, 0.0, -1.0); // directional lights point up by default
- v = p_instance->transform.get_basis().xform(v);
- v = camera_transform_inverse.get_basis().xform(v);
- v.normalize(); // this sucks, so it will be optimized at some point
- v = -v;
- float lightpos[4] = { v.x, v.y, v.z, 0.0 };
-
- glLightfv(glid, GL_POSITION, lightpos); //at modelview
-
- glPopMatrix();
-
- } break;
- case VS::LIGHT_OMNI: {
-
- glLightf(glid, GL_SPOT_CUTOFF, 180.0);
- glLightf(glid, GL_CONSTANT_ATTENUATION, ld->vars[VS::LIGHT_PARAM_ATTENUATION]);
- glLightf(glid, GL_LINEAR_ATTENUATION, ld->vars[VS::LIGHT_PARAM_RADIUS]);
- glLightf(glid, GL_QUADRATIC_ATTENUATION, ld->vars[VS::LIGHT_PARAM_ENERGY]); // wut?
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
- Vector3 pos = p_instance->transform.get_origin();
- pos = camera_transform_inverse.xform(pos);
- float lightpos[4] = { pos.x, pos.y, pos.z, 1.0 };
- glLightfv(glid, GL_POSITION, lightpos); //at modelview
-
- glPopMatrix();
-
- } break;
- case VS::LIGHT_SPOT: {
-
- glLightf(glid, GL_SPOT_CUTOFF, ld->vars[VS::LIGHT_PARAM_SPOT_ANGLE]);
- glLightf(glid, GL_SPOT_EXPONENT, ld->vars[VS::LIGHT_PARAM_SPOT_ATTENUATION]);
- glLightf(glid, GL_CONSTANT_ATTENUATION, ld->vars[VS::LIGHT_PARAM_ATTENUATION]);
- glLightf(glid, GL_LINEAR_ATTENUATION, ld->vars[VS::LIGHT_PARAM_RADIUS]);
- glLightf(glid, GL_QUADRATIC_ATTENUATION, ld->vars[VS::LIGHT_PARAM_ENERGY]); // wut?
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
-
- Vector3 v(0.0, 0.0, -1.0); // directional lights point up by default
- v = p_instance->transform.get_basis().xform(v);
- v = camera_transform_inverse.get_basis().xform(v);
- v.normalize(); // this sucks, so it will be optimized at some point
- float lightdir[4] = { v.x, v.y, v.z, 1.0 };
- glLightfv(glid, GL_SPOT_DIRECTION, lightdir); //at modelview
-
- v = p_instance->transform.get_origin();
- v = camera_transform_inverse.xform(v);
- float lightpos[4] = { v.x, v.y, v.z, 1.0 };
- glLightfv(glid, GL_POSITION, lightpos); //at modelview
-
- glPopMatrix();
-
- } break;
- default: break;
- }
-};
-
-void RasterizerIPhone::_setup_lights(LightInstance **p_lights, int p_light_count) {
-
- for (int i = 0; i < MAX_LIGHTS; i++) {
-
- if (i < p_light_count) {
- glEnable(GL_LIGHT0 + i);
- _setup_light(p_lights[i], i);
- } else {
- glDisable(GL_LIGHT0 + i);
- }
- }
-}
-
-static const int gl_client_states[] = {
-
- GL_VERTEX_ARRAY,
- GL_NORMAL_ARRAY,
- -1, // ARRAY_TANGENT
- GL_COLOR_ARRAY,
- GL_TEXTURE_COORD_ARRAY, // ARRAY_TEX_UV
- GL_TEXTURE_COORD_ARRAY, // ARRAY_TEX_UV2
- -1, // ARRAY_BONES
- -1, // ARRAY_WEIGHTS
- -1, // ARRAY_INDEX
-};
-
-void RasterizerIPhone::_setup_geometry(const Geometry *p_geometry, const Material *p_material) {
-
- switch (p_geometry->type) {
-
- case Geometry::GEOMETRY_SURFACE: {
-
- Surface *surf = (Surface *)p_geometry;
- uint8_t *base = 0;
- bool use_VBO = (surf->array_local == 0);
-
- if (!use_VBO) {
-
- base = surf->array_local;
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-
- } else {
-
- glBindBuffer(GL_ARRAY_BUFFER, surf->vertex_id);
- };
-
- const Surface::ArrayData *a = surf->array;
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
-
- const Surface::ArrayData &ad = surf->array[i];
- if (ad.size == 0) {
- if (gl_client_states[i] != -1) {
- glDisableClientState(gl_client_states[i]);
- };
- continue; // this one is disabled.
- }
- ERR_CONTINUE(!ad.configured);
-
- if (gl_client_states[i] != -1) {
- glEnableClientState(gl_client_states[i]);
- };
-
- switch (i) {
-
- case VS::ARRAY_VERTEX:
- if (!use_VBO)
- glVertexPointer(3, GL_FLOAT, surf->stride, (GLvoid *)&base[a->ofs]);
- else if (surf->array[VS::ARRAY_BONES].size)
- glVertexPointer(3, GL_FLOAT, 0, skinned_buffer);
- else
- glVertexPointer(3, GL_FLOAT, surf->stride, (GLvoid *)a->ofs);
- break;
-
- case VS::ARRAY_NORMAL:
- if (use_VBO)
- glNormalPointer(GL_FLOAT, surf->stride, (GLvoid *)a->ofs);
- else
- glNormalPointer(GL_FLOAT, surf->stride, (GLvoid *)&base[a->ofs]);
- break;
- case VS::ARRAY_TANGENT:
- break;
- case VS::ARRAY_COLOR:
- if (use_VBO)
- glColorPointer(4, GL_UNSIGNED_BYTE, surf->stride, (GLvoid *)a->ofs);
- else
- glColorPointer(4, GL_UNSIGNED_BYTE, surf->stride, (GLvoid *)&base[a->ofs]);
- break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2:
- if (use_VBO)
- glTexCoordPointer(2, GL_FLOAT, surf->stride, (GLvoid *)a->ofs);
- else
- glTexCoordPointer(2, GL_FLOAT, surf->stride, &base[a->ofs]);
- break;
- case VS::ARRAY_BONES:
- case VS::ARRAY_WEIGHTS:
- case VS::ARRAY_INDEX:
- break;
- };
- }
-
- // process skeleton here
-
- } break;
-
- default: break;
- };
-};
-
-static const GLenum gl_primitive[] = {
- GL_POINTS,
- GL_LINES,
- GL_LINE_STRIP,
- GL_LINE_LOOP,
- GL_TRIANGLES,
- GL_TRIANGLE_STRIP,
- GL_TRIANGLE_FAN
-};
-
-void RasterizerIPhone::_render(const Geometry *p_geometry, const Material *p_material, const Skeleton *p_skeleton) {
-
- switch (p_geometry->type) {
-
- case Geometry::GEOMETRY_SURFACE: {
-
- Surface *s = (Surface *)p_geometry;
-
- if (s->index_array_len > 0) {
-
- if (s->index_array_local) {
-
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->index_array_len > (1 << 8)) ? GL_UNSIGNED_SHORT : GL_UNSIGNED_BYTE, s->index_array_local);
-
- } else {
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->index_array_len > (1 << 8)) ? GL_UNSIGNED_SHORT : GL_UNSIGNED_BYTE, 0);
- }
-
- } else {
-
- glDrawArrays(gl_primitive[s->primitive], 0, s->array_len);
- };
- } break;
-
- default: break;
- };
-};
-
-void RasterizerIPhone::_render_list_forward(RenderList *p_render_list) {
-
- const Material *prev_material = NULL;
- uint64_t prev_light_hash = 0;
- const Skeleton *prev_skeleton = NULL;
- const Geometry *prev_geometry = NULL;
- const ParamOverrideMap *prev_overrides = NULL; // make it different than NULL
-
- Geometry::Type prev_geometry_type = Geometry::GEOMETRY_INVALID;
-
- glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(&camera_projection.matrix[0][0]);
-
- for (int i = 0; i < p_render_list->element_count; i++) {
-
- RenderList::Element *e = p_render_list->elements[i];
- const Material *material = e->material;
- uint64_t light_hash = e->light_hash;
- const Skeleton *skeleton = e->skeleton;
- const Geometry *geometry = e->geometry;
- const ParamOverrideMap *material_overrides = e->material_overrides;
-
- if (material != prev_material || geometry->type != prev_geometry_type) {
- _setup_material(e->geometry, material);
- //_setup_material_overrides(e->material,NULL,material_overrides);
- //_setup_material_skeleton(material,skeleton);
- } else {
-
- if (material_overrides != prev_overrides) {
-
- //_setup_material_overrides(e->material,prev_overrides,material_overrides);
- }
-
- if (prev_skeleton != skeleton) {
- //_setup_material_skeleton(material,skeleton);
- };
- }
-
- if (geometry != prev_geometry || geometry->type != prev_geometry_type) {
-
- _setup_geometry(geometry, material);
- };
-
- if (i == 0 || light_hash != prev_light_hash)
- _setup_lights(e->lights, e->light_count);
-
- glMatrixMode(GL_MODELVIEW);
- _gl_load_transform(camera_transform_inverse);
- _gl_mult_transform(e->transform);
-
- _render(geometry, material, skeleton);
-
- prev_material = material;
- prev_skeleton = skeleton;
- prev_geometry = geometry;
- prev_light_hash = e->light_hash;
- prev_geometry_type = geometry->type;
- prev_overrides = material_overrides;
- }
-};
-
-void RasterizerIPhone::end_scene() {
-
- glEnable(GL_BLEND);
- glDepthMask(GL_FALSE);
-
- opaque_render_list.sort_mat_light();
- _render_list_forward(&opaque_render_list);
-
- glDisable(GL_BLEND);
- glDepthMask(GL_TRUE);
-
- alpha_render_list.sort_z();
- _render_list_forward(&alpha_render_list);
-}
-void RasterizerIPhone::end_shadow_map() {
-}
-
-void RasterizerIPhone::end_frame() {
-
- //ContextGL::get_singleton()->swap_buffers();
-}
-
-/* CANVAS API */
-
-void RasterizerIPhone::canvas_begin() {
-
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glLineWidth(1.0);
- glDisable(GL_LIGHTING);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-}
-void RasterizerIPhone::canvas_set_transparency(float p_transparency) {
-}
-
-void RasterizerIPhone::canvas_set_rect(const Rect2 &p_rect, bool p_clip) {
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glScalef(2.0 / window_size.x, -2.0 / window_size.y, 0);
- glTranslatef((-(window_size.x / 2.0)) + p_rect.pos.x, (-(window_size.y / 2.0)) + p_rect.pos.y, 0);
-
- if (p_clip) {
-
- glEnable(GL_SCISSOR_TEST);
- glScissor(viewport.x + p_rect.pos.x, viewport.y + (viewport.height - (p_rect.pos.y + p_rect.size.height)),
- p_rect.size.width, p_rect.size.height);
- } else {
-
- glDisable(GL_SCISSOR_TEST);
- }
-}
-void RasterizerIPhone::canvas_draw_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width) {
-
- glColor4f(1, 1, 1, 1);
-
- float verts[6] = {
- p_from.x, p_from.y, 0,
- p_to.x, p_to.y, 0
- };
-
- float colors[] = {
- p_color.r, p_color.g, p_color.b, p_color.a,
- p_color.r, p_color.g, p_color.b, p_color.a,
- };
- glLineWidth(p_width);
- _draw_primitive(2, verts, 0, colors, 0);
-}
-
-static void _draw_textured_quad(const Rect2 &p_rect, const Rect2 &p_src_region, const Size2 &p_tex_size) {
-
- float texcoords[] = {
- p_src_region.pos.x / p_tex_size.width,
- p_src_region.pos.y / p_tex_size.height,
-
- (p_src_region.pos.x + p_src_region.size.width) / p_tex_size.width,
- p_src_region.pos.y / p_tex_size.height,
-
- (p_src_region.pos.x + p_src_region.size.width) / p_tex_size.width,
- (p_src_region.pos.y + p_src_region.size.height) / p_tex_size.height,
-
- p_src_region.pos.x / p_tex_size.width,
- (p_src_region.pos.y + p_src_region.size.height) / p_tex_size.height,
- };
-
- float coords[] = {
- p_rect.pos.x, p_rect.pos.y, 0,
- p_rect.pos.x + p_rect.size.width, p_rect.pos.y, 0,
- p_rect.pos.x + p_rect.size.width, p_rect.pos.y + p_rect.size.height, 0,
- p_rect.pos.x, p_rect.pos.y + p_rect.size.height, 0
- };
-
- _draw_primitive(4, coords, 0, 0, texcoords);
-}
-
-static void _draw_quad(const Rect2 &p_rect) {
-
- float coords[] = {
- p_rect.pos.x, p_rect.pos.y, 0,
- p_rect.pos.x + p_rect.size.width, p_rect.pos.y, 0,
- p_rect.pos.x + p_rect.size.width, p_rect.pos.y + p_rect.size.height, 0,
- p_rect.pos.x, p_rect.pos.y + p_rect.size.height, 0
- };
-
- _draw_primitive(4, coords, 0, 0, 0);
-}
-
-void RasterizerIPhone::canvas_draw_rect(const Rect2 &p_rect, bool p_region, const Rect2 &p_source, bool p_tile, RID p_texture, const Color &p_modulate) {
-
- glColor4f(p_modulate.r, p_modulate.g, p_modulate.b, p_modulate.a);
-
- if (p_texture.is_valid()) {
-
- glEnable(GL_TEXTURE_2D);
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, texture->tex_id);
-
- if (!p_region) {
-
- Rect2 region = Rect2(0, 0, texture->width, texture->height);
- _draw_textured_quad(p_rect, region, region.size);
-
- } else {
-
- _draw_textured_quad(p_rect, p_source, Size2(texture->width, texture->height));
- }
- } else {
-
- _draw_quad(p_rect);
- }
-}
-void RasterizerIPhone::canvas_draw_style_box(const Rect2 &p_rect, const Rect2 &p_src_region, RID p_texture, const float *p_margin, bool p_draw_center) {
-
- glColor4f(1, 1, 1, 1);
-
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
-
- glEnable(GL_TEXTURE_2D);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, texture->tex_id);
-
- Rect2 region = p_src_region;
- if (region.size.width <= 0)
- region.size.width = texture->width;
- if (region.size.height <= 0)
- region.size.height = texture->height;
- /* CORNERS */
- _draw_textured_quad( // top left
- Rect2(p_rect.pos, Size2(p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP])),
- Rect2(region.pos, Size2(p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // top right
- Rect2(Point2(p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y), Size2(p_margin[MARGIN_RIGHT], p_margin[MARGIN_TOP])),
- Rect2(Point2(region.pos.x + region.size.width - p_margin[MARGIN_RIGHT], region.pos.y), Size2(p_margin[MARGIN_RIGHT], p_margin[MARGIN_TOP])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // bottom left
- Rect2(Point2(p_rect.pos.x, p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT], p_margin[MARGIN_BOTTOM])),
- Rect2(Point2(region.pos.x, region.pos.y + region.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT], p_margin[MARGIN_BOTTOM])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // bottom right
- Rect2(Point2(p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT], p_margin[MARGIN_BOTTOM])),
- Rect2(Point2(region.pos.x + region.size.width - p_margin[MARGIN_RIGHT], region.pos.y + region.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT], p_margin[MARGIN_BOTTOM])),
- Size2(texture->width, texture->height));
-
- Rect2 rect_center(p_rect.pos + Point2(p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2(p_rect.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], p_rect.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM]));
-
- Rect2 src_center(Point2(region.pos.x + p_margin[MARGIN_LEFT], region.pos.y + p_margin[MARGIN_TOP]), Size2(region.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], region.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM]));
-
- _draw_textured_quad( // top
- Rect2(Point2(rect_center.pos.x, p_rect.pos.y), Size2(rect_center.size.width, p_margin[MARGIN_TOP])),
- Rect2(Point2(src_center.pos.x, region.pos.y), Size2(src_center.size.width, p_margin[MARGIN_TOP])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // bottom
- Rect2(Point2(rect_center.pos.x, rect_center.pos.y + rect_center.size.height), Size2(rect_center.size.width, p_margin[MARGIN_BOTTOM])),
- Rect2(Point2(src_center.pos.x, src_center.pos.y + src_center.size.height), Size2(src_center.size.width, p_margin[MARGIN_BOTTOM])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // left
- Rect2(Point2(p_rect.pos.x, rect_center.pos.y), Size2(p_margin[MARGIN_LEFT], rect_center.size.height)),
- Rect2(Point2(region.pos.x, region.pos.y + p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_LEFT], src_center.size.height)),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // right
- Rect2(Point2(rect_center.pos.x + rect_center.size.width, rect_center.pos.y), Size2(p_margin[MARGIN_RIGHT], rect_center.size.height)),
- Rect2(Point2(src_center.pos.x + src_center.size.width, region.pos.y + p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_RIGHT], src_center.size.height)),
- Size2(texture->width, texture->height));
-
- if (p_draw_center) {
-
- _draw_textured_quad(
- rect_center,
- src_center,
- Size2(texture->width, texture->height));
- }
-}
-void RasterizerIPhone::canvas_draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture) {
-
- ERR_FAIL_COND(p_points.size() < 1);
- float verts[12];
- float uvs[8];
- float colors[16];
-
- glColor4f(1, 1, 1, 1);
-
- int idx = 0;
- for (int i = 0; i < p_points.size(); i++) {
-
- verts[idx++] = p_points[i].x;
- verts[idx++] = p_points[i].y;
- verts[idx++] = 0;
- }
-
- idx = 0;
- for (int i = 0; i < p_uvs.size(); i++) {
-
- uvs[idx++] = p_uvs[i].x;
- uvs[idx++] = p_uvs[i].y;
- }
-
- idx = 0;
- for (int i = 0; i < p_colors.size(); i++) {
-
- colors[idx++] = p_colors[i].r;
- colors[idx++] = p_colors[i].g;
- colors[idx++] = p_colors[i].b;
- colors[idx++] = p_colors[i].a;
- };
-
- if (p_texture.is_valid()) {
- glEnable(GL_TEXTURE_2D);
- Texture *texture = texture_owner.get(p_texture);
- if (texture) {
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, texture->tex_id);
- }
- }
-
- _draw_primitive(p_points.size(), &verts[0], NULL, p_colors.size() ? &colors[0] : NULL, p_uvs.size() ? uvs : NULL);
-}
-
-/* FX */
-
-RID RasterizerIPhone::fx_create() {
-
- return RID();
-}
-void RasterizerIPhone::fx_get_effects(RID p_fx, List<String> *p_effects) const {
-}
-void RasterizerIPhone::fx_set_active(RID p_fx, const String &p_effect, bool p_active) {
-}
-bool RasterizerIPhone::fx_is_active(RID p_fx, const String &p_effect) const {
-
- return false;
-}
-void RasterizerIPhone::fx_get_effect_params(RID p_fx, const String &p_effect, List<PropertyInfo> *p_params) const {
-}
-Variant RasterizerIPhone::fx_get_effect_param(RID p_fx, const String &p_effect, const String &p_param) const {
-
- return Variant();
-}
-void RasterizerIPhone::fx_set_effect_param(RID p_fx, const String &p_effect, const String &p_param, const Variant &p_pvalue) {
-}
-
-/*MISC*/
-
-bool RasterizerIPhone::is_texture(const RID &p_rid) const {
-
- return texture_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_material(const RID &p_rid) const {
-
- return material_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_mesh(const RID &p_rid) const {
-
- return mesh_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_multimesh(const RID &p_rid) const {
-
- return false;
-}
-bool RasterizerIPhone::is_poly(const RID &p_rid) const {
-
- return poly_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_particles(const RID &p_beam) const {
-
- return false;
-}
-
-bool RasterizerIPhone::is_beam(const RID &p_beam) const {
-
- return false;
-}
-
-bool RasterizerIPhone::is_light(const RID &p_rid) const {
-
- return light_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_light_instance(const RID &p_rid) const {
-
- return light_instance_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_particles_instance(const RID &p_rid) const {
-
- return false;
-}
-bool RasterizerIPhone::is_skeleton(const RID &p_rid) const {
-
- return skeleton_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_fx(const RID &p_rid) const {
-
- return fx_owner.owns(p_rid);
-}
-bool RasterizerIPhone::is_shader(const RID &p_rid) const {
-
- return false;
-}
-
-void RasterizerIPhone::free(const RID &p_rid) const {
-
- if (texture_owner.owns(p_rid)) {
-
- // delete the texture
- Texture *texture = texture_owner.get(p_rid);
-
- glDeleteTextures(1, &texture->tex_id);
-
- texture_owner.free(p_rid);
- memdelete(texture);
-
- } else if (material_owner.owns(p_rid)) {
-
- Material *material = material_owner.get(p_rid);
- ERR_FAIL_COND(!material);
-
- material_owner.free(p_rid);
- memdelete(material);
-
- } else if (mesh_owner.owns(p_rid)) {
-
- Mesh *mesh = mesh_owner.get(p_rid);
- ERR_FAIL_COND(!mesh);
- for (int i = 0; i < mesh->surfaces.size(); i++) {
-
- Surface *surface = mesh->surfaces[i];
- if (surface->array_local != 0) {
- memfree(surface->array_local);
- };
- if (surface->index_array_local != 0) {
- memfree(surface->index_array_local);
- };
-
- if (surface->vertex_id)
- glDeleteBuffers(1, &surface->vertex_id);
- if (surface->index_id)
- glDeleteBuffers(1, &surface->index_id);
-
- memdelete(surface);
- };
-
- mesh->surfaces.clear();
-
- mesh_owner.free(p_rid);
- memdelete(mesh);
-
- } else if (skeleton_owner.owns(p_rid)) {
-
- Skeleton *skeleton = skeleton_owner.get(p_rid);
- ERR_FAIL_COND(!skeleton)
-
- skeleton_owner.free(p_rid);
- memdelete(skeleton);
-
- } else if (light_owner.owns(p_rid)) {
-
- Light *light = light_owner.get(p_rid);
- ERR_FAIL_COND(!light)
-
- light_owner.free(p_rid);
- memdelete(light);
-
- } else if (light_instance_owner.owns(p_rid)) {
-
- LightInstance *light_instance = light_instance_owner.get(p_rid);
- ERR_FAIL_COND(!light_instance);
-
- light_instance_owner.free(p_rid);
- memdelete(light_instance);
-
- } else if (fx_owner.owns(p_rid)) {
-
- FX *fx = fx_owner.get(p_rid);
- ERR_FAIL_COND(!fx);
-
- fx_owner.free(p_rid);
- memdelete(fx);
- };
-}
-
-void RasterizerIPhone::init() {
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glFrontFace(GL_CW);
-
- glEnable(GL_TEXTURE_2D);
-}
-
-void RasterizerIPhone::finish() {
-}
-
-int RasterizerIPhone::get_render_info(VS::RenderInfo p_info) {
-
- return false;
-}
-
-RasterizerIPhone::RasterizerIPhone() {
-
- frame = 0;
-};
-
-RasterizerIPhone::~RasterizerIPhone(){
-
-};
-
-#endif
diff --git a/platform/iphone/rasterizer_iphone.h b/platform/iphone/rasterizer_iphone.h
deleted file mode 100644
index f886738da9..0000000000
--- a/platform/iphone/rasterizer_iphone.h
+++ /dev/null
@@ -1,881 +0,0 @@
-/*************************************************************************/
-/* rasterizer_iphone.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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. */
-/*************************************************************************/
-#ifdef IPHONE_ENABLED
-
-#ifndef RASTERIZER_IPHONE_H
-#define RASTERIZER_IPHONE_H
-
-#include "servers/visual/rasterizer.h"
-
-#include "camera_matrix.h"
-#include "image.h"
-#include "list.h"
-#include "map.h"
-#include "rid.h"
-#include "servers/visual_server.h"
-#include "sort.h"
-#include <ES1/gl.h>
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class RasterizerIPhone : public Rasterizer {
-
- enum {
- SKINNED_BUFFER_SIZE = 1024 * 128, // 10k vertices
- MAX_LIGHTS = 8,
- };
-
- uint8_t skinned_buffer[SKINNED_BUFFER_SIZE];
-
- struct Texture {
-
- uint32_t flags;
- int width, height;
- Image::Format format;
-
- GLenum target;
- GLenum gl_format_cache;
- int gl_components_cache;
- bool has_alpha;
- bool format_has_alpha;
-
- bool active;
- GLuint tex_id;
- bool mipmap_dirty;
-
- Texture() {
-
- flags = width = height = 0;
- tex_id = 0;
- format = Image::FORMAT_L8;
- gl_components_cache = 0;
- format_has_alpha = false;
- has_alpha = false;
- active = false;
- mipmap_dirty = true;
- }
-
- ~Texture() {
-
- if (tex_id != 0) {
-
- glDeleteTextures(1, &tex_id);
- }
- }
- };
-
- mutable RID_Owner<Texture> texture_owner;
-
- struct Material {
-
- bool flags[VS::MATERIAL_FLAG_MAX];
- Variant parameters[VisualServer::FIXED_MATERIAL_PARAM_MAX];
- RID textures[VisualServer::FIXED_MATERIAL_PARAM_MAX];
-
- Transform uv_transform;
- VS::SpatialMaterialTexCoordMode texcoord_mode[VisualServer::FIXED_MATERIAL_PARAM_MAX];
-
- VS::MaterialBlendMode detail_blend_mode;
-
- VS::SpatialMaterialTexGenMode texgen_mode;
-
- Material() {
-
- flags[VS::MATERIAL_FLAG_VISIBLE] = true;
- flags[VS::MATERIAL_FLAG_DOUBLE_SIDED] = false;
- flags[VS::MATERIAL_FLAG_INVERT_FACES] = false;
- flags[VS::MATERIAL_FLAG_UNSHADED] = false;
- flags[VS::MATERIAL_FLAG_WIREFRAME] = false;
-
- parameters[VS::FIXED_MATERIAL_PARAM_DIFFUSE] = Color(0.8, 0.8, 0.8);
- parameters[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP] = 12;
-
- for (int i = 0; i < VisualServer::FIXED_MATERIAL_PARAM_MAX; i++) {
- texcoord_mode[i] = VS::FIXED_MATERIAL_TEXCOORD_UV;
- };
- detail_blend_mode = VS::MATERIAL_BLEND_MODE_MIX;
- texgen_mode = VS::FIXED_MATERIAL_TEXGEN_SPHERE;
- }
- };
- mutable RID_Owner<Material> material_owner;
-
- struct Geometry {
-
- enum Type {
- GEOMETRY_INVALID,
- GEOMETRY_SURFACE,
- GEOMETRY_POLY,
- GEOMETRY_PARTICLES,
- GEOMETRY_BEAM,
- GEOMETRY_DETAILER,
- };
-
- Type type;
- RID material;
- bool has_alpha;
- bool material_owned;
-
- Vector3 scale;
- Vector3 uv_scale;
-
- Geometry()
- : scale(1, 1, 1) {
- has_alpha = false;
- material_owned = false;
- }
- virtual ~Geometry(){};
- };
-
- struct GeometryOwner {
-
- virtual ~GeometryOwner() {}
- };
-
- struct Surface : public Geometry {
-
- struct ArrayData {
-
- uint32_t ofs, size;
- bool configured;
- int components;
- ArrayData() {
- ofs = 0;
- size = 0;
- configured = false;
- }
- };
-
- ArrayData array[VS::ARRAY_MAX];
- // support for vertex array objects
- GLuint array_object_id;
- // support for vertex buffer object
- GLuint vertex_id; // 0 means, unconfigured
- GLuint index_id; // 0 means, unconfigured
- // no support for the above, array in localmem.
- uint8_t *array_local;
- uint8_t *index_array_local;
-
- AABB aabb;
-
- int array_len;
- int index_array_len;
-
- VS::PrimitiveType primitive;
-
- uint32_t format;
-
- int stride;
-
- bool active;
-
- Point2 uv_min;
- Point2 uv_max;
-
- bool has_alpha_cache;
-
- Surface() {
-
- array_len = 0;
- type = GEOMETRY_SURFACE;
- primitive = VS::PRIMITIVE_POINTS;
- index_array_len = VS::NO_INDEX_ARRAY;
- format = 0;
- stride = 0;
-
- array_local = index_array_local = 0;
- vertex_id = index_id = 0;
-
- active = false;
- }
-
- ~Surface() {
- }
- };
-
- struct Mesh {
-
- bool active;
- Vector<Surface *> surfaces;
-
- mutable uint64_t last_pass;
- Mesh() {
- last_pass = 0;
- active = false;
- }
- };
- mutable RID_Owner<Mesh> mesh_owner;
-
- struct Poly : public Geometry {
-
- struct Primitive {
-
- Vector<Vector3> vertices;
- Vector<Vector3> normals;
- Vector<Vector3> uvs;
- Vector<Color> colors;
- };
-
- AABB aabb;
- List<Primitive> primitives;
- Poly() {
-
- type = GEOMETRY_POLY;
- }
- };
-
- mutable RID_Owner<Poly> poly_owner;
-
- struct Skeleton {
-
- Vector<Transform> bones;
- };
-
- mutable RID_Owner<Skeleton> skeleton_owner;
-
- struct Light {
-
- VS::LightType type;
- float vars[VS::LIGHT_PARAM_MAX];
- Color colors[3];
- bool shadow_enabled;
- RID projector;
- bool volumetric_enabled;
- Color volumetric_color;
-
- Light() {
-
- vars[VS::LIGHT_PARAM_SPOT_ATTENUATION] = 1;
- vars[VS::LIGHT_PARAM_SPOT_ANGLE] = 45;
- vars[VS::LIGHT_PARAM_ATTENUATION] = 1.0;
- vars[VS::LIGHT_PARAM_ENERGY] = 1.0;
- vars[VS::LIGHT_PARAM_RADIUS] = 1.0;
- colors[VS::LIGHT_COLOR_AMBIENT] = Color(0, 0, 0);
- colors[VS::LIGHT_COLOR_DIFFUSE] = Color(1, 1, 1);
- colors[VS::LIGHT_COLOR_SPECULAR] = Color(1, 1, 1);
- shadow_enabled = false;
- volumetric_enabled = false;
- }
- };
-
- struct ShadowBuffer;
-
- struct LightInstance {
-
- struct SplitInfo {
-
- CameraMatrix camera;
- Transform transform;
- float near;
- float far;
- };
-
- RID light;
- Light *base;
- uint64_t last_pass;
- Transform transform;
-
- CameraMatrix projection;
- Vector<SplitInfo> splits;
-
- Vector3 light_vector;
- Vector3 spot_vector;
- float linear_att;
-
- uint64_t hash_aux;
- };
- mutable RID_Owner<Light> light_owner;
- mutable RID_Owner<LightInstance> light_instance_owner;
-
- LightInstance *light_instances[MAX_LIGHTS];
- int light_instance_count;
-
- struct RenderList {
-
- enum {
- MAX_ELEMENTS = 4096,
- MAX_LIGHTS = 4
- };
-
- struct Element {
-
- float depth;
- const Skeleton *skeleton;
- Transform transform;
- LightInstance *lights[MAX_LIGHTS];
- int light_count;
- const Geometry *geometry;
- const Material *material;
- uint64_t light_hash;
- GeometryOwner *owner;
- const ParamOverrideMap *material_overrides;
- };
-
- Element _elements[MAX_ELEMENTS];
- Element *elements[MAX_ELEMENTS];
- int element_count;
-
- void clear() {
-
- element_count = 0;
- }
-
- struct SortZ {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- return A->depth > B->depth;
- }
- };
-
- void sort_z() {
-
- SortArray<Element *, SortZ> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortSkel {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- if (A->geometry < B->geometry)
- return true;
- else if (A->geometry > B->geometry)
- return false;
- else
- return (!A->skeleton && B->skeleton);
- }
- };
-
- void sort_skel() {
-
- SortArray<Element *, SortSkel> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortMat {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- if (A->geometry == B->geometry) {
-
- if (A->material == B->material) {
-
- return (A->material_overrides < B->material_overrides);
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return (A->geometry < B->geometry);
- }
- }
- };
-
- void sort_mat() {
-
- SortArray<Element *, SortMat> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortMatLight {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- if (A->geometry == B->geometry) {
-
- if (A->material == B->material) {
-
- if (A->light_hash == B->light_hash)
- return (A->material_overrides < B->material_overrides);
- else
- return A->light_hash < B->light_hash;
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return (A->geometry < B->geometry);
- }
- }
- };
-
- void sort_mat_light() {
-
- SortArray<Element *, SortMatLight> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct LISort {
-
- _FORCE_INLINE_ bool operator()(const LightInstance *A, const LightInstance *B) const {
-
- return (A->hash_aux < B->hash_aux);
- }
- };
-
- _FORCE_INLINE_ void add_element(const Geometry *p_geometry, const Material *p_material, const Transform &p_transform, LightInstance **p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides, const Skeleton *p_skeleton, float p_depth, GeometryOwner *p_owner = NULL) {
-
- ERR_FAIL_COND(element_count >= MAX_ELEMENTS);
- Element *e = elements[element_count++];
-
- e->geometry = p_geometry;
- e->material = p_material;
- e->transform = p_transform;
- e->skeleton = p_skeleton;
- e->light_hash = 0;
- e->light_count = p_light_count;
- e->owner = p_owner;
- e->material_overrides = p_material_overrides;
-
- if (e->light_count > 0) {
-
- SortArray<LightInstance *, LISort> light_sort;
- light_sort.sort(p_light_instances, p_light_count);
- //@TODO OPTIOMIZE
-
- for (int i = 0; i < p_light_count; i++) {
-
- e->lights[i] = p_light_instances[i];
-
- if (i == 0)
- e->light_hash = hash_djb2_one_64(make_uint64_t(e->lights[i]));
- else
- e->light_hash = hash_djb2_one_64(make_uint64_t(e->lights[i]), e->light_hash);
- }
- }
- }
-
- RenderList() {
-
- for (int i = 0; i < MAX_ELEMENTS; i++)
- elements[i] = &_elements[i]; // assign elements
- }
- };
-
- RenderList opaque_render_list;
- RenderList alpha_render_list;
-
- RID default_material;
-
- struct FX {
-
- bool bgcolor_active;
- Color bgcolor;
-
- bool skybox_active;
- RID skybox_cubemap;
-
- bool antialias_active;
- float antialias_tolerance;
-
- bool glow_active;
- int glow_passes;
- float glow_attenuation;
- float glow_bloom;
-
- bool ssao_active;
- float ssao_attenuation;
- float ssao_radius;
- float ssao_max_distance;
- float ssao_range_max;
- float ssao_range_min;
- bool ssao_only;
-
- bool fog_active;
- float fog_distance;
- float fog_attenuation;
- Color fog_color_near;
- Color fog_color_far;
- bool fog_bg;
-
- bool toon_active;
- float toon_treshold;
- float toon_soft;
-
- bool edge_active;
- Color edge_color;
- float edge_size;
-
- FX();
- };
- mutable RID_Owner<FX> fx_owner;
-
- FX *scene_fx;
- CameraMatrix camera_projection;
- Transform camera_transform;
- Transform camera_transform_inverse;
- float camera_z_near;
- float camera_z_far;
- Size2 camera_vp_size;
-
- Plane camera_plane;
-
- void _add_geometry(const Geometry *p_geometry, const Transform &p_world, uint32_t p_vertex_format, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides, const Skeleton *p_skeleton, GeometryOwner *p_owner);
- void _render_list_forward(RenderList *p_render_list);
-
- void _setup_light(LightInstance *p_instance, int p_idx);
- void _setup_lights(LightInstance **p_lights, int p_light_count);
- void _setup_material(const Geometry *p_geometry, const Material *p_material);
-
- void _setup_geometry(const Geometry *p_geometry, const Material *p_material);
- void _render(const Geometry *p_geometry, const Material *p_material, const Skeleton *p_skeleton);
-
- /*********/
- /* FRAME */
- /*********/
-
- Size2 window_size;
- VS::ViewportRect viewport;
- Transform canvas_transform;
- double last_time;
- double time_delta;
- uint64_t frame;
-
-public:
- /* TEXTURE API */
-
- virtual RID texture_create();
- virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT);
- virtual void texture_blit_rect(RID p_texture, int p_x, int p_y, const Image &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT);
- virtual Image texture_get_rect(RID p_texture, int p_x, int p_y, int p_width, int p_height, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const;
- virtual void texture_set_flags(RID p_texture, uint32_t p_flags);
- virtual uint32_t texture_get_flags(RID p_texture) const;
- virtual Image::Format texture_get_format(RID p_texture) const;
- virtual uint32_t texture_get_width(RID p_texture) const;
- virtual uint32_t texture_get_height(RID p_texture) const;
- virtual bool texture_has_alpha(RID p_texture) const;
-
- /* SHADER API */
-
- virtual RID shader_create();
-
- virtual void shader_node_add(RID p_shader, VS::ShaderNodeType p_type, int p_id);
- virtual void shader_node_remove(RID p_shader, int p_id);
- virtual void shader_node_change_type(RID p_shader, int p_id, VS::ShaderNodeType p_type);
- virtual void shader_node_set_param(RID p_shader, int p_id, const Variant &p_value);
-
- virtual void shader_get_node_list(RID p_shader, List<int> *p_node_list) const;
- virtual VS::ShaderNodeType shader_node_get_type(RID p_shader, int p_id) const;
- virtual Variant shader_node_get_param(RID p_shader, int p_id) const;
-
- virtual void shader_connect(RID p_shader, int p_src_id, int p_src_slot, int p_dst_id, int p_dst_slot);
- virtual bool shader_is_connected(RID p_shader, int p_src_id, int p_src_slot, int p_dst_id, int p_dst_slot) const;
- virtual void shader_disconnect(RID p_shader, int p_src_id, int p_src_slot, int p_dst_id, int p_dst_slot);
-
- virtual void shader_get_connections(RID p_shader, List<VS::ShaderConnection> *p_connections) const;
-
- virtual void shader_clear(RID p_shader);
-
- /* COMMON MATERIAL API */
-
- virtual void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value);
- virtual Variant material_get_param(RID p_material, const StringName &p_param) const;
- virtual void material_get_param_list(RID p_material, List<String> *p_param_list) const;
-
- virtual void material_set_flag(RID p_material, VS::MaterialFlag p_flag, bool p_enabled);
- virtual bool material_get_flag(RID p_material, VS::MaterialFlag p_flag) const;
-
- virtual void material_set_blend_mode(RID p_material, VS::MaterialBlendMode p_mode);
- virtual VS::MaterialBlendMode material_get_blend_mode(RID p_material) const;
-
- virtual void material_set_line_width(RID p_material, float p_line_width);
- virtual float material_get_line_width(RID p_material) const;
-
- /* FIXED MATERIAL */
-
- virtual RID material_create();
-
- virtual void fixed_material_set_parameter(RID p_material, VS::SpatialMaterialParam p_parameter, const Variant &p_value);
- virtual Variant fixed_material_get_parameter(RID p_material, VS::SpatialMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_texture(RID p_material, VS::SpatialMaterialParam p_parameter, RID p_texture);
- virtual RID fixed_material_get_texture(RID p_material, VS::SpatialMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_detail_blend_mode(RID p_material, VS::MaterialBlendMode p_mode);
- virtual VS::MaterialBlendMode fixed_material_get_detail_blend_mode(RID p_material) const;
-
- virtual void fixed_material_set_texgen_mode(RID p_material, VS::SpatialMaterialTexGenMode p_mode);
- virtual VS::SpatialMaterialTexGenMode fixed_material_get_texgen_mode(RID p_material) const;
-
- virtual void fixed_material_set_texcoord_mode(RID p_material, VS::SpatialMaterialParam p_parameter, VS::SpatialMaterialTexCoordMode p_mode);
- virtual VS::SpatialMaterialTexCoordMode fixed_material_get_texcoord_mode(RID p_material, VS::SpatialMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_uv_transform(RID p_material, const Transform &p_transform);
- virtual Transform fixed_material_get_uv_transform(RID p_material) const;
-
- /* SHADER MATERIAL */
-
- virtual RID shader_material_create() const;
-
- virtual void shader_material_set_vertex_shader(RID p_material, RID p_shader, bool p_owned = false);
- virtual RID shader_material_get_vertex_shader(RID p_material) const;
-
- virtual void shader_material_set_fragment_shader(RID p_material, RID p_shader, bool p_owned = false);
- virtual RID shader_material_get_fragment_shader(RID p_material) const;
-
- /* MESH API */
-
- virtual RID mesh_create();
-
- virtual void mesh_add_surface(RID p_mesh, VS::PrimitiveType p_primitive, uint32_t p_format, int p_array_len, int p_index_array_len = VS::NO_INDEX_ARRAY);
-
- virtual Error mesh_surface_set_array(RID p_mesh, int p_surface, VS::ArrayType p_type, const Variant &p_array);
- virtual Variant mesh_surface_get_array(RID p_mesh, int p_surface, VS::ArrayType p_type) const;
-
- virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material, bool p_owned = false);
- virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const;
-
- virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const;
- virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const;
- virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const;
- virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
-
- virtual void mesh_erase_surface(RID p_mesh, int p_index);
- virtual int mesh_get_surface_count(RID p_mesh) const;
-
- virtual AABB mesh_get_aabb(RID p_mesh) const;
-
- /* MULTIMESH API */
-
- virtual RID multimesh_create();
-
- virtual void multimesh_set_instance_count(RID p_multimesh, int p_count);
- virtual int multimesh_get_instance_count(RID p_multimesh) const;
-
- virtual void multimesh_set_mesh(RID p_multimesh, RID p_mesh);
- virtual void multimesh_set_aabb(RID p_multimesh, const AABB &p_aabb);
- virtual void multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform);
- virtual void multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color);
-
- virtual RID multimesh_get_mesh(RID p_multimesh) const;
- virtual AABB multimesh_get_aabb(RID p_multimesh) const;
-
- virtual Transform multimesh_instance_get_transform(RID p_multimesh, int p_index) const;
- virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const;
-
- /* POLY API */
-
- virtual RID poly_create();
- virtual void poly_set_material(RID p_poly, RID p_material, bool p_owned = false);
- virtual void poly_add_primitive(RID p_poly, const Vector<Vector3> &p_points, const Vector<Vector3> &p_normals, const Vector<Color> &p_colors, const Vector<Vector3> &p_uvs);
- virtual void poly_clear(RID p_poly);
-
- virtual AABB poly_get_aabb(RID p_poly) const;
-
- /* PARTICLES API */
-
- virtual RID particles_create();
-
- virtual void particles_set_amount(RID p_particles, int p_amount);
- virtual int particles_get_amount(RID p_particles) const;
-
- virtual void particles_set_emitting(RID p_particles, bool p_emitting);
- virtual bool particles_is_emitting(RID p_particles) const;
-
- virtual void particles_set_visibility_aabb(RID p_particles, const AABB &p_visibility);
- virtual AABB particles_get_visibility_aabb(RID p_particles) const;
-
- virtual void particles_set_emission_half_extents(RID p_particles, const Vector3 &p_half_extents);
- virtual Vector3 particles_get_emission_half_extents(RID p_particles) const;
-
- virtual void particles_set_gravity_normal(RID p_particles, const Vector3 &p_normal);
- virtual Vector3 particles_get_gravity_normal(RID p_particles) const;
-
- virtual void particles_set_variable(RID p_particles, VS::ParticleVariable p_variable, float p_value);
- virtual float particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const;
-
- virtual void particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable, float p_randomness);
- virtual float particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const;
-
- virtual void particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos);
- virtual float particles_get_color_phase_pos(RID p_particles, int p_phase) const;
-
- virtual void particles_set_color_phases(RID p_particles, int p_phases);
- virtual int particles_get_color_phases(RID p_particles) const;
-
- virtual void particles_set_color_phase_color(RID p_particles, int p_phase, const Color &p_color);
- virtual Color particles_get_color_phase_color(RID p_particles, int p_phase) const;
-
- virtual void particles_set_attractors(RID p_particles, int p_attractors);
- virtual int particles_get_attractors(RID p_particles) const;
-
- virtual void particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3 &p_pos);
- virtual Vector3 particles_get_attractor_pos(RID p_particles, int p_attractor) const;
-
- virtual void particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force);
- virtual float particles_get_attractor_strength(RID p_particles, int p_attractor) const;
-
- virtual void particles_set_material(RID p_particles, RID p_material, bool p_owned = false);
- virtual RID particles_get_material(RID p_particles) const;
-
- virtual AABB particles_get_aabb(RID p_particles) const;
- /* BEAM API */
-
- virtual RID beam_create();
-
- virtual void beam_set_point_count(RID p_beam, int p_count);
- virtual int beam_get_point_count(RID p_beam) const;
- virtual void beam_clear(RID p_beam);
-
- virtual void beam_set_point(RID p_beam, int p_point, Vector3 &p_pos);
- virtual Vector3 beam_get_point(RID p_beam, int p_point) const;
-
- virtual void beam_set_primitive(RID p_beam, VS::BeamPrimitive p_primitive);
- virtual VS::BeamPrimitive beam_get_primitive(RID p_beam) const;
-
- virtual void beam_set_material(RID p_beam, RID p_material);
- virtual RID beam_get_material(RID p_beam) const;
-
- virtual AABB beam_get_aabb(RID p_particles) const;
- /* SKELETON API */
-
- virtual RID skeleton_create();
- virtual void skeleton_resize(RID p_skeleton, int p_bones);
- virtual int skeleton_get_bone_count(RID p_skeleton) const;
- virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform);
- virtual Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone);
-
- /* LIGHT API */
-
- virtual RID light_create(VS::LightType p_type);
- virtual VS::LightType light_get_type(RID p_light) const;
-
- virtual void light_set_color(RID p_light, VS::LightColor p_type, const Color &p_color);
- virtual Color light_get_color(RID p_light, VS::LightColor p_type) const;
-
- virtual void light_set_shadow(RID p_light, bool p_enabled);
- virtual bool light_has_shadow(RID p_light) const;
-
- virtual void light_set_volumetric(RID p_light, bool p_enabled);
- virtual bool light_is_volumetric(RID p_light) const;
-
- virtual void light_set_projector(RID p_light, RID p_texture);
- virtual RID light_get_projector(RID p_light) const;
-
- virtual void light_set_var(RID p_light, VS::LightParam p_var, float p_value);
- virtual float light_get_var(RID p_light, VS::LightParam p_var) const;
-
- virtual AABB light_get_aabb(RID p_poly) const;
-
- virtual RID light_instance_create(RID p_light);
- virtual void light_instance_set_transform(RID p_light_instance, const Transform &p_transform);
-
- virtual void light_instance_set_active_hint(RID p_light_instance);
- virtual bool light_instance_has_shadow(RID p_light_instance) const;
- virtual bool light_instance_assign_shadow(RID p_light_instance);
- virtual ShadowType light_instance_get_shadow_type(RID p_light_instance) const;
- virtual int light_instance_get_shadow_passes(RID p_light_instance) const;
- virtual void light_instance_set_pssm_split_info(RID p_light_instance, int p_split, float p_near, float p_far, const CameraMatrix &p_camera, const Transform &p_transform);
-
- /* PARTICLES INSTANCE */
-
- virtual RID particles_instance_create(RID p_particles);
- virtual void particles_instance_set_transform(RID p_particles_instance, const Transform &p_transform);
-
- /* RENDER API */
- /* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
- virtual void begin_frame();
-
- virtual void set_viewport(const VS::ViewportRect &p_viewport);
-
- virtual void begin_scene(RID p_fx = RID(), VS::ScenarioDebugMode p_debug = VS::SCENARIO_DEBUG_DISABLED);
- virtual void begin_shadow_map(RID p_light_instance, int p_shadow_pass);
-
- virtual void set_camera(const Transform &p_world, const CameraMatrix &p_projection);
-
- virtual void add_light(RID p_light_instance); ///< all "add_light" calls happen before add_geometry calls
-
- typedef Map<StringName, Variant> ParamOverrideMap;
-
- virtual void add_mesh(RID p_mesh, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides = NULL, RID p_skeleton = RID());
- virtual void add_multimesh(RID p_multimesh, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides = NULL);
- virtual void add_poly(RID p_poly, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides = NULL);
- virtual void add_beam(RID p_beam, const Transform *p_world, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides = NULL);
- virtual void add_particles(RID p_particle_instance, const RID *p_light_instances, int p_light_count, const ParamOverrideMap *p_material_overrides = NULL);
-
- virtual void end_scene();
- virtual void end_shadow_map();
-
- virtual void end_frame();
-
- /* CANVAS API */
-
- virtual void canvas_begin();
- virtual void canvas_set_transparency(float p_transparency);
- virtual void canvas_set_rect(const Rect2 &p_rect, bool p_clip);
- virtual void canvas_draw_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width);
- virtual void canvas_draw_rect(const Rect2 &p_rect, bool p_region, const Rect2 &p_source, bool p_tile, RID p_texture, const Color &p_modulate);
- virtual void canvas_draw_style_box(const Rect2 &p_rect, RID p_texture, const float *p_margins, bool p_draw_center = true);
- virtual void canvas_draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture);
-
- /* FX */
-
- virtual RID fx_create();
- virtual void fx_get_effects(RID p_fx, List<String> *p_effects) const;
- virtual void fx_set_active(RID p_fx, const String &p_effect, bool p_active);
- virtual bool fx_is_active(RID p_fx, const String &p_effect) const;
- virtual void fx_get_effect_params(RID p_fx, const String &p_effect, List<PropertyInfo> *p_params) const;
- virtual Variant fx_get_effect_param(RID p_fx, const String &p_effect, const String &p_param) const;
- virtual void fx_set_effect_param(RID p_fx, const String &p_effect, const String &p_param, const Variant &p_pvalue);
-
- /*MISC*/
-
- virtual bool is_texture(const RID &p_rid) const;
- virtual bool is_material(const RID &p_rid) const;
- virtual bool is_mesh(const RID &p_rid) const;
- virtual bool is_multimesh(const RID &p_rid) const;
- virtual bool is_poly(const RID &p_rid) const;
- virtual bool is_particles(const RID &p_beam) const;
- virtual bool is_beam(const RID &p_beam) const;
-
- virtual bool is_light(const RID &p_rid) const;
- virtual bool is_light_instance(const RID &p_rid) const;
- virtual bool is_particles_instance(const RID &p_rid) const;
- virtual bool is_skeleton(const RID &p_rid) const;
- virtual bool is_fx(const RID &p_rid) const;
- virtual bool is_shader(const RID &p_rid) const;
-
- virtual void free(const RID &p_rid) const;
-
- virtual void init();
- virtual void finish();
-
- virtual int get_render_info(VS::RenderInfo p_info);
-
- RasterizerIPhone();
- virtual ~RasterizerIPhone();
-};
-
-#endif
-#endif
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 1a3c5f3e8f..ea388072c5 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -316,7 +316,7 @@ Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_prese
EditorExportPlatformJavaScript::EditorExportPlatformJavaScript() {
- Image img(_javascript_logo);
+ Ref<Image> img = memnew(Image(_javascript_logo));
logo.instance();
logo->create_from_image(img);
}
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index dda619a54d..ae00fb429e 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -151,26 +151,26 @@ static EM_BOOL _mousebutton_callback(int event_type, const EmscriptenMouseEvent
ERR_FAIL_COND_V(event_type != EMSCRIPTEN_EVENT_MOUSEDOWN && event_type != EMSCRIPTEN_EVENT_MOUSEUP, false);
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.pressed = event_type == EMSCRIPTEN_EVENT_MOUSEDOWN;
- ev.mouse_button.global_x = ev.mouse_button.x = mouse_event->canvasX;
- ev.mouse_button.global_y = ev.mouse_button.y = mouse_event->canvasY;
+ Ref<InputEvent> ev;
+ ev.type = Ref<InputEvent>::MOUSE_BUTTON;
+ ev->is_pressed() = event_type == EMSCRIPTEN_EVENT_MOUSEDOWN;
+ ev.mouse_button.global_x = ev->get_pos().x = mouse_event->canvasX;
+ ev.mouse_button.global_y = ev->get_pos().y = mouse_event->canvasY;
ev.mouse_button.mod = dom2godot_mod(mouse_event);
switch (mouse_event->button) {
- case DOM_BUTTON_LEFT: ev.mouse_button.button_index = BUTTON_LEFT; break;
- case DOM_BUTTON_MIDDLE: ev.mouse_button.button_index = BUTTON_MIDDLE; break;
- case DOM_BUTTON_RIGHT: ev.mouse_button.button_index = BUTTON_RIGHT; break;
+ case DOM_BUTTON_LEFT: ev->get_button_index() = BUTTON_LEFT; break;
+ case DOM_BUTTON_MIDDLE: ev->get_button_index() = BUTTON_MIDDLE; break;
+ case DOM_BUTTON_RIGHT: ev->get_button_index() = BUTTON_RIGHT; break;
default: return false;
}
- ev.mouse_button.button_mask = _input->get_mouse_button_mask();
- if (ev.mouse_button.pressed)
- ev.mouse_button.button_mask |= 1 << ev.mouse_button.button_index;
+ ev->get_button_mask() = _input->get_mouse_button_mask();
+ if (ev->is_pressed())
+ ev->get_button_mask() |= 1 << ev->get_button_index();
else
- ev.mouse_button.button_mask &= ~(1 << ev.mouse_button.button_index);
- ev.mouse_button.button_mask >>= 1;
+ ev->get_button_mask() &= ~(1 << ev->get_button_index());
+ ev->get_button_mask() >>= 1;
_input->parse_input_event(ev);
return true;
@@ -180,16 +180,16 @@ static EM_BOOL _mousemove_callback(int event_type, const EmscriptenMouseEvent *m
ERR_FAIL_COND_V(event_type != EMSCRIPTEN_EVENT_MOUSEMOVE, false);
- InputEvent ev;
- ev.type = InputEvent::MOUSE_MOTION;
+ Ref<InputEvent> ev;
+ ev.type = Ref<InputEvent>::MOUSE_MOTION;
ev.mouse_motion.mod = dom2godot_mod(mouse_event);
- ev.mouse_motion.button_mask = _input->get_mouse_button_mask() >> 1;
+ ev->get_button_mask() = _input->get_mouse_button_mask() >> 1;
ev.mouse_motion.global_x = ev.mouse_motion.x = mouse_event->canvasX;
ev.mouse_motion.global_y = ev.mouse_motion.y = mouse_event->canvasY;
- ev.mouse_motion.relative_x = _input->get_mouse_position().x - ev.mouse_motion.x;
- ev.mouse_motion.relative_y = _input->get_mouse_position().y - ev.mouse_motion.y;
+ ev->get_relative().x = _input->get_mouse_position().x - ev.mouse_motion.x;
+ ev->get_relative().y = _input->get_mouse_position().y - ev.mouse_motion.y;
_input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
ev.mouse_motion.speed_x = _input->get_last_mouse_speed().x;
@@ -203,31 +203,31 @@ static EM_BOOL _wheel_callback(int event_type, const EmscriptenWheelEvent *wheel
ERR_FAIL_COND_V(event_type != EMSCRIPTEN_EVENT_WHEEL, false);
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_mask = _input->get_mouse_button_mask() >> 1;
- ev.mouse_button.global_x = ev.mouse_button.x = _input->get_mouse_position().x;
- ev.mouse_button.global_y = ev.mouse_button.y = _input->get_mouse_position().y;
- ev.mouse_button.mod.shift = _input->is_key_pressed(KEY_SHIFT);
- ev.mouse_button.mod.alt = _input->is_key_pressed(KEY_ALT);
- ev.mouse_button.mod.control = _input->is_key_pressed(KEY_CONTROL);
- ev.mouse_button.mod.meta = _input->is_key_pressed(KEY_META);
+ Ref<InputEvent> ev;
+ ev.type = Ref<InputEvent>::MOUSE_BUTTON;
+ ev->get_button_mask() = _input->get_mouse_button_mask() >> 1;
+ ev.mouse_button.global_x = ev->get_pos().x = _input->get_mouse_position().x;
+ ev.mouse_button.global_y = ev->get_pos().y = _input->get_mouse_position().y;
+ ev.mouse_button->get_shift() = _input->is_key_pressed(KEY_SHIFT);
+ ev.mouse_button->get_alt() = _input->is_key_pressed(KEY_ALT);
+ ev.mouse_button->get_control() = _input->is_key_pressed(KEY_CONTROL);
+ ev.mouse_button->get_metakey() = _input->is_key_pressed(KEY_META);
if (wheel_event->deltaY < 0)
- ev.mouse_button.button_index = BUTTON_WHEEL_UP;
+ ev->get_button_index() = BUTTON_WHEEL_UP;
else if (wheel_event->deltaY > 0)
- ev.mouse_button.button_index = BUTTON_WHEEL_DOWN;
+ ev->get_button_index() = BUTTON_WHEEL_DOWN;
else if (wheel_event->deltaX > 0)
- ev.mouse_button.button_index = BUTTON_WHEEL_LEFT;
+ ev->get_button_index() = BUTTON_WHEEL_LEFT;
else if (wheel_event->deltaX < 0)
- ev.mouse_button.button_index = BUTTON_WHEEL_RIGHT;
+ ev->get_button_index() = BUTTON_WHEEL_RIGHT;
else
return false;
- ev.mouse_button.pressed = true;
+ ev->is_pressed() = true;
_input->parse_input_event(ev);
- ev.mouse_button.pressed = false;
+ ev->is_pressed() = false;
_input->parse_input_event(ev);
return true;
@@ -243,8 +243,8 @@ static EM_BOOL _touchpress_callback(int event_type, const EmscriptenTouchEvent *
event_type != EMSCRIPTEN_EVENT_TOUCHCANCEL,
false);
- InputEvent ev;
- ev.type = InputEvent::SCREEN_TOUCH;
+ Ref<InputEvent> ev;
+ ev.type = Ref<InputEvent>::SCREEN_TOUCH;
int lowest_id_index = -1;
for (int i = 0; i < touch_event->numTouches; ++i) {
@@ -256,20 +256,20 @@ static EM_BOOL _touchpress_callback(int event_type, const EmscriptenTouchEvent *
ev.screen_touch.index = touch.identifier;
_prev_touches[i].x = ev.screen_touch.x = touch.canvasX;
_prev_touches[i].y = ev.screen_touch.y = touch.canvasY;
- ev.screen_touch.pressed = event_type == EMSCRIPTEN_EVENT_TOUCHSTART;
+ ev.screen_touch->is_pressed() = event_type == EMSCRIPTEN_EVENT_TOUCHSTART;
_input->parse_input_event(ev);
}
if (touch_event->touches[lowest_id_index].isChanged) {
- ev.type = InputEvent::MOUSE_BUTTON;
+ ev.type = Ref<InputEvent>::MOUSE_BUTTON;
ev.mouse_button.mod = dom2godot_mod(touch_event);
- ev.mouse_button.button_mask = _input->get_mouse_button_mask() >> 1;
- ev.mouse_button.global_x = ev.mouse_button.x = touch_event->touches[lowest_id_index].canvasX;
- ev.mouse_button.global_y = ev.mouse_button.y = touch_event->touches[lowest_id_index].canvasY;
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.pressed = event_type == EMSCRIPTEN_EVENT_TOUCHSTART;
+ ev->get_button_mask() = _input->get_mouse_button_mask() >> 1;
+ ev.mouse_button.global_x = ev->get_pos().x = touch_event->touches[lowest_id_index].canvasX;
+ ev.mouse_button.global_y = ev->get_pos().y = touch_event->touches[lowest_id_index].canvasY;
+ ev->get_button_index() = BUTTON_LEFT;
+ ev->is_pressed() = event_type == EMSCRIPTEN_EVENT_TOUCHSTART;
_input->parse_input_event(ev);
}
@@ -280,8 +280,8 @@ static EM_BOOL _touchmove_callback(int event_type, const EmscriptenTouchEvent *t
ERR_FAIL_COND_V(event_type != EMSCRIPTEN_EVENT_TOUCHMOVE, false);
- InputEvent ev;
- ev.type = InputEvent::SCREEN_DRAG;
+ Ref<InputEvent> ev;
+ ev.type = Ref<InputEvent>::SCREEN_DRAG;
int lowest_id_index = -1;
for (int i = 0; i < touch_event->numTouches; ++i) {
@@ -304,13 +304,13 @@ static EM_BOOL _touchmove_callback(int event_type, const EmscriptenTouchEvent *t
if (touch_event->touches[lowest_id_index].isChanged) {
- ev.type = InputEvent::MOUSE_MOTION;
+ ev.type = Ref<InputEvent>::MOUSE_MOTION;
ev.mouse_motion.mod = dom2godot_mod(touch_event);
- ev.mouse_motion.button_mask = _input->get_mouse_button_mask() >> 1;
+ ev->get_button_mask() = _input->get_mouse_button_mask() >> 1;
ev.mouse_motion.global_x = ev.mouse_motion.x = touch_event->touches[lowest_id_index].canvasX;
ev.mouse_motion.global_y = ev.mouse_motion.y = touch_event->touches[lowest_id_index].canvasY;
- ev.mouse_motion.relative_x = _input->get_mouse_position().x - ev.mouse_motion.x;
- ev.mouse_motion.relative_y = _input->get_mouse_position().y - ev.mouse_motion.y;
+ ev->get_relative().x = _input->get_mouse_position().x - ev.mouse_motion.x;
+ ev->get_relative().y = _input->get_mouse_position().y - ev.mouse_motion.y;
_input->set_mouse_position(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
ev.mouse_motion.speed_x = _input->get_last_mouse_speed().x;
@@ -321,13 +321,13 @@ static EM_BOOL _touchmove_callback(int event_type, const EmscriptenTouchEvent *t
return true;
}
-static InputEvent _setup_key_event(const EmscriptenKeyboardEvent *emscripten_event) {
+static Ref<InputEvent> _setup_key_event(const EmscriptenKeyboardEvent *emscripten_event) {
- InputEvent ev;
- ev.type = InputEvent::KEY;
- ev.key.echo = emscripten_event->repeat;
+ Ref<InputEvent> ev;
+ ev.type = Ref<InputEvent>::KEY;
+ ev->is_echo() = emscripten_event->repeat;
ev.key.mod = dom2godot_mod(emscripten_event);
- ev.key.scancode = dom2godot_scancode(emscripten_event->keyCode);
+ ev->get_scancode() = dom2godot_scancode(emscripten_event->keyCode);
String unicode = String::utf8(emscripten_event->key);
// check if empty or multi-character (e.g. `CapsLock`)
@@ -342,15 +342,15 @@ static InputEvent _setup_key_event(const EmscriptenKeyboardEvent *emscripten_eve
return ev;
}
-static InputEvent deferred_key_event;
+static Ref<InputEvent> deferred_key_event;
static EM_BOOL _keydown_callback(int event_type, const EmscriptenKeyboardEvent *key_event, void *user_data) {
ERR_FAIL_COND_V(event_type != EMSCRIPTEN_EVENT_KEYDOWN, false);
- InputEvent ev = _setup_key_event(key_event);
- ev.key.pressed = true;
- if (ev.key.unicode == 0 && keycode_has_unicode(ev.key.scancode)) {
+ Ref<InputEvent> ev = _setup_key_event(key_event);
+ ev->is_pressed() = true;
+ if (ev.key.unicode == 0 && keycode_has_unicode(ev->get_scancode())) {
// defer to keypress event for legacy unicode retrieval
deferred_key_event = ev;
return false; // do not suppress keypress event
@@ -372,10 +372,10 @@ static EM_BOOL _keyup_callback(int event_type, const EmscriptenKeyboardEvent *ke
ERR_FAIL_COND_V(event_type != EMSCRIPTEN_EVENT_KEYUP, false);
- InputEvent ev = _setup_key_event(key_event);
- ev.key.pressed = false;
+ Ref<InputEvent> ev = _setup_key_event(key_event);
+ ev->is_pressed() = false;
_input->parse_input_event(ev);
- return ev.key.scancode != KEY_UNKNOWN && ev.key.scancode != 0;
+ return ev->get_scancode() != KEY_UNKNOWN && ev->get_scancode() != 0;
}
static EM_BOOL joy_callback_func(int p_type, const EmscriptenGamepadEvent *p_event, void *p_user) {
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index 2bc603d8d9..65269148ec 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -154,7 +154,7 @@ public:
virtual String get_resource_dir() const;
void process_accelerometer(const Vector3 &p_accelerometer);
- void push_input(const InputEvent &p_ev);
+ void push_input(const Ref<InputEvent> &p_ev);
virtual bool is_joy_known(int p_device);
virtual String get_joy_guid(int p_device) const;
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index 1427c2e00d..27117c2e8d 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -7,7 +7,6 @@ files = [
'godot_main_osx.mm',
'audio_driver_osx.cpp',
'sem_osx.cpp',
- # 'context_gl_osx.cpp',
'dir_access_osx.mm',
'joypad_osx.cpp',
'power_osx.cpp',
diff --git a/platform/osx/context_gl_osx.cpp b/platform/osx/context_gl_osx.cpp
deleted file mode 100644
index 1377d829b0..0000000000
--- a/platform/osx/context_gl_osx.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*************************************************************************/
-/* context_gl_osx.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 "context_gl_osx.h"
-
-#ifdef OSX_ENABLED
-#if defined(OPENGL_ENABLED) || defined(LEGACYGL_ENABLED)
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
-#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
-
-void ContextGL_OSX::release_current() {
-
- aglSetCurrentContext(context);
-}
-
-void ContextGL_OSX::make_current() {
-
- aglSetCurrentContext(NULL);
-}
-void ContextGL_OSX::swap_buffers() {
-
- aglSwapBuffers(context);
-}
-
-Error ContextGL_OSX::initialize() {
-
- if ((Ptr)kUnresolvedCFragSymbolAddress == (Ptr)aglChoosePixelFormat)
- return FAILED;
-
- GLint attributes[] = { AGL_RGBA,
- AGL_DOUBLEBUFFER,
- AGL_DEPTH_SIZE, 32,
- AGL_NO_RECOVERY,
- AGL_NONE,
- AGL_NONE };
-
- AGLPixelFormat format = NULL;
-
- format = aglChoosePixelFormat(NULL, 0, attributes);
-
- if (!format)
- return FAILED;
-
- context = aglCreateContext(format, 0);
-
- if (!context)
- return FAILED;
-
- aglDestroyPixelFormat(format);
-
- aglSetWindowRef(context, window);
-
- GLint swapInterval = 1;
- aglSetInteger(context, AGL_SWAP_INTERVAL, &swapInterval);
-
- aglSetCurrentContext(context);
-
- return OK;
-}
-
-ContextGL_OSX::ContextGL_OSX(WindowRef p_window) {
-
- window = p_window;
-}
-
-ContextGL_OSX::~ContextGL_OSX() {
-
- if (context)
- aglDestroyContext(context);
-}
-
-#endif
-#endif
diff --git a/platform/osx/godot_osx.h b/platform/osx/godot_osx.h
deleted file mode 100644
index 48784ab7d5..0000000000
--- a/platform/osx/godot_osx.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*************************************************************************/
-/* godot_osx.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 GODOT_OSX_H
-#define GODOT_OSX_H
-
-#import <Cocoa/Cocoa.h>
-
-@interface GodotMain : NSObject
-@end
-
-#endif
diff --git a/platform/osx/godot_osx.mm b/platform/osx/godot_osx.mm
deleted file mode 100644
index 626406ad1d..0000000000
--- a/platform/osx/godot_osx.mm
+++ /dev/null
@@ -1,208 +0,0 @@
-/*************************************************************************/
-/* godot_osx.mm */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 "godot_osx.h"
-
-#include <sys/param.h> /* for MAXPATHLEN */
-#include <unistd.h>
-
-/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
- but the method still is there and works. To avoid warnings, we declare
- it ourselves here. */
-@interface NSApplication ()
-- (void)setAppleMenu:(NSMenu *)menu;
-@end
-
-static int global_argc;
-static char **global_argv;
-static BOOL gCalledAppMainline = FALSE;
-
-static NSString *getApplicationName(void) {
- const NSDictionary *dict;
- NSString *appName = 0;
-
- /* Determine the application name */
- dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
- if (dict)
- appName = [dict objectForKey:@"CFBundleName"];
-
- if (![appName length])
- appName = [[NSProcessInfo processInfo] processName];
-
- return appName;
-}
-
-/* The main class of the application, the application's delegate */
-@implementation GodotMain
-
-static void setApplicationMenu(void) {
- /* warning: this code is very odd */
- NSMenu *appleMenu;
- NSMenuItem *menuItem;
- NSString *title;
- NSString *appName;
-
- appName = getApplicationName();
- appleMenu = [[NSMenu alloc] initWithTitle:@""];
-
- /* Add menu items */
- title = [@"About " stringByAppendingString:appName];
- [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
-
- [appleMenu addItem:[NSMenuItem separatorItem]];
-
- title = [@"Hide " stringByAppendingString:appName];
- [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
-
- menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
- [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask | NSCommandKeyMask)];
-
- [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
-
- [appleMenu addItem:[NSMenuItem separatorItem]];
-
- title = [@"Quit " stringByAppendingString:appName];
- [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
-
- /* Put menu into the menubar */
- menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
- [menuItem setSubmenu:appleMenu];
- [[NSApp mainMenu] addItem:menuItem];
-
- /* Tell the application object that this is now the application menu */
- [NSApp setAppleMenu:appleMenu];
-
- /* Finally give up our references to the objects */
- [appleMenu release];
- [menuItem release];
-}
-
-/* Create a window menu */
-static void setupWindowMenu(void) {
- NSMenu *windowMenu;
- NSMenuItem *windowMenuItem;
- NSMenuItem *menuItem;
-
- windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
-
- /* "Minimize" item */
- menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
- [windowMenu addItem:menuItem];
- [menuItem release];
-
- /* Put menu into the menubar */
- windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
- [windowMenuItem setSubmenu:windowMenu];
- [[NSApp mainMenu] addItem:windowMenuItem];
-
- /* Tell the application object that this is now the window menu */
- [NSApp setWindowsMenu:windowMenu];
-
- /* Finally give up our references to the objects */
- [windowMenu release];
- [windowMenuItem release];
-}
-
-/* Replacement for NSApplicationMain */
-static void CustomApplicationMain(int argc, char **argv) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- GodotMain *main;
-
- /* Ensure the application object is initialised */
- [NSApplication sharedApplication];
-
- /* Set up the menubar */
- [NSApp setMainMenu:[[NSMenu alloc] init]];
- setApplicationMenu();
- setupWindowMenu();
-
- main = [[main alloc] init];
- [NSApp setDelegate:main];
-
- /* Start the main event loop */
- [NSApp run];
-
- [main release];
- [pool release];
-}
-
-extern int godot_main(int argc, char **argv);
-
-/* Called when the internal event loop has just started running */
-- (void)applicationDidFinishLaunching:(NSNotification *)note {
- int status;
-
- /* Hand off to main application code */
- gCalledAppMainline = TRUE;
-
- int ret = godot_main(global_argc, global_argv);
-
- exit(ret);
-}
-@end
-
-#ifdef main
-#undef main
-#endif
-
-int main(int argc, char **argv) {
- /* Copy the arguments into a global variable */
- /* This is passed if we are launched by double-clicking */
- if (argc >= 2 && strncmp(argv[1], "-psn", 4) == 0) {
- global_argv = (char **)malloc(sizeof(char *) * 2);
- global_argv[0] = argv[0];
- global_argv[1] = NULL;
- global_argc = 1;
-
- // chdir to binary's dir when launched from finder
- int len = strlen(global_argv[0]);
-
- while (len--) {
- if (global_argv[0][len] == '/') break;
- }
-
- if (len >= 0) {
- char *path = (char *)malloc(len + 1);
- memcpy(path, global_argv[0], len);
- path[len] = 0;
- printf("Path: %s\n", path);
- chdir(path);
- }
-
- } else {
- int i;
- global_argc = argc;
- global_argv = (char **)malloc(sizeof(char *) * (argc + 1));
- for (i = 0; i <= argc; i++)
- global_argv[i] = argv[i];
- }
-
- CustomApplicationMain(argc, argv);
- return 0;
-}
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 2ecc379a7f..3a37d663ad 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -151,7 +151,7 @@ public:
virtual Size2 get_window_size() const;
- virtual void set_icon(const Image &p_icon);
+ virtual void set_icon(const Ref<Image> &p_icon);
virtual MainLoop *get_main_loop() const;
@@ -165,7 +165,7 @@ public:
virtual void swap_buffers();
Error shell_open(String p_uri);
- void push_input(const InputEvent &p_event);
+ void push_input(const Ref<InputEvent> &p_event);
String get_locale() const;
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 7a914a88fb..d13486b490 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -53,35 +53,6 @@
#include <sys/types.h>
#include <unistd.h>
-//uses portions of glfw
-
-//========================================================================
-// GLFW 3.0 - www.glfw.org
-//------------------------------------------------------------------------
-// Copyright (c) 2002-2006 Marcus Geelnard
-// Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would
-// be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such, and must not
-// be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source
-// distribution.
-//
-//========================================================================
-
static NSRect convertRectToBacking(NSRect contentRect) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
@@ -92,15 +63,12 @@ static NSRect convertRectToBacking(NSRect contentRect) {
return contentRect;
}
-static InputModifierState translateFlags(NSUInteger flags) {
- InputModifierState mod;
-
- mod.shift = (flags & NSShiftKeyMask);
- mod.control = (flags & NSControlKeyMask);
- mod.alt = (flags & NSAlternateKeyMask);
- mod.meta = (flags & NSCommandKeyMask);
+static void get_key_modifier_state(unsigned int p_osx_state, Ref<InputEventWithModifiers> state) {
- return mod;
+ state->set_shift((p_osx_state & NSShiftKeyMask));
+ state->set_control((p_osx_state & NSControlKeyMask));
+ state->set_alt((p_osx_state & NSAlternateKeyMask));
+ state->set_metakey((p_osx_state & NSCommandKeyMask));
}
static int mouse_x = 0;
@@ -249,14 +217,7 @@ static int button_mask = 0;
+ (void)initialize {
if (self == [GodotContentView class]) {
- /*
- if (_glfw.ns.cursor == nil) {
- NSImage* data = [[NSImage alloc] initWithSize:NSMakeSize(1, 1)];
- _glfw.ns.cursor = [[NSCursor alloc] initWithImage:data
- hotSpot:NSZeroPoint];
- [data release];
- }
-*/
+ // nothing left to do here at the moment..
}
}
@@ -322,27 +283,19 @@ static int button_mask = 0;
- (void)mouseDown:(NSEvent *)event {
- //print_line("mouse down:");
button_mask |= BUTTON_MASK_LEFT;
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.pressed = true;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- ev.mouse_button.doubleclick = [event clickCount] == 2;
- ev.mouse_button.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->push_input(ev);
- /*
- _glfwInputMouseClick(window,
- GLFW_MOUSE_BUTTON_LEFT,
- GLFW_PRESS,
- translateFlags([event modifierFlags]));
-*/
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ get_key_modifier_state([event modifierFlags], mb);
+ mb->set_button_index(BUTTON_LEFT);
+ mb->set_pressed(true);
+ mb->set_pos(Vector2(mouse_x, mouse_y));
+ mb->set_global_pos(Vector2(mouse_x, mouse_y));
+ mb->set_button_mask(button_mask);
+ mb->set_doubleclick([event clickCount] == 2);
+ OS_OSX::singleton->push_input(mb);
}
- (void)mouseDragged:(NSEvent *)event {
@@ -352,81 +305,58 @@ static int button_mask = 0;
- (void)mouseUp:(NSEvent *)event {
button_mask &= ~BUTTON_MASK_LEFT;
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_LEFT;
- ev.mouse_button.pressed = false;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- ev.mouse_button.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->push_input(ev);
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
- /*
- _glfwInputMouseClick(window,
- GLFW_MOUSE_BUTTON_LEFT,
- GLFW_RELEASE,
- translateFlags([event modifierFlags]));
-*/
+ get_key_modifier_state([event modifierFlags], mb);
+ mb->set_button_index(BUTTON_LEFT);
+ mb->set_pressed(false);
+ mb->set_pos(Vector2(mouse_x, mouse_y));
+ mb->set_global_pos(Vector2(mouse_x, mouse_y));
+ mb->set_button_mask(button_mask);
+ mb->set_doubleclick([event clickCount] == 2);
+ OS_OSX::singleton->push_input(mb);
}
- (void)mouseMoved:(NSEvent *)event {
- InputEvent ev;
- ev.type = InputEvent::MOUSE_MOTION;
- ev.mouse_motion.button_mask = button_mask;
+ Ref<InputEventMouseMotion> mm;
+ mm.instance();
+
+ mm->set_button_mask(button_mask);
prev_mouse_x = mouse_x;
prev_mouse_y = mouse_y;
const NSRect contentRect = [OS_OSX::singleton->window_view frame];
const NSPoint p = [event locationInWindow];
mouse_x = p.x * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
mouse_y = (contentRect.size.height - p.y) * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
- ev.mouse_motion.x = mouse_x;
- ev.mouse_motion.y = mouse_y;
- ev.mouse_motion.global_x = mouse_x;
- ev.mouse_motion.global_y = mouse_y;
- ev.mouse_motion.relative_x = [event deltaX] * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
- ev.mouse_motion.relative_y = [event deltaY] * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
- ev.mouse_motion.mod = translateFlags([event modifierFlags]);
+ mm->set_pos(Vector2(mouse_x, mouse_y));
+ mm->set_global_pos(Vector2(mouse_x, mouse_y));
+ Vector2 relativeMotion = Vector2();
+ relativeMotion.x = [event deltaX] * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
+ relativeMotion.y = [event deltaY] * OS_OSX::singleton->_mouse_scale([[event window] backingScaleFactor]);
+ mm->set_relative(relativeMotion);
+ get_key_modifier_state([event modifierFlags], mm);
OS_OSX::singleton->input->set_mouse_position(Point2(mouse_x, mouse_y));
- OS_OSX::singleton->push_input(ev);
-
- /*
- if (window->cursorMode == GLFW_CURSOR_DISABLED)
- _glfwInputCursorMotion(window, [event deltaX], [event deltaY]);
- else {
- const NSRect contentRect = [window->ns.view frame];
- const NSPoint p = [event locationInWindow];
-
- _glfwInputCursorMotion(window, p.x, contentRect.size.height - p.y);
- }
-*/
+ OS_OSX::singleton->push_input(mm);
}
- (void)rightMouseDown:(NSEvent *)event {
button_mask |= BUTTON_MASK_RIGHT;
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_RIGHT;
- ev.mouse_button.pressed = true;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- ev.mouse_button.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->push_input(ev);
- /*
- _glfwInputMouseClick(window,
- GLFW_MOUSE_BUTTON_RIGHT,
- GLFW_PRESS,
- translateFlags([event modifierFlags]));
-*/
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ get_key_modifier_state([event modifierFlags], mb);
+ mb->set_button_index(BUTTON_RIGHT);
+ mb->set_pressed(true);
+ mb->set_pos(Vector2(mouse_x, mouse_y));
+ mb->set_global_pos(Vector2(mouse_x, mouse_y));
+ mb->set_button_mask(button_mask);
+ mb->set_doubleclick([event clickCount] == 2);
+ OS_OSX::singleton->push_input(mb);
}
- (void)rightMouseDragged:(NSEvent *)event {
@@ -435,25 +365,19 @@ static int button_mask = 0;
- (void)rightMouseUp:(NSEvent *)event {
- button_mask &= ~BUTTON_MASK_RIGHT;
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_RIGHT;
- ev.mouse_button.pressed = false;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- ev.mouse_button.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->push_input(ev);
+ button_mask |= BUTTON_MASK_RIGHT;
- /*
- _glfwInputMouseClick(window,
- GLFW_MOUSE_BUTTON_RIGHT,
- GLFW_RELEASE,
- translateFlags([event modifierFlags]));
-*/
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ get_key_modifier_state([event modifierFlags], mb);
+ mb->set_button_index(BUTTON_RIGHT);
+ mb->set_pressed(false);
+ mb->set_pos(Vector2(mouse_x, mouse_y));
+ mb->set_global_pos(Vector2(mouse_x, mouse_y));
+ mb->set_button_mask(button_mask);
+ mb->set_doubleclick([event clickCount] == 2);
+ OS_OSX::singleton->push_input(mb);
}
- (void)otherMouseDown:(NSEvent *)event {
@@ -462,24 +386,18 @@ static int button_mask = 0;
return;
button_mask |= BUTTON_MASK_MIDDLE;
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_MIDDLE;
- ev.mouse_button.pressed = true;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- ev.mouse_button.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->push_input(ev);
- /*
- _glfwInputMouseClick(window,
- (int) [event buttonNumber],
- GLFW_PRESS,
- translateFlags([event modifierFlags]));
-*/
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ get_key_modifier_state([event modifierFlags], mb);
+ mb->set_button_index(BUTTON_MIDDLE);
+ mb->set_pressed(true);
+ mb->set_pos(Vector2(mouse_x, mouse_y));
+ mb->set_global_pos(Vector2(mouse_x, mouse_y));
+ mb->set_button_mask(button_mask);
+ mb->set_doubleclick([event clickCount] == 2);
+ OS_OSX::singleton->push_input(mb);
}
- (void)otherMouseDragged:(NSEvent *)event {
@@ -491,25 +409,19 @@ static int button_mask = 0;
if ((int)[event buttonNumber] != 2)
return;
- button_mask &= ~BUTTON_MASK_MIDDLE;
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = BUTTON_MIDDLE;
- ev.mouse_button.pressed = false;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- ev.mouse_button.mod = translateFlags([event modifierFlags]);
- OS_OSX::singleton->push_input(ev);
+ button_mask |= BUTTON_MASK_MIDDLE;
- /*
- _glfwInputMouseClick(window,
- (int) [event buttonNumber],
- GLFW_RELEASE,
- translateFlags([event modifierFlags]));
-*/
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ get_key_modifier_state([event modifierFlags], mb);
+ mb->set_button_index(BUTTON_MIDDLE);
+ mb->set_pressed(true);
+ mb->set_pos(Vector2(mouse_x, mouse_y));
+ mb->set_global_pos(Vector2(mouse_x, mouse_y));
+ mb->set_button_mask(button_mask);
+ mb->set_doubleclick([event clickCount] == 2);
+ OS_OSX::singleton->push_input(mb);
}
- (void)mouseExited:(NSEvent *)event {
@@ -520,11 +432,9 @@ static int button_mask = 0;
OS_OSX::singleton->main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT);
if (OS_OSX::singleton->input)
OS_OSX::singleton->input->set_mouse_in_window(false);
- //_glfwInputCursorEnter(window, GL_FALSE);
}
- (void)mouseEntered:(NSEvent *)event {
- //_glfwInputCursorEnter(window, GL_TRUE);
if (!OS_OSX::singleton)
return;
if (OS_OSX::singleton->main_loop && OS_OSX::singleton->mouse_mode != OS::MOUSE_MODE_CAPTURED)
@@ -534,12 +444,7 @@ static int button_mask = 0;
}
- (void)viewDidChangeBackingProperties {
- /*
- const NSRect contentRect = [window->ns.view frame];
- const NSRect fbRect = convertRectToBacking(window, contentRect);
-
- _glfwInputFramebufferSize(window, fbRect.size.width, fbRect.size.height);
-*/
+ // nothing left to do here
}
- (void)updateTrackingAreas {
@@ -706,102 +611,102 @@ static int translateKey(unsigned int key) {
}
- (void)keyDown:(NSEvent *)event {
- InputEvent ev;
- ev.type = InputEvent::KEY;
- ev.key.pressed = true;
- ev.key.mod = translateFlags([event modifierFlags]);
- ev.key.scancode = latin_keyboard_keycode_convert(translateKey([event keyCode]));
- ev.key.echo = [event isARepeat];
+
+ Ref<InputEventKey> k;
+ k.instance();
+
+ get_key_modifier_state([event modifierFlags], k);
+ k->set_pressed(true);
+ k->set_scancode(latin_keyboard_keycode_convert(translateKey([event keyCode])));
+ k->set_echo([event isARepeat]);
NSString *characters = [event characters];
NSUInteger i, length = [characters length];
- if (length > 0 && keycode_has_unicode(ev.key.scancode)) {
+ if (length > 0 && keycode_has_unicode(k->get_scancode())) {
for (i = 0; i < length; i++) {
- ev.key.unicode = [characters characterAtIndex:i];
- OS_OSX::singleton->push_input(ev);
- ev.key.scancode = 0;
+ k->set_unicode([characters characterAtIndex:i]);
+ OS_OSX::singleton->push_input(k);
+ k->set_scancode(0);
}
} else {
- OS_OSX::singleton->push_input(ev);
+ OS_OSX::singleton->push_input(k);
}
}
- (void)flagsChanged:(NSEvent *)event {
- InputEvent ev;
+ Ref<InputEventKey> k;
+ k.instance();
+
int key = [event keyCode];
int mod = [event modifierFlags];
- ev.type = InputEvent::KEY;
-
if (key == 0x36 || key == 0x37) {
if (mod & NSCommandKeyMask) {
mod &= ~NSCommandKeyMask;
- ev.key.pressed = true;
+ k->set_pressed(true);
} else {
- ev.key.pressed = false;
+ k->set_pressed(false);
}
} else if (key == 0x38 || key == 0x3c) {
if (mod & NSShiftKeyMask) {
mod &= ~NSShiftKeyMask;
- ev.key.pressed = true;
+ k->set_pressed(true);
} else {
- ev.key.pressed = false;
+ k->set_pressed(false);
}
} else if (key == 0x3a || key == 0x3d) {
if (mod & NSAlternateKeyMask) {
mod &= ~NSAlternateKeyMask;
- ev.key.pressed = true;
+ k->set_pressed(true);
} else {
- ev.key.pressed = false;
+ k->set_pressed(false);
}
} else if (key == 0x3b || key == 0x3e) {
if (mod & NSControlKeyMask) {
mod &= ~NSControlKeyMask;
- ev.key.pressed = true;
+ k->set_pressed(true);
} else {
- ev.key.pressed = false;
+ k->set_pressed(false);
}
} else {
return;
}
- ev.key.mod = translateFlags(mod);
- ev.key.scancode = latin_keyboard_keycode_convert(translateKey(key));
+ get_key_modifier_state(mod, k);
+ k->set_scancode(latin_keyboard_keycode_convert(translateKey(key)));
- OS_OSX::singleton->push_input(ev);
+ OS_OSX::singleton->push_input(k);
}
- (void)keyUp:(NSEvent *)event {
- InputEvent ev;
- ev.type = InputEvent::KEY;
- ev.key.pressed = false;
- ev.key.mod = translateFlags([event modifierFlags]);
- ev.key.scancode = latin_keyboard_keycode_convert(translateKey([event keyCode]));
- OS_OSX::singleton->push_input(ev);
+ Ref<InputEventKey> k;
+ k.instance();
- /*
- const int key = translateKey([event keyCode]);
- const int mods = translateFlags([event modifierFlags]);
- _glfwInputKey(window, key, [event keyCode], GLFW_RELEASE, mods);
-*/
+ get_key_modifier_state([event modifierFlags], k);
+ k->set_pressed(false);
+ k->set_scancode(latin_keyboard_keycode_convert(translateKey([event keyCode])));
+
+ OS_OSX::singleton->push_input(k);
}
-inline void sendScrollEvent(int button, double factor) {
- InputEvent ev;
- ev.type = InputEvent::MOUSE_BUTTON;
- ev.mouse_button.button_index = button;
- ev.mouse_button.factor = factor;
- ev.mouse_button.pressed = true;
- ev.mouse_button.x = mouse_x;
- ev.mouse_button.y = mouse_y;
- ev.mouse_button.global_x = mouse_x;
- ev.mouse_button.global_y = mouse_y;
- ev.mouse_button.button_mask = button_mask;
- OS_OSX::singleton->push_input(ev);
- ev.mouse_button.pressed = false;
- OS_OSX::singleton->push_input(ev);
+inline void sendScrollEvent(int button, double factor, int modifierFlags) {
+
+ Ref<InputEventMouseButton> sc;
+ sc.instance();
+
+ get_key_modifier_state(modifierFlags, sc);
+ sc->set_button_index(button);
+ sc->set_factor(factor);
+ sc->set_pressed(true);
+ Vector2 mouse_pos = Vector2(mouse_x, mouse_y);
+ sc->set_pos(mouse_pos);
+ sc->set_global_pos(mouse_pos);
+ sc->set_button_mask(button_mask);
+ OS_OSX::singleton->push_input(sc);
+ sc->set_pressed(false);
+ OS_OSX::singleton->push_input(sc);
}
- (void)scrollWheel:(NSEvent *)event {
@@ -822,12 +727,11 @@ inline void sendScrollEvent(int button, double factor) {
deltaX = [event deltaX];
deltaY = [event deltaY];
}
-
if (fabs(deltaX)) {
- sendScrollEvent(0 > deltaX ? BUTTON_WHEEL_RIGHT : BUTTON_WHEEL_LEFT, fabs(deltaX * 0.3));
+ sendScrollEvent(0 > deltaX ? BUTTON_WHEEL_RIGHT : BUTTON_WHEEL_LEFT, fabs(deltaX * 0.3), [event modifierFlags]);
}
if (fabs(deltaY)) {
- sendScrollEvent(0 < deltaY ? BUTTON_WHEEL_UP : BUTTON_WHEEL_DOWN, fabs(deltaY * 0.3));
+ sendScrollEvent(0 < deltaY ? BUTTON_WHEEL_UP : BUTTON_WHEEL_DOWN, fabs(deltaY * 0.3), [event modifierFlags]);
}
}
@@ -1227,26 +1131,27 @@ void OS_OSX::set_window_title(const String &p_title) {
[window_object setTitle:[NSString stringWithUTF8String:p_title.utf8().get_data()]];
}
-void OS_OSX::set_icon(const Image &p_icon) {
+void OS_OSX::set_icon(const Ref<Image> &p_icon) {
- Image img = p_icon;
- img.convert(Image::FORMAT_RGBA8);
+ Ref<Image> img = p_icon;
+ img = img->duplicate();
+ img->convert(Image::FORMAT_RGBA8);
NSBitmapImageRep *imgrep = [[[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
- pixelsWide:p_icon.get_width()
- pixelsHigh:p_icon.get_height()
+ pixelsWide:img->get_width()
+ pixelsHigh:img->get_height()
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
- bytesPerRow:p_icon.get_width() * 4
+ bytesPerRow:img->get_width() * 4
bitsPerPixel:32] autorelease];
ERR_FAIL_COND(imgrep == nil);
uint8_t *pixels = [imgrep bitmapData];
- int len = img.get_width() * img.get_height();
- PoolVector<uint8_t> data = img.get_data();
+ int len = img->get_width() * img->get_height();
+ PoolVector<uint8_t> data = img->get_data();
PoolVector<uint8_t>::Read r = data.read();
/* Premultiply the alpha channel */
@@ -1258,7 +1163,7 @@ void OS_OSX::set_icon(const Image &p_icon) {
pixels[i * 4 + 3] = alpha;
}
- NSImage *nsimg = [[[NSImage alloc] initWithSize:NSMakeSize(img.get_width(), img.get_height())] autorelease];
+ NSImage *nsimg = [[[NSImage alloc] initWithSize:NSMakeSize(img->get_width(), img->get_height())] autorelease];
ERR_FAIL_COND(nsimg == nil);
[nsimg addRepresentation:imgrep];
@@ -1616,9 +1521,9 @@ void OS_OSX::process_events() {
autoreleasePool = [[NSAutoreleasePool alloc] init];
}
-void OS_OSX::push_input(const InputEvent &p_event) {
+void OS_OSX::push_input(const Ref<InputEvent> &p_event) {
- InputEvent ev = p_event;
+ Ref<InputEvent> ev = p_event;
input->parse_input_event(ev);
}
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index 2946aa1eae..51aba9b7fd 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -259,45 +259,48 @@ void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Cor
int but = _get_button(point);
if (_is_touch(point)) {
- InputEvent event;
- event.type = InputEvent::SCREEN_TOUCH;
- event.device = 0;
- event.screen_touch.pressed = p_pressed;
- event.screen_touch.x = pos.X;
- event.screen_touch.y = pos.Y;
- event.screen_touch.index = _get_finger(point->PointerId);
-
- last_touch_x[event.screen_touch.index] = pos.X;
- last_touch_y[event.screen_touch.index] = pos.Y;
-
- os->input_event(event);
+ Ref<InputEventScreenTouch> screen_touch;
+ screen_touch.instance();
+ screen_touch->set_device(0);
+ screen_touch->set_pressed(p_pressed);
+ screen_touch->set_pos(Vector2(pos.X, pos.Y));
+ screen_touch->set_index(_get_finger(point->PointerId));
+
+ last_touch_x[screen_touch->get_index()] = pos.X;
+ last_touch_y[screen_touch->get_index()] = pos.Y;
+
+ os->input_event(screen_touch);
if (number_of_contacts > 1)
return;
}; // fallthrought of sorts
- InputEvent event;
- event.type = InputEvent::MOUSE_BUTTON;
- event.device = 0;
- event.mouse_button.pressed = p_pressed;
- event.mouse_button.button_index = but;
- event.mouse_button.x = pos.X;
- event.mouse_button.y = pos.Y;
- event.mouse_button.global_x = pos.X;
- event.mouse_button.global_y = pos.Y;
+ Ref<InputEventMouseButton> mouse_button;
+ mouse_button.instance();
+ mouse_button->set_device(0);
+ mouse_button->set_pressed(p_pressed);
+ mouse_button->set_button_index(but);
+ mouse_button->set_pos(Vector2(pos.X, pos.Y));
+ mouse_button->set_global_pos(Vector2(pos.X, pos.Y));
if (p_is_wheel) {
if (point->Properties->MouseWheelDelta > 0) {
- event.mouse_button.button_index = point->Properties->IsHorizontalMouseWheel ? BUTTON_WHEEL_RIGHT : BUTTON_WHEEL_UP;
+ mouse_button->set_button_index(point->Properties->IsHorizontalMouseWheel ? BUTTON_WHEEL_RIGHT : BUTTON_WHEEL_UP);
} else if (point->Properties->MouseWheelDelta < 0) {
- event.mouse_button.button_index = point->Properties->IsHorizontalMouseWheel ? BUTTON_WHEEL_LEFT : BUTTON_WHEEL_DOWN;
+ mouse_button->set_button_index(point->Properties->IsHorizontalMouseWheel ? BUTTON_WHEEL_LEFT : BUTTON_WHEEL_DOWN);
}
}
last_touch_x[31] = pos.X;
last_touch_y[31] = pos.Y;
- os->input_event(event);
+ os->input_event(mouse_button);
+
+ if (p_is_wheel) {
+ // Send release for mouse wheel
+ mouse_button->set_pressed(false);
+ os->input_event(mouse_button);
+ }
};
void App::OnPointerPressed(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) {
@@ -349,16 +352,14 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Co
if (point->IsInContact && _is_touch(point)) {
- InputEvent event;
- event.type = InputEvent::SCREEN_DRAG;
- event.device = 0;
- event.screen_drag.x = pos.X;
- event.screen_drag.y = pos.Y;
- event.screen_drag.index = _get_finger(point->PointerId);
- event.screen_drag.relative_x = event.screen_drag.x - last_touch_x[event.screen_drag.index];
- event.screen_drag.relative_y = event.screen_drag.y - last_touch_y[event.screen_drag.index];
+ Ref<InputEventScreenDrag> screen_drag;
+ screen_drag.instance();
+ screen_drag->set_device(0);
+ screen_drag->set_pos(Vector2(pos.X, pos.Y));
+ screen_drag->set_index(_get_finger(point->PointerId));
+ screen_drag->set_relative(Vector2(screen_drag->get_pos().x - last_touch_x[screen_drag->get_index()], screen_drag->get_pos().y - last_touch_y[screen_drag->get_index()]));
- os->input_event(event);
+ os->input_event(screen_drag);
if (number_of_contacts > 1)
return;
@@ -368,19 +369,16 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Co
if (os->get_mouse_mode() == OS::MouseMode::MOUSE_MODE_CAPTURED)
return;
- InputEvent event;
- event.type = InputEvent::MOUSE_MOTION;
- event.device = 0;
- event.mouse_motion.x = pos.X;
- event.mouse_motion.y = pos.Y;
- event.mouse_motion.global_x = pos.X;
- event.mouse_motion.global_y = pos.Y;
- event.mouse_motion.relative_x = pos.X - last_touch_x[31];
- event.mouse_motion.relative_y = pos.Y - last_touch_y[31];
+ Ref<InputEventMouseMotion> mouse_motion;
+ mouse_motion.instance();
+ mouse_motion->set_device(0);
+ mouse_motion->set_pos(Vector2(pos.X, pos.Y));
+ mouse_motion->set_global_pos(Vector2(pos.X, pos.Y));
+ mouse_motion->set_relative(Vector2(pos.X - last_touch_x[31], pos.Y - last_touch_y[31]));
last_mouse_pos = pos;
- os->input_event(event);
+ os->input_event(mouse_motion);
}
void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
@@ -393,32 +391,25 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
pos.X = last_mouse_pos.X + args->MouseDelta.X;
pos.Y = last_mouse_pos.Y + args->MouseDelta.Y;
- InputEvent event;
- event.type = InputEvent::MOUSE_MOTION;
- event.device = 0;
- event.mouse_motion.x = pos.X;
- event.mouse_motion.y = pos.Y;
- event.mouse_motion.global_x = pos.X;
- event.mouse_motion.global_y = pos.Y;
- event.mouse_motion.relative_x = args->MouseDelta.X;
- event.mouse_motion.relative_y = args->MouseDelta.Y;
+ Ref<InputEventMouseMotion> mouse_motion;
+ mouse_motion.instance();
+ mouse_motion->set_device(0);
+ mouse_motion->set_pos(Vector2(pos.X, pos.Y));
+ mouse_motion->set_global_pos(Vector2(pos.X, pos.Y));
+ mouse_motion->set_relative(Vector2(args->MouseDelta.X, args->MouseDelta.Y));
last_mouse_pos = pos;
- os->input_event(event);
+ os->input_event(mouse_motion);
}
void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs ^ key_args, Windows::UI::Core::CharacterReceivedEventArgs ^ char_args) {
OSUWP::KeyEvent ke;
- InputModifierState mod;
- mod.meta = false;
- mod.command = false;
- mod.control = sender->GetAsyncKeyState(VirtualKey::Control) == CoreVirtualKeyStates::Down;
- mod.alt = sender->GetAsyncKeyState(VirtualKey::Menu) == CoreVirtualKeyStates::Down;
- mod.shift = sender->GetAsyncKeyState(VirtualKey::Shift) == CoreVirtualKeyStates::Down;
- ke.mod_state = mod;
+ ke.control = sender->GetAsyncKeyState(VirtualKey::Control) == CoreVirtualKeyStates::Down;
+ ke.alt = sender->GetAsyncKeyState(VirtualKey::Menu) == CoreVirtualKeyStates::Down;
+ ke.shift = sender->GetAsyncKeyState(VirtualKey::Shift) == CoreVirtualKeyStates::Down;
ke.pressed = p_pressed;
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index f1e0716241..baff7f9788 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -49,6 +49,8 @@ def configure(env):
arch = ""
env['ENV'] = os.environ
+ vc_base_path = os.environ['VCTOOLSINSTALLDIR'] if "VCTOOLSINSTALLDIR" in os.environ else os.environ['VCINSTALLDIR']
+
# ANGLE
angle_root = os.getenv("ANGLE_SRC_PATH")
env.Append(CPPPATH=[angle_root + '/include'])
@@ -65,7 +67,7 @@ def configure(env):
arch = "arm"
env["bits"] = "32"
env.Append(LINKFLAGS=['/MACHINE:ARM'])
- env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store/arm'])
+ env.Append(LIBPATH=[vc_base_path + 'lib/store/arm'])
angle_build_cmd += "ARM"
@@ -92,7 +94,7 @@ def configure(env):
env.Append(CPPFLAGS=['/DPNG_ABORT=abort'])
env.Append(LINKFLAGS=['/MACHINE:X86'])
- env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store'])
+ env.Append(LIBPATH=[vc_base_path + 'lib/store'])
env.Append(LIBPATH=[angle_root + '/winrt/10/src/Release_Win32/lib'])
else:
@@ -107,10 +109,9 @@ def configure(env):
env.Append(CPPPATH=['#platform/uwp', '#drivers/windows'])
env.Append(LINKFLAGS=['/MANIFEST:NO', '/NXCOMPAT', '/DYNAMICBASE', '/WINMD', '/APPCONTAINER', '/ERRORREPORT:PROMPT', '/NOLOGO', '/TLBID:1', '/NODEFAULTLIB:"kernel32.lib"', '/NODEFAULTLIB:"ole32.lib"'])
env.Append(CPPFLAGS=['/D', '__WRL_NO_DEFAULT_LIB__', '/D', 'WIN32'])
- env.Append(CPPFLAGS=['/FU', os.environ['VCINSTALLDIR'] + 'lib/store/references/platform.winmd'])
- env.Append(CPPFLAGS=['/AI', os.environ['VCINSTALLDIR'] + 'lib/store/references'])
-
- env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store/references'])
+
+ env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/store/references'])
+ env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/x86/store/references'])
if (env["target"] == "release"):
@@ -133,7 +134,7 @@ def configure(env):
env.Append(CCFLAGS=string.split('/FS /MP /GS /wd"4453" /wd"28204" /wd"4291" /Zc:wchar_t /Gm- /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /Gd /EHsc /nologo'))
env.Append(CXXFLAGS=string.split('/ZW /FS'))
- env.Append(CCFLAGS=['/AI', os.environ['VCINSTALLDIR'] + '\\vcpackages', '/AI', os.environ['WINDOWSSDKDIR'] + '\\References\\CommonConfiguration\\Neutral'])
+ env.Append(CCFLAGS=['/AI', vc_base_path + '\\vcpackages', '/AI', os.environ['WINDOWSSDKDIR'] + '\\References\\CommonConfiguration\\Neutral'])
env["PROGSUFFIX"] = "." + arch + env["PROGSUFFIX"]
env["OBJSUFFIX"] = "." + arch + env["OBJSUFFIX"]
diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp
index d79ce75db5..57c4c5d572 100644
--- a/platform/uwp/gl_context_egl.cpp
+++ b/platform/uwp/gl_context_egl.cpp
@@ -97,7 +97,7 @@ Error ContextEGL::initialize() {
EGLContext context = EGL_NO_CONTEXT;
EGLSurface surface = EGL_NO_SURFACE;
EGLConfig config = nullptr;
- EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE, EGL_NONE };
+ EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE, EGL_NONE };
try {
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 818b827e83..28aaf9161b 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -330,16 +330,9 @@ String OSUWP::get_clipboard() const {
return "";
};
-void OSUWP::input_event(InputEvent &p_event) {
+void OSUWP::input_event(const Ref<InputEvent> &p_event) {
input->parse_input_event(p_event);
-
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index > 3) {
-
- //send release for mouse wheel
- p_event.mouse_button.pressed = false;
- input->parse_input_event(p_event);
- }
};
void OSUWP::delete_main_loop() {
@@ -663,16 +656,18 @@ void OSUWP::process_key_events() {
for (int i = 0; i < key_event_pos; i++) {
KeyEvent &kev = key_event_buffer[i];
- InputEvent iev;
-
- iev.type = InputEvent::KEY;
- iev.key.mod = kev.mod_state;
- iev.key.echo = kev.echo;
- iev.key.scancode = kev.scancode;
- iev.key.unicode = kev.unicode;
- iev.key.pressed = kev.pressed;
- input_event(iev);
+ Ref<InputEventKey> key_event;
+ key_event.instance();
+ key_event->set_alt(kev.alt);
+ key_event->set_shift(kev.shift);
+ key_event->set_control(kev.control);
+ key_event->set_echo(kev.echo);
+ key_event->set_scancode(kev.scancode);
+ key_event->set_unicode(kev.unicode);
+ key_event->set_pressed(kev.pressed);
+
+ input_event(key_event);
}
key_event_pos = 0;
}
@@ -746,7 +741,7 @@ String OSUWP::get_executable_path() const {
return "";
}
-void OSUWP::set_icon(const Image &p_icon) {
+void OSUWP::set_icon(const Ref<Image> &p_icon) {
}
bool OSUWP::has_environment(const String &p_var) const {
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index 7d9e681da1..45b8eefdee 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -63,7 +63,7 @@ public:
CHAR_EVENT_MESSAGE
};
- InputModifierState mod_state;
+ bool alt, shift, control;
MessageType type;
bool pressed;
unsigned int scancode;
@@ -227,7 +227,7 @@ public:
virtual String get_clipboard() const;
void set_cursor_shape(CursorShape p_shape);
- void set_icon(const Image &p_icon);
+ void set_icon(const Ref<Image> &p_icon);
virtual String get_executable_path() const;
@@ -257,7 +257,7 @@ public:
virtual bool get_swap_ok_cancel() { return true; }
- void input_event(InputEvent &p_event);
+ void input_event(const Ref<InputEvent> &p_event);
virtual PowerState get_power_state();
virtual int get_power_seconds_left();
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index 2d11bfe4d8..3802e7e784 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -35,7 +35,7 @@ void register_windows_exporter() {
Ref<EditorExportPlatformPC> platform;
platform.instance();
- Image img(_windows_logo);
+ Ref<Image> img = memnew(Image(_windows_logo));
Ref<ImageTexture> logo;
logo.instance();
logo->create_from_image(img);
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 9dee2da21e..830aae5515 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -215,14 +215,11 @@ bool OS_Windows::can_draw() const {
void OS_Windows::_touch_event(bool p_pressed, int p_x, int p_y, int idx) {
- InputEvent event;
- event.type = InputEvent::SCREEN_TOUCH;
- event.screen_touch.index = idx;
-
- event.screen_touch.pressed = p_pressed;
-
- event.screen_touch.x = p_x;
- event.screen_touch.y = p_y;
+ Ref<InputEventScreenTouch> event;
+ event.instance();
+ event->set_index(idx);
+ event->set_pressed(p_pressed);
+ event->set_pos(Vector2(p_x, p_y));
if (main_loop) {
input->parse_input_event(event);
@@ -231,12 +228,10 @@ void OS_Windows::_touch_event(bool p_pressed, int p_x, int p_y, int idx) {
void OS_Windows::_drag_event(int p_x, int p_y, int idx) {
- InputEvent event;
- event.type = InputEvent::SCREEN_DRAG;
- event.screen_drag.index = idx;
-
- event.screen_drag.x = p_x;
- event.screen_drag.y = p_y;
+ Ref<InputEventScreenDrag> event;
+ event.instance();
+ event->set_index(idx);
+ event->set_pos(Vector2(p_x, p_y));
if (main_loop)
input->parse_input_event(event);
@@ -367,22 +362,23 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
};
*/
- InputEvent event;
- event.type = InputEvent::MOUSE_MOTION;
- InputEventMouseMotion &mm = event.mouse_motion;
+ Ref<InputEventMouseMotion> mm;
+ mm.instance();
+
+ mm->set_control((wParam & MK_CONTROL) != 0);
+ mm->set_shift((wParam & MK_SHIFT) != 0);
+ mm->set_alt(alt_mem);
- mm.mod.control = (wParam & MK_CONTROL) != 0;
- mm.mod.shift = (wParam & MK_SHIFT) != 0;
- mm.mod.alt = alt_mem;
+ int bmask = 0;
+ bmask |= (wParam & MK_LBUTTON) ? (1 << 0) : 0;
+ bmask |= (wParam & MK_RBUTTON) ? (1 << 1) : 0;
+ bmask |= (wParam & MK_MBUTTON) ? (1 << 2) : 0;
+ mm->set_button_mask(bmask);
- mm.button_mask |= (wParam & MK_LBUTTON) ? (1 << 0) : 0;
- mm.button_mask |= (wParam & MK_RBUTTON) ? (1 << 1) : 0;
- mm.button_mask |= (wParam & MK_MBUTTON) ? (1 << 2) : 0;
- last_button_state = mm.button_mask;
- /*mm.button_mask|=(wParam&MK_XBUTTON1)?(1<<5):0;
- mm.button_mask|=(wParam&MK_XBUTTON2)?(1<<6):0;*/
- mm.x = GET_X_LPARAM(lParam);
- mm.y = GET_Y_LPARAM(lParam);
+ last_button_state = mm->get_button_mask();
+ /*mm->get_button_mask()|=(wParam&MK_XBUTTON1)?(1<<5):0;
+ mm->get_button_mask()|=(wParam&MK_XBUTTON2)?(1<<6):0;*/
+ mm->set_pos(Vector2(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
if (mouse_mode == MOUSE_MODE_CAPTURED) {
@@ -390,35 +386,33 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
old_x = c.x;
old_y = c.y;
- if (Point2i(mm.x, mm.y) == c) {
+ if (mm->get_pos() == c) {
center = c;
return 0;
}
- Point2i ncenter(mm.x, mm.y);
+ Point2i ncenter = mm->get_pos();
center = ncenter;
POINT pos = { (int)c.x, (int)c.y };
ClientToScreen(hWnd, &pos);
SetCursorPos(pos.x, pos.y);
}
- input->set_mouse_position(Point2(mm.x, mm.y));
- mm.speed_x = input->get_last_mouse_speed().x;
- mm.speed_y = input->get_last_mouse_speed().y;
+ input->set_mouse_position(mm->get_pos());
+ mm->set_speed(input->get_last_mouse_speed());
if (old_invalid) {
- old_x = mm.x;
- old_y = mm.y;
+ old_x = mm->get_pos().x;
+ old_y = mm->get_pos().y;
old_invalid = false;
}
- mm.relative_x = mm.x - old_x;
- mm.relative_y = mm.y - old_y;
- old_x = mm.x;
- old_y = mm.y;
+ mm->set_relative(Vector2(mm->get_pos() - Vector2(old_x, old_y)));
+ old_x = mm->get_pos().x;
+ old_y = mm->get_pos().y;
if (window_has_focus && main_loop)
- input->parse_input_event(event);
+ input->parse_input_event(mm);
} break;
case WM_LBUTTONDOWN:
@@ -447,114 +441,112 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
};
*/
- InputEvent event;
- event.type = InputEvent::MOUSE_BUTTON;
- InputEventMouseButton &mb = event.mouse_button;
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
switch (uMsg) {
case WM_LBUTTONDOWN: {
- mb.pressed = true;
- mb.button_index = 1;
+ mb->set_pressed(true);
+ mb->set_button_index(1);
} break;
case WM_LBUTTONUP: {
- mb.pressed = false;
- mb.button_index = 1;
+ mb->set_pressed(false);
+ mb->set_button_index(1);
} break;
case WM_MBUTTONDOWN: {
- mb.pressed = true;
- mb.button_index = 3;
+ mb->set_pressed(true);
+ mb->set_button_index(3);
} break;
case WM_MBUTTONUP: {
- mb.pressed = false;
- mb.button_index = 3;
+ mb->set_pressed(false);
+ mb->set_button_index(3);
} break;
case WM_RBUTTONDOWN: {
- mb.pressed = true;
- mb.button_index = 2;
+ mb->set_pressed(true);
+ mb->set_button_index(2);
} break;
case WM_RBUTTONUP: {
- mb.pressed = false;
- mb.button_index = 2;
+ mb->set_pressed(false);
+ mb->set_button_index(2);
} break;
case WM_LBUTTONDBLCLK: {
- mb.pressed = true;
- mb.button_index = 1;
- mb.doubleclick = true;
+ mb->set_pressed(true);
+ mb->set_button_index(1);
+ mb->set_doubleclick(true);
} break;
case WM_RBUTTONDBLCLK: {
- mb.pressed = true;
- mb.button_index = 2;
- mb.doubleclick = true;
+ mb->set_pressed(true);
+ mb->set_button_index(2);
+ mb->set_doubleclick(true);
} break;
case WM_MOUSEWHEEL: {
- mb.pressed = true;
+ mb->set_pressed(true);
int motion = (short)HIWORD(wParam);
if (!motion)
return 0;
if (motion > 0)
- mb.button_index = BUTTON_WHEEL_UP;
+ mb->set_button_index(BUTTON_WHEEL_UP);
else
- mb.button_index = BUTTON_WHEEL_DOWN;
+ mb->set_button_index(BUTTON_WHEEL_DOWN);
} break;
case WM_MOUSEHWHEEL: {
- mb.pressed = true;
+ mb->set_pressed(true);
int motion = (short)HIWORD(wParam);
if (!motion)
return 0;
if (motion < 0) {
- mb.button_index = BUTTON_WHEEL_LEFT;
- mb.factor = fabs((double)motion / (double)WHEEL_DELTA);
+ mb->set_button_index(BUTTON_WHEEL_LEFT);
+ mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
} else {
- mb.button_index = BUTTON_WHEEL_RIGHT;
- mb.factor = fabs((double)motion / (double)WHEEL_DELTA);
+ mb->set_button_index(BUTTON_WHEEL_RIGHT);
+ mb->set_factor(fabs((double)motion / (double)WHEEL_DELTA));
}
} break;
/*
case WM_XBUTTONDOWN: {
- mb.pressed=true;
- mb.button_index=(HIWORD(wParam)==XBUTTON1)?6:7;
+ mb->is_pressed()=true;
+ mb->get_button_index()=(HIWORD(wParam)==XBUTTON1)?6:7;
} break;
case WM_XBUTTONUP:
- mb.pressed=true;
- mb.button_index=(HIWORD(wParam)==XBUTTON1)?6:7;
+ mb->is_pressed()=true;
+ mb->get_button_index()=(HIWORD(wParam)==XBUTTON1)?6:7;
} break;*/
default: { return 0; }
}
- mb.mod.control = (wParam & MK_CONTROL) != 0;
- mb.mod.shift = (wParam & MK_SHIFT) != 0;
- mb.mod.alt = alt_mem;
- //mb.mod.alt=(wParam&MK_MENU)!=0;
- mb.button_mask |= (wParam & MK_LBUTTON) ? (1 << 0) : 0;
- mb.button_mask |= (wParam & MK_RBUTTON) ? (1 << 1) : 0;
- mb.button_mask |= (wParam & MK_MBUTTON) ? (1 << 2) : 0;
-
- last_button_state = mb.button_mask;
+ mb->set_control((wParam & MK_CONTROL) != 0);
+ mb->set_shift((wParam & MK_SHIFT) != 0);
+ mb->set_alt(alt_mem);
+ //mb->get_alt()=(wParam&MK_MENU)!=0;
+ int bmask = 0;
+ bmask |= (wParam & MK_LBUTTON) ? (1 << 0) : 0;
+ bmask |= (wParam & MK_RBUTTON) ? (1 << 1) : 0;
+ bmask |= (wParam & MK_MBUTTON) ? (1 << 2) : 0;
+ mb->set_button_mask(bmask);
+
+ last_button_state = mb->get_button_mask();
/*
- mb.button_mask|=(wParam&MK_XBUTTON1)?(1<<5):0;
- mb.button_mask|=(wParam&MK_XBUTTON2)?(1<<6):0;*/
- mb.x = GET_X_LPARAM(lParam);
- mb.y = GET_Y_LPARAM(lParam);
+ mb->get_button_mask()|=(wParam&MK_XBUTTON1)?(1<<5):0;
+ mb->get_button_mask()|=(wParam&MK_XBUTTON2)?(1<<6):0;*/
+ mb->set_pos(Vector2(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
if (mouse_mode == MOUSE_MODE_CAPTURED) {
- mb.x = old_x;
- mb.y = old_y;
+ mb->set_pos(Vector2(old_x, old_y));
}
- mb.global_x = mb.x;
- mb.global_y = mb.y;
+ mb->set_global_pos(mb->get_pos());
if (uMsg != WM_MOUSEWHEEL) {
- if (mb.pressed) {
+ if (mb->is_pressed()) {
if (++pressrc > 0)
SetCapture(hWnd);
@@ -568,21 +560,21 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} else if (mouse_mode != MOUSE_MODE_CAPTURED) {
// for reasons unknown to mankind, wheel comes in screen cordinates
POINT coords;
- coords.x = mb.x;
- coords.y = mb.y;
+ coords.x = mb->get_pos().x;
+ coords.y = mb->get_pos().y;
ScreenToClient(hWnd, &coords);
- mb.x = coords.x;
- mb.y = coords.y;
+ mb->set_pos(Vector2(coords.x, coords.y));
}
if (main_loop) {
- input->parse_input_event(event);
- if (mb.pressed && mb.button_index > 3) {
+ input->parse_input_event(mb);
+ if (mb->is_pressed() && mb->get_button_index() > 3) {
//send release for mouse wheel
- mb.pressed = false;
- input->parse_input_event(event);
+ Ref<InputEventMouseButton> mbd = mb->duplicate();
+ mbd->set_pressed(false);
+ input->parse_input_event(mbd);
}
}
}
@@ -638,10 +630,10 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
// Make sure we don't include modifiers for the modifier key itself.
KeyEvent ke;
- ke.mod_state.shift = (wParam != VK_SHIFT) ? shift_mem : false;
- ke.mod_state.alt = (!(wParam == VK_MENU && (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN))) ? alt_mem : false;
- ke.mod_state.control = (wParam != VK_CONTROL) ? control_mem : false;
- ke.mod_state.meta = meta_mem;
+ ke.shift = (wParam != VK_SHIFT) ? shift_mem : false;
+ ke.alt = (!(wParam == VK_MENU && (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN))) ? alt_mem : false;
+ ke.control = (wParam != VK_CONTROL) ? control_mem : false;
+ ke.meta = meta_mem;
ke.uMsg = uMsg;
if (ke.uMsg == WM_SYSKEYDOWN)
@@ -777,23 +769,25 @@ void OS_Windows::process_key_events() {
case WM_CHAR: {
if ((i == 0 && ke.uMsg == WM_CHAR) || (i > 0 && key_event_buffer[i - 1].uMsg == WM_CHAR)) {
- InputEvent event;
- event.type = InputEvent::KEY;
- InputEventKey &k = event.key;
-
- k.mod = ke.mod_state;
- k.pressed = true;
- k.scancode = KeyMappingWindows::get_keysym(ke.wParam);
- k.unicode = ke.wParam;
- if (k.unicode && gr_mem) {
- k.mod.alt = false;
- k.mod.control = false;
+ Ref<InputEventKey> k;
+ k.instance();
+
+ k->set_shift(ke.shift);
+ k->set_alt(ke.alt);
+ k->set_control(ke.control);
+ k->set_metakey(ke.meta);
+ k->set_pressed(true);
+ k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam));
+ k->set_unicode(ke.wParam);
+ if (k->get_unicode() && gr_mem) {
+ k->set_alt(false);
+ k->set_control(false);
}
- if (k.unicode < 32)
- k.unicode = 0;
+ if (k->get_unicode() < 32)
+ k->set_unicode(0);
- input->parse_input_event(event);
+ input->parse_input_event(k);
}
//do nothing
@@ -801,27 +795,32 @@ void OS_Windows::process_key_events() {
case WM_KEYUP:
case WM_KEYDOWN: {
- InputEvent event;
- event.type = InputEvent::KEY;
- InputEventKey &k = event.key;
+ Ref<InputEventKey> k;
+ k.instance();
+
+ k->set_shift(ke.shift);
+ k->set_alt(ke.alt);
+ k->set_control(ke.control);
+ k->set_metakey(ke.meta);
- k.mod = ke.mod_state;
- k.pressed = (ke.uMsg == WM_KEYDOWN);
+ k->set_pressed(ke.uMsg == WM_KEYDOWN);
- k.scancode = KeyMappingWindows::get_keysym(ke.wParam);
- if (i + 1 < key_event_pos && key_event_buffer[i + 1].uMsg == WM_CHAR)
- k.unicode = key_event_buffer[i + 1].wParam;
- if (k.unicode && gr_mem) {
- k.mod.alt = false;
- k.mod.control = false;
+ k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam));
+
+ if (i + 1 < key_event_pos && key_event_buffer[i + 1].uMsg == WM_CHAR) {
+ k->set_unicode(key_event_buffer[i + 1].wParam);
+ }
+ if (k->get_unicode() && gr_mem) {
+ k->set_alt(false);
+ k->set_control(false);
}
- if (k.unicode < 32)
- k.unicode = 0;
+ if (k->get_unicode() < 32)
+ k->set_unicode(0);
- k.echo = (ke.uMsg == WM_KEYDOWN && (ke.lParam & (1 << 30)));
+ k->set_echo((ke.uMsg == WM_KEYDOWN && (ke.lParam & (1 << 30))));
- input->parse_input_event(event);
+ input->parse_input_event(k);
} break;
}
@@ -1996,13 +1995,14 @@ String OS_Windows::get_executable_path() const {
return s;
}
-void OS_Windows::set_icon(const Image &p_icon) {
+void OS_Windows::set_icon(const Ref<Image> &p_icon) {
- Image icon = p_icon;
- if (icon.get_format() != Image::FORMAT_RGBA8)
- icon.convert(Image::FORMAT_RGBA8);
- int w = icon.get_width();
- int h = icon.get_height();
+ ERR_FAIL_COND(!p_icon.is_valid());
+ Ref<Image> icon = p_icon->duplicate();
+ if (icon->get_format() != Image::FORMAT_RGBA8)
+ icon->convert(Image::FORMAT_RGBA8);
+ int w = icon->get_width();
+ int h = icon->get_height();
/* Create temporary bitmap buffer */
int icon_len = 40 + h * w * 4;
@@ -2023,7 +2023,7 @@ void OS_Windows::set_icon(const Image &p_icon) {
encode_uint32(0, &icon_bmp[36]);
uint8_t *wr = &icon_bmp[40];
- PoolVector<uint8_t>::Read r = icon.get_data().read();
+ PoolVector<uint8_t>::Read r = icon->get_data().read();
for (int i = 0; i < h; i++) {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 87eceafa02..6cbdd58830 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -68,7 +68,7 @@ class OS_Windows : public OS {
struct KeyEvent {
- InputModifierState mod_state;
+ bool alt, shift, control, meta;
UINT uMsg;
WPARAM wParam;
LPARAM lParam;
@@ -254,7 +254,7 @@ public:
virtual String get_clipboard() const;
void set_cursor_shape(CursorShape p_shape);
- void set_icon(const Image &p_icon);
+ void set_icon(const Ref<Image> &p_icon);
virtual String get_executable_path() const;
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index b9ded188bf..d6bad95e5b 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -37,7 +37,7 @@ void register_x11_exporter() {
Ref<EditorExportPlatformPC> platform;
platform.instance();
- Image img(_x11_logo);
+ Ref<Image> img = memnew(Image(_x11_logo));
Ref<ImageTexture> logo;
logo.instance();
logo->create_from_image(img);
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 2e2fe3ba8a..8534185389 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -958,16 +958,12 @@ void OS_X11::request_attention() {
XSendEvent(x11_display, DefaultRootWindow(x11_display), False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
}
-InputModifierState OS_X11::get_key_modifier_state(unsigned int p_x11_state) {
+void OS_X11::get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state) {
- InputModifierState state;
-
- state.shift = (p_x11_state & ShiftMask);
- state.control = (p_x11_state & ControlMask);
- state.alt = (p_x11_state & Mod1Mask /*|| p_x11_state&Mod5Mask*/); //altgr should not count as alt
- state.meta = (p_x11_state & Mod4Mask);
-
- return state;
+ state->set_shift((p_x11_state & ShiftMask));
+ state->set_control((p_x11_state & ControlMask));
+ state->set_alt((p_x11_state & Mod1Mask /*|| p_x11_state&Mod5Mask*/)); //altgr should not count as alt
+ state->set_metakey((p_x11_state & Mod4Mask));
}
unsigned int OS_X11::get_mouse_button_state(unsigned int p_x11_state) {
@@ -1099,7 +1095,10 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
//print_line("mod1: "+itos(xkeyevent->state&Mod1Mask)+" mod 5: "+itos(xkeyevent->state&Mod5Mask));
- InputModifierState state = get_key_modifier_state(xkeyevent->state);
+ Ref<InputEventKey> k;
+ k.instance();
+
+ get_key_modifier_state(xkeyevent->state, k);
/* Phase 6, determine echo character */
@@ -1142,40 +1141,36 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
/* Phase 7, send event to Window */
- InputEvent event;
- event.type = InputEvent::KEY;
- event.device = 0;
- event.key.mod = state;
- event.key.pressed = keypress;
+ k->set_pressed(keypress);
if (keycode >= 'a' && keycode <= 'z')
keycode -= 'a' - 'A';
- event.key.scancode = keycode;
- event.key.unicode = unicode;
- event.key.echo = p_echo;
+ k->set_scancode(keycode);
+ k->set_unicode(unicode);
+ k->set_echo(p_echo);
- if (event.key.scancode == KEY_BACKTAB) {
+ if (k->get_scancode() == KEY_BACKTAB) {
//make it consistent across platforms.
- event.key.scancode = KEY_TAB;
- event.key.mod.shift = true;
+ k->set_scancode(KEY_TAB);
+ k->set_shift(true);
}
//don't set mod state if modifier keys are released by themselves
//else event.is_action() will not work correctly here
- if (!event.key.pressed) {
- if (event.key.scancode == KEY_SHIFT)
- event.key.mod.shift = false;
- else if (event.key.scancode == KEY_CONTROL)
- event.key.mod.control = false;
- else if (event.key.scancode == KEY_ALT)
- event.key.mod.alt = false;
- else if (event.key.scancode == KEY_META)
- event.key.mod.meta = false;
+ if (!k->is_pressed()) {
+ if (k->get_scancode() == KEY_SHIFT)
+ k->set_shift(false);
+ else if (k->get_scancode() == KEY_CONTROL)
+ k->set_control(false);
+ else if (k->get_scancode() == KEY_ALT)
+ k->set_alt(false);
+ else if (k->get_scancode() == KEY_META)
+ k->set_metakey(false);
}
- //printf("key: %x\n",event.key.scancode);
- input->parse_input_event(event);
+ //printf("key: %x\n",k->get_scancode());
+ input->parse_input_event(k);
}
struct Property {
@@ -1332,22 +1327,20 @@ void OS_X11::process_xevents() {
event.xbutton.y = last_mouse_pos.y;
}
- InputEvent mouse_event;
- mouse_event.type = InputEvent::MOUSE_BUTTON;
- mouse_event.device = 0;
- mouse_event.mouse_button.mod = get_key_modifier_state(event.xbutton.state);
- mouse_event.mouse_button.button_mask = get_mouse_button_state(event.xbutton.state);
- mouse_event.mouse_button.x = event.xbutton.x;
- mouse_event.mouse_button.y = event.xbutton.y;
- mouse_event.mouse_button.global_x = event.xbutton.x;
- mouse_event.mouse_button.global_y = event.xbutton.y;
- mouse_event.mouse_button.button_index = event.xbutton.button;
- if (mouse_event.mouse_button.button_index == 2)
- mouse_event.mouse_button.button_index = 3;
- else if (mouse_event.mouse_button.button_index == 3)
- mouse_event.mouse_button.button_index = 2;
-
- mouse_event.mouse_button.pressed = (event.type == ButtonPress);
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+
+ get_key_modifier_state(event.xbutton.state, mb);
+ mb->set_button_mask(get_mouse_button_state(event.xbutton.state));
+ mb->set_pos(Vector2(event.xbutton.x, event.xbutton.y));
+ mb->set_global_pos(mb->get_pos());
+ mb->set_button_index(event.xbutton.button);
+ if (mb->get_button_index() == 2)
+ mb->set_button_index(3);
+ else if (mb->get_button_index() == 3)
+ mb->set_button_index(2);
+
+ mb->set_pressed((event.type == ButtonPress));
if (event.type == ButtonPress && event.xbutton.button == 1) {
@@ -1357,7 +1350,7 @@ void OS_X11::process_xevents() {
last_click_ms = 0;
last_click_pos = Point2(-100, -100);
- mouse_event.mouse_button.doubleclick = true;
+ mb->set_doubleclick(true);
} else {
last_click_ms += diff;
@@ -1365,7 +1358,7 @@ void OS_X11::process_xevents() {
}
}
- input->parse_input_event(mouse_event);
+ input->parse_input_event(mb);
} break;
case MotionNotify: {
@@ -1443,22 +1436,16 @@ void OS_X11::process_xevents() {
Point2i rel = pos - last_mouse_pos;
- InputEvent motion_event;
- motion_event.type = InputEvent::MOUSE_MOTION;
- motion_event.device = 0;
+ Ref<InputEventMouseMotion> mm;
+ mm.instance();
- motion_event.mouse_motion.mod = get_key_modifier_state(event.xmotion.state);
- motion_event.mouse_motion.button_mask = get_mouse_button_state(event.xmotion.state);
- motion_event.mouse_motion.x = pos.x;
- motion_event.mouse_motion.y = pos.y;
+ get_key_modifier_state(event.xmotion.state, mm);
+ mm->set_button_mask(get_mouse_button_state(event.xmotion.state));
+ mm->set_pos(pos);
+ mm->set_global_pos(pos);
input->set_mouse_position(pos);
- motion_event.mouse_motion.global_x = pos.x;
- motion_event.mouse_motion.global_y = pos.y;
- motion_event.mouse_motion.speed_x = input->get_last_mouse_speed().x;
- motion_event.mouse_motion.speed_y = input->get_last_mouse_speed().y;
-
- motion_event.mouse_motion.relative_x = rel.x;
- motion_event.mouse_motion.relative_y = rel.y;
+ mm->set_speed(input->get_last_mouse_speed());
+ mm->set_relative(rel);
last_mouse_pos = pos;
@@ -1467,7 +1454,7 @@ void OS_X11::process_xevents() {
// this is so that the relative motion doesn't get messed up
// after we regain focus.
if (window_has_focus || !mouse_mode_grab)
- input->parse_input_event(motion_event);
+ input->parse_input_event(mm);
} break;
case KeyPress:
@@ -1857,15 +1844,15 @@ void OS_X11::alert(const String &p_alert, const String &p_title) {
execute("/usr/bin/xmessage", args, true);
}
-void OS_X11::set_icon(const Image &p_icon) {
+void OS_X11::set_icon(const Ref<Image> &p_icon) {
Atom net_wm_icon = XInternAtom(x11_display, "_NET_WM_ICON", False);
- if (!p_icon.empty()) {
- Image img = p_icon;
- img.convert(Image::FORMAT_RGBA8);
+ if (p_icon.is_valid()) {
+ Ref<Image> img = p_icon->duplicate();
+ img->convert(Image::FORMAT_RGBA8);
- int w = img.get_width();
- int h = img.get_height();
+ int w = img->get_width();
+ int h = img->get_height();
// We're using long to have wordsize (32Bit build -> 32 Bits, 64 Bit build -> 64 Bits
Vector<long> pd;
@@ -1875,7 +1862,7 @@ void OS_X11::set_icon(const Image &p_icon) {
pd[0] = w;
pd[1] = h;
- PoolVector<uint8_t>::Read r = img.get_data().read();
+ PoolVector<uint8_t>::Read r = img->get_data().read();
long *wr = &pd[2];
uint8_t const *pr = r.ptr();
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 44994e40ec..d62186e5bd 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -121,7 +121,7 @@ class OS_X11 : public OS_Unix {
PhysicsServer *physics_server;
unsigned int get_mouse_button_state(unsigned int p_x11_state);
- InputModifierState get_key_modifier_state(unsigned int p_x11_state);
+ void get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state);
Physics2DServer *physics_2d_server;
MouseMode mouse_mode;
@@ -206,7 +206,7 @@ public:
virtual int get_mouse_button_state() const;
virtual void set_window_title(const String &p_title);
- virtual void set_icon(const Image &p_icon);
+ virtual void set_icon(const Ref<Image> &p_icon);
virtual MainLoop *get_main_loop() const;
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index f699c8f0e8..b2258ec94b 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -688,11 +688,11 @@ Vector2 CanvasItem::make_canvas_pos_local(const Vector2 &screen_point) const {
return local_matrix.xform(screen_point);
}
-InputEvent CanvasItem::make_input_local(const InputEvent &p_event) const {
+Ref<InputEvent> CanvasItem::make_input_local(const Ref<InputEvent> &p_event) const {
ERR_FAIL_COND_V(!is_inside_tree(), p_event);
- return p_event.xform_by((get_canvas_transform() * get_global_transform()).affine_inverse());
+ return p_event->xformed_by((get_canvas_transform() * get_global_transform()).affine_inverse());
}
Vector2 CanvasItem::get_global_mouse_position() const {
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 72fe5b93da..bea4301326 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -209,7 +209,7 @@ public:
void set_use_parent_material(bool p_use_parent_material);
bool get_use_parent_material() const;
- InputEvent make_input_local(const InputEvent &pevent) const;
+ Ref<InputEvent> make_input_local(const Ref<InputEvent> &pevent) const;
Vector2 make_canvas_pos_local(const Vector2 &screen_point) const;
Vector2 get_global_mouse_position() const;
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index afbdfec45e..caf9cf201a 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -180,7 +180,7 @@ bool CollisionObject2D::is_pickable() const {
return pickable;
}
-void CollisionObject2D::_input_event(Node *p_viewport, const InputEvent &p_input_event, int p_shape) {
+void CollisionObject2D::_input_event(Node *p_viewport, const Ref<InputEvent> &p_input_event, int p_shape) {
if (get_script_instance()) {
get_script_instance()->call(SceneStringNames::get_singleton()->_input_event, p_viewport, p_input_event, p_shape);
@@ -231,9 +231,9 @@ void CollisionObject2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_pickable", "enabled"), &CollisionObject2D::set_pickable);
ClassDB::bind_method(D_METHOD("is_pickable"), &CollisionObject2D::is_pickable);
- BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::INPUT_EVENT, "event"), PropertyInfo(Variant::INT, "shape_idx")));
+ BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
- ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::INPUT_EVENT, "event"), PropertyInfo(Variant::INT, "shape_idx")));
+ ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "viewport"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::INT, "shape_idx")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
ADD_SIGNAL(MethodInfo("mouse_exited"));
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index e3dc39feae..4d4611afd1 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -70,7 +70,7 @@ protected:
void _update_pickable();
friend class Viewport;
- void _input_event(Node *p_viewport, const InputEvent &p_input_event, int p_shape);
+ void _input_event(Node *p_viewport, const Ref<InputEvent> &p_input_event, int p_shape);
void _mouse_enter();
void _mouse_exit();
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index 7712108488..f503a66208 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -148,11 +148,6 @@ void TouchScreenButton::_notification(int p_what) {
if (!get_tree()->is_editor_hint())
set_process_input(is_visible_in_tree());
- if (action.operator String() != "" && InputMap::get_singleton()->has_action(action)) {
- action_id = InputMap::get_singleton()->get_action_id(action);
- } else {
- action_id = -1;
- }
} break;
case NOTIFICATION_EXIT_TREE: {
if (is_pressed())
@@ -184,11 +179,6 @@ bool TouchScreenButton::is_pressed() const {
void TouchScreenButton::set_action(const String &p_action) {
action = p_action;
- if (action.operator String() != "" && InputMap::get_singleton()->has_action(action)) {
- action_id = InputMap::get_singleton()->get_action_id(action);
- } else {
- action_id = -1;
- }
}
String TouchScreenButton::get_action() const {
@@ -196,26 +186,32 @@ String TouchScreenButton::get_action() const {
return action;
}
-void TouchScreenButton::_input(const InputEvent &p_event) {
+void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
if (!get_tree())
return;
- if (p_event.device != 0)
+ if (p_event->get_device() != 0)
return;
if (passby_press) {
- if (p_event.type == InputEvent::SCREEN_TOUCH && !p_event.screen_touch.pressed && finger_pressed == p_event.screen_touch.index) {
+ Ref<InputEventScreenTouch> st = p_event;
+ Ref<InputEventScreenTouch> sd = p_event;
+
+ if (st.is_valid() && !st->is_pressed() && finger_pressed == st->get_index()) {
_release();
}
- if ((p_event.type == InputEvent::SCREEN_TOUCH && p_event.screen_touch.pressed) || p_event.type == InputEvent::SCREEN_DRAG) {
+ if ((st.is_valid() && st->is_pressed()) || sd.is_valid()) {
+
+ int index = st.is_valid() ? st->get_index() : sd->get_index();
+ Vector2 coord = st.is_valid() ? st->get_pos() : sd->get_pos();
- if (finger_pressed == -1 || p_event.screen_touch.index == finger_pressed) {
+ if (finger_pressed == -1 || index == finger_pressed) {
- Point2 coord = (get_global_transform_with_canvas()).affine_inverse().xform(Point2(p_event.screen_touch.x, p_event.screen_touch.y));
+ coord = (get_global_transform_with_canvas()).affine_inverse().xform(coord);
bool touched = false;
if (bitmask.is_valid()) {
@@ -233,7 +229,7 @@ void TouchScreenButton::_input(const InputEvent &p_event) {
if (touched) {
if (finger_pressed == -1) {
- _press(p_event.screen_touch.index);
+ _press(index);
}
} else {
if (finger_pressed != -1) {
@@ -245,9 +241,11 @@ void TouchScreenButton::_input(const InputEvent &p_event) {
} else {
- if (p_event.type == InputEvent::SCREEN_TOUCH) {
+ Ref<InputEventScreenTouch> st = p_event;
- if (p_event.screen_touch.pressed) {
+ if (st.is_valid()) {
+
+ if (st->is_pressed()) {
if (!is_visible_in_tree())
return;
@@ -256,7 +254,7 @@ void TouchScreenButton::_input(const InputEvent &p_event) {
if (!can_press)
return; //already fingering
- Point2 coord = (get_global_transform_with_canvas()).affine_inverse().xform(Point2(p_event.screen_touch.x, p_event.screen_touch.y));
+ Point2 coord = (get_global_transform_with_canvas()).affine_inverse().xform(st->get_pos());
Rect2 item_rect = get_item_rect();
bool touched = false;
@@ -284,10 +282,10 @@ void TouchScreenButton::_input(const InputEvent &p_event) {
}
if (touched) {
- _press(p_event.screen_touch.index);
+ _press(st->get_index());
}
} else {
- if (p_event.screen_touch.index == finger_pressed) {
+ if (st->get_index() == finger_pressed) {
_release();
}
}
@@ -299,15 +297,14 @@ void TouchScreenButton::_press(int p_finger_pressed) {
finger_pressed = p_finger_pressed;
- if (action_id != -1) {
+ if (action != StringName()) {
Input::get_singleton()->action_press(action);
- InputEvent ie;
- ie.type = InputEvent::ACTION;
- ie.ID = 0;
- ie.action.action = action_id;
- ie.action.pressed = true;
- get_tree()->input_event(ie);
+ Ref<InputEventAction> iea;
+ iea.instance();
+ iea->set_action(action);
+ iea->set_pressed(true);
+ get_tree()->input_event(iea);
}
emit_signal("pressed");
@@ -318,16 +315,16 @@ void TouchScreenButton::_release(bool p_exiting_tree) {
finger_pressed = -1;
- if (action_id != -1) {
+ if (action != StringName()) {
Input::get_singleton()->action_release(action);
if (!p_exiting_tree) {
- InputEvent ie;
- ie.type = InputEvent::ACTION;
- ie.ID = 0;
- ie.action.action = action_id;
- ie.action.pressed = false;
- get_tree()->input_event(ie);
+
+ Ref<InputEventAction> iea;
+ iea.instance();
+ iea->set_action(action);
+ iea->set_pressed(false);
+ get_tree()->input_event(iea);
}
}
@@ -419,7 +416,6 @@ void TouchScreenButton::_bind_methods() {
TouchScreenButton::TouchScreenButton() {
finger_pressed = -1;
- action_id = -1;
passby_press = false;
visibility = VISIBILITY_ALWAYS;
shape_centered = true;
diff --git a/scene/2d/screen_button.h b/scene/2d/screen_button.h
index 0cfaf681dd..e44f556c31 100644
--- a/scene/2d/screen_button.h
+++ b/scene/2d/screen_button.h
@@ -58,11 +58,10 @@ private:
StringName action;
bool passby_press;
int finger_pressed;
- int action_id;
VisibilityMode visibility;
- void _input(const InputEvent &p_Event);
+ void _input(const Ref<InputEvent> &p_Event);
void _press(int p_finger_pressed);
void _release(bool p_exiting_tree = false);
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp
deleted file mode 100644
index ffa7597113..0000000000
--- a/scene/3d/baked_light_instance.cpp
+++ /dev/null
@@ -1,1754 +0,0 @@
-/*************************************************************************/
-/* baked_light_instance.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 "baked_light_instance.h"
-#include "light.h"
-#include "math.h"
-#include "mesh_instance.h"
-#include "scene/scene_string_names.h"
-
-#define FINDMINMAX(x0, x1, x2, min, max) \
- min = max = x0; \
- if (x1 < min) min = x1; \
- if (x1 > max) max = x1; \
- if (x2 < min) min = x2; \
- if (x2 > max) max = x2;
-
-static bool planeBoxOverlap(Vector3 normal, float d, Vector3 maxbox) {
- int q;
- Vector3 vmin, vmax;
- for (q = 0; q <= 2; q++) {
- if (normal[q] > 0.0f) {
- vmin[q] = -maxbox[q];
- vmax[q] = maxbox[q];
- } else {
- vmin[q] = maxbox[q];
- vmax[q] = -maxbox[q];
- }
- }
- if (normal.dot(vmin) + d > 0.0f) return false;
- if (normal.dot(vmax) + d >= 0.0f) return true;
-
- return false;
-}
-
-/*======================== X-tests ========================*/
-#define AXISTEST_X01(a, b, fa, fb) \
- p0 = a * v0.y - b * v0.z; \
- p2 = a * v2.y - b * v2.z; \
- if (p0 < p2) { \
- min = p0; \
- max = p2; \
- } else { \
- min = p2; \
- max = p0; \
- } \
- rad = fa * boxhalfsize.y + fb * boxhalfsize.z; \
- if (min > rad || max < -rad) return false;
-
-#define AXISTEST_X2(a, b, fa, fb) \
- p0 = a * v0.y - b * v0.z; \
- p1 = a * v1.y - b * v1.z; \
- if (p0 < p1) { \
- min = p0; \
- max = p1; \
- } else { \
- min = p1; \
- max = p0; \
- } \
- rad = fa * boxhalfsize.y + fb * boxhalfsize.z; \
- if (min > rad || max < -rad) return false;
-
-/*======================== Y-tests ========================*/
-#define AXISTEST_Y02(a, b, fa, fb) \
- p0 = -a * v0.x + b * v0.z; \
- p2 = -a * v2.x + b * v2.z; \
- if (p0 < p2) { \
- min = p0; \
- max = p2; \
- } else { \
- min = p2; \
- max = p0; \
- } \
- rad = fa * boxhalfsize.x + fb * boxhalfsize.z; \
- if (min > rad || max < -rad) return false;
-
-#define AXISTEST_Y1(a, b, fa, fb) \
- p0 = -a * v0.x + b * v0.z; \
- p1 = -a * v1.x + b * v1.z; \
- if (p0 < p1) { \
- min = p0; \
- max = p1; \
- } else { \
- min = p1; \
- max = p0; \
- } \
- rad = fa * boxhalfsize.x + fb * boxhalfsize.z; \
- if (min > rad || max < -rad) return false;
-
-/*======================== Z-tests ========================*/
-
-#define AXISTEST_Z12(a, b, fa, fb) \
- p1 = a * v1.x - b * v1.y; \
- p2 = a * v2.x - b * v2.y; \
- if (p2 < p1) { \
- min = p2; \
- max = p1; \
- } else { \
- min = p1; \
- max = p2; \
- } \
- rad = fa * boxhalfsize.x + fb * boxhalfsize.y; \
- if (min > rad || max < -rad) return false;
-
-#define AXISTEST_Z0(a, b, fa, fb) \
- p0 = a * v0.x - b * v0.y; \
- p1 = a * v1.x - b * v1.y; \
- if (p0 < p1) { \
- min = p0; \
- max = p1; \
- } else { \
- min = p1; \
- max = p0; \
- } \
- rad = fa * boxhalfsize.x + fb * boxhalfsize.y; \
- if (min > rad || max < -rad) return false;
-
-static bool fast_tri_box_overlap(const Vector3 &boxcenter, const Vector3 boxhalfsize, const Vector3 *triverts) {
-
- /* use separating axis theorem to test overlap between triangle and box */
- /* need to test for overlap in these directions: */
- /* 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle */
- /* we do not even need to test these) */
- /* 2) normal of the triangle */
- /* 3) crossproduct(edge from tri, {x,y,z}-directin) */
- /* this gives 3x3=9 more tests */
- Vector3 v0, v1, v2;
- float min, max, d, p0, p1, p2, rad, fex, fey, fez;
- Vector3 normal, e0, e1, e2;
-
- /* This is the fastest branch on Sun */
- /* move everything so that the boxcenter is in (0,0,0) */
-
- v0 = triverts[0] - boxcenter;
- v1 = triverts[1] - boxcenter;
- v2 = triverts[2] - boxcenter;
-
- /* compute triangle edges */
- e0 = v1 - v0; /* tri edge 0 */
- e1 = v2 - v1; /* tri edge 1 */
- e2 = v0 - v2; /* tri edge 2 */
-
- /* Bullet 3: */
- /* test the 9 tests first (this was faster) */
- fex = Math::abs(e0.x);
- fey = Math::abs(e0.y);
- fez = Math::abs(e0.z);
- AXISTEST_X01(e0.z, e0.y, fez, fey);
- AXISTEST_Y02(e0.z, e0.x, fez, fex);
- AXISTEST_Z12(e0.y, e0.x, fey, fex);
-
- fex = Math::abs(e1.x);
- fey = Math::abs(e1.y);
- fez = Math::abs(e1.z);
- AXISTEST_X01(e1.z, e1.y, fez, fey);
- AXISTEST_Y02(e1.z, e1.x, fez, fex);
- AXISTEST_Z0(e1.y, e1.x, fey, fex);
-
- fex = Math::abs(e2.x);
- fey = Math::abs(e2.y);
- fez = Math::abs(e2.z);
- AXISTEST_X2(e2.z, e2.y, fez, fey);
- AXISTEST_Y1(e2.z, e2.x, fez, fex);
- AXISTEST_Z12(e2.y, e2.x, fey, fex);
-
- /* Bullet 1: */
- /* first test overlap in the {x,y,z}-directions */
- /* find min, max of the triangle each direction, and test for overlap in */
- /* that direction -- this is equivalent to testing a minimal AABB around */
- /* the triangle against the AABB */
-
- /* test in X-direction */
- FINDMINMAX(v0.x, v1.x, v2.x, min, max);
- if (min > boxhalfsize.x || max < -boxhalfsize.x) return false;
-
- /* test in Y-direction */
- FINDMINMAX(v0.y, v1.y, v2.y, min, max);
- if (min > boxhalfsize.y || max < -boxhalfsize.y) return false;
-
- /* test in Z-direction */
- FINDMINMAX(v0.z, v1.z, v2.z, min, max);
- if (min > boxhalfsize.z || max < -boxhalfsize.z) return false;
-
- /* Bullet 2: */
- /* test if the box intersects the plane of the triangle */
- /* compute plane equation of triangle: normal*x+d=0 */
- normal = e0.cross(e1);
- d = -normal.dot(v0); /* plane eq: normal.x+d=0 */
- if (!planeBoxOverlap(normal, d, boxhalfsize)) return false;
-
- return true; /* box and triangle overlaps */
-}
-
-Vector<Color> BakedLight::_get_bake_texture(Image &p_image, const Color &p_color) {
-
- Vector<Color> ret;
-
- if (p_image.empty()) {
-
- ret.resize(bake_texture_size * bake_texture_size);
- for (int i = 0; i < bake_texture_size * bake_texture_size; i++) {
- ret[i] = p_color;
- }
-
- return ret;
- }
-
- p_image.convert(Image::FORMAT_RGBA8);
- p_image.resize(bake_texture_size, bake_texture_size, Image::INTERPOLATE_CUBIC);
-
- PoolVector<uint8_t>::Read r = p_image.get_data().read();
- ret.resize(bake_texture_size * bake_texture_size);
-
- for (int i = 0; i < bake_texture_size * bake_texture_size; i++) {
- Color c;
- c.r = r[i * 4 + 0] / 255.0;
- c.g = r[i * 4 + 1] / 255.0;
- c.b = r[i * 4 + 2] / 255.0;
- c.a = r[i * 4 + 3] / 255.0;
- ret[i] = c;
- }
-
- return ret;
-}
-
-BakedLight::MaterialCache BakedLight::_get_material_cache(Ref<Material> p_material) {
-
- //this way of obtaining materials is inaccurate and also does not support some compressed formats very well
- Ref<SpatialMaterial> mat = p_material;
-
- Ref<Material> material = mat; //hack for now
-
- if (material_cache.has(material)) {
- return material_cache[material];
- }
-
- MaterialCache mc;
-
- if (mat.is_valid()) {
-
- Ref<ImageTexture> albedo_tex = mat->get_texture(SpatialMaterial::TEXTURE_ALBEDO);
-
- Image img_albedo;
- if (albedo_tex.is_valid()) {
-
- img_albedo = albedo_tex->get_data();
- }
-
- mc.albedo = _get_bake_texture(img_albedo, mat->get_albedo());
-
- Ref<ImageTexture> emission_tex = mat->get_texture(SpatialMaterial::TEXTURE_EMISSION);
-
- Color emission_col = mat->get_emission();
- emission_col.r *= mat->get_emission_energy();
- emission_col.g *= mat->get_emission_energy();
- emission_col.b *= mat->get_emission_energy();
-
- Image img_emission;
-
- if (emission_tex.is_valid()) {
-
- img_emission = emission_tex->get_data();
- }
-
- mc.emission = _get_bake_texture(img_emission, emission_col);
-
- } else {
- Image empty;
-
- mc.albedo = _get_bake_texture(empty, Color(0.7, 0.7, 0.7));
- mc.emission = _get_bake_texture(empty, Color(0, 0, 0));
- }
-
- material_cache[p_material] = mc;
- return mc;
-}
-
-static _FORCE_INLINE_ Vector2 get_uv(const Vector3 &p_pos, const Vector3 *p_vtx, const Vector2 *p_uv) {
-
- if (p_pos.distance_squared_to(p_vtx[0]) < CMP_EPSILON2)
- return p_uv[0];
- if (p_pos.distance_squared_to(p_vtx[1]) < CMP_EPSILON2)
- return p_uv[1];
- if (p_pos.distance_squared_to(p_vtx[2]) < CMP_EPSILON2)
- return p_uv[2];
-
- Vector3 v0 = p_vtx[1] - p_vtx[0];
- Vector3 v1 = p_vtx[2] - p_vtx[0];
- Vector3 v2 = p_pos - p_vtx[0];
-
- float d00 = v0.dot(v0);
- float d01 = v0.dot(v1);
- float d11 = v1.dot(v1);
- float d20 = v2.dot(v0);
- float d21 = v2.dot(v1);
- float denom = (d00 * d11 - d01 * d01);
- if (denom == 0)
- return p_uv[0];
- float v = (d11 * d20 - d01 * d21) / denom;
- float w = (d00 * d21 - d01 * d20) / denom;
- float u = 1.0f - v - w;
-
- return p_uv[0] * u + p_uv[1] * v + p_uv[2] * w;
-}
-
-void BakedLight::_plot_face(int p_idx, int p_level, const Vector3 *p_vtx, const Vector2 *p_uv, const MaterialCache &p_material, const Rect3 &p_aabb) {
-
- if (p_level == cell_subdiv - 1) {
- //plot the face by guessing it's albedo and emission value
-
- //find best axis to map to, for scanning values
- int closest_axis;
- float closest_dot;
-
- Vector3 normal = Plane(p_vtx[0], p_vtx[1], p_vtx[2]).normal;
-
- for (int i = 0; i < 3; i++) {
-
- Vector3 axis;
- axis[i] = 1.0;
- float dot = ABS(normal.dot(axis));
- if (i == 0 || dot > closest_dot) {
- closest_axis = i;
- closest_dot = dot;
- }
- }
-
- Vector3 axis;
- axis[closest_axis] = 1.0;
- Vector3 t1;
- t1[(closest_axis + 1) % 3] = 1.0;
- Vector3 t2;
- t2[(closest_axis + 2) % 3] = 1.0;
-
- t1 *= p_aabb.size[(closest_axis + 1) % 3] / float(color_scan_cell_width);
- t2 *= p_aabb.size[(closest_axis + 2) % 3] / float(color_scan_cell_width);
-
- Color albedo_accum;
- Color emission_accum;
- float alpha = 0.0;
-
- //map to a grid average in the best axis for this face
- for (int i = 0; i < color_scan_cell_width; i++) {
-
- Vector3 ofs_i = float(i) * t1;
-
- for (int j = 0; j < color_scan_cell_width; j++) {
-
- Vector3 ofs_j = float(j) * t2;
-
- Vector3 from = p_aabb.pos + ofs_i + ofs_j;
- Vector3 to = from + t1 + t2 + axis * p_aabb.size[closest_axis];
- Vector3 half = (to - from) * 0.5;
-
- //is in this cell?
- if (!fast_tri_box_overlap(from + half, half, p_vtx)) {
- continue; //face does not span this cell
- }
-
- //go from -size to +size*2 to avoid skipping collisions
- Vector3 ray_from = from + (t1 + t2) * 0.5 - axis * p_aabb.size[closest_axis];
- Vector3 ray_to = ray_from + axis * p_aabb.size[closest_axis] * 2;
-
- Vector3 intersection;
-
- if (!Geometry::ray_intersects_triangle(ray_from, ray_to, p_vtx[0], p_vtx[1], p_vtx[2], &intersection)) {
- //no intersect? look in edges
-
- float closest_dist = 1e20;
- for (int j = 0; j < 3; j++) {
- Vector3 c;
- Vector3 inters;
- Geometry::get_closest_points_between_segments(p_vtx[j], p_vtx[(j + 1) % 3], ray_from, ray_to, inters, c);
- float d = c.distance_to(intersection);
- if (j == 0 || d < closest_dist) {
- closest_dist = d;
- intersection = inters;
- }
- }
- }
-
- Vector2 uv = get_uv(intersection, p_vtx, p_uv);
-
- int uv_x = CLAMP(Math::fposmod(uv.x, 1.0f) * bake_texture_size, 0, bake_texture_size - 1);
- int uv_y = CLAMP(Math::fposmod(uv.y, 1.0f) * bake_texture_size, 0, bake_texture_size - 1);
-
- int ofs = uv_y * bake_texture_size + uv_x;
- albedo_accum.r += p_material.albedo[ofs].r;
- albedo_accum.g += p_material.albedo[ofs].g;
- albedo_accum.b += p_material.albedo[ofs].b;
- albedo_accum.a += p_material.albedo[ofs].a;
-
- emission_accum.r += p_material.emission[ofs].r;
- emission_accum.g += p_material.emission[ofs].g;
- emission_accum.b += p_material.emission[ofs].b;
- alpha += 1.0;
- }
- }
-
- if (alpha == 0) {
- //could not in any way get texture information.. so use closest point to center
-
- Face3 f(p_vtx[0], p_vtx[1], p_vtx[2]);
- Vector3 inters = f.get_closest_point_to(p_aabb.pos + p_aabb.size * 0.5);
-
- Vector2 uv = get_uv(inters, p_vtx, p_uv);
-
- int uv_x = CLAMP(Math::fposmod(uv.x, 1.0f) * bake_texture_size, 0, bake_texture_size - 1);
- int uv_y = CLAMP(Math::fposmod(uv.y, 1.0f) * bake_texture_size, 0, bake_texture_size - 1);
-
- int ofs = uv_y * bake_texture_size + uv_x;
-
- alpha = 1.0 / (color_scan_cell_width * color_scan_cell_width);
-
- albedo_accum.r = p_material.albedo[ofs].r * alpha;
- albedo_accum.g = p_material.albedo[ofs].g * alpha;
- albedo_accum.b = p_material.albedo[ofs].b * alpha;
- albedo_accum.a = p_material.albedo[ofs].a * alpha;
-
- emission_accum.r = p_material.emission[ofs].r * alpha;
- emission_accum.g = p_material.emission[ofs].g * alpha;
- emission_accum.b = p_material.emission[ofs].b * alpha;
-
- zero_alphas++;
- } else {
-
- float accdiv = 1.0 / (color_scan_cell_width * color_scan_cell_width);
- alpha *= accdiv;
-
- albedo_accum.r *= accdiv;
- albedo_accum.g *= accdiv;
- albedo_accum.b *= accdiv;
- albedo_accum.a *= accdiv;
-
- emission_accum.r *= accdiv;
- emission_accum.g *= accdiv;
- emission_accum.b *= accdiv;
- }
-
- //put this temporarily here, corrected in a later step
- bake_cells_write[p_idx].albedo[0] += albedo_accum.r;
- bake_cells_write[p_idx].albedo[1] += albedo_accum.g;
- bake_cells_write[p_idx].albedo[2] += albedo_accum.b;
- bake_cells_write[p_idx].light[0] += emission_accum.r;
- bake_cells_write[p_idx].light[1] += emission_accum.g;
- bake_cells_write[p_idx].light[2] += emission_accum.b;
- bake_cells_write[p_idx].alpha += alpha;
-
- static const Vector3 side_normals[6] = {
- Vector3(-1, 0, 0),
- Vector3(1, 0, 0),
- Vector3(0, -1, 0),
- Vector3(0, 1, 0),
- Vector3(0, 0, -1),
- Vector3(0, 0, 1),
- };
-
- for (int i = 0; i < 6; i++) {
- if (normal.dot(side_normals[i]) > CMP_EPSILON) {
- bake_cells_write[p_idx].used_sides |= (1 << i);
- }
- }
-
- } else {
- //go down
- for (int i = 0; i < 8; i++) {
-
- Rect3 aabb = p_aabb;
- aabb.size *= 0.5;
-
- if (i & 1)
- aabb.pos.x += aabb.size.x;
- if (i & 2)
- aabb.pos.y += aabb.size.y;
- if (i & 4)
- aabb.pos.z += aabb.size.z;
-
- {
- Rect3 test_aabb = aabb;
- //test_aabb.grow_by(test_aabb.get_longest_axis_size()*0.05); //grow a bit to avoid numerical error in real-time
- Vector3 qsize = test_aabb.size * 0.5; //quarter size, for fast aabb test
-
- if (!fast_tri_box_overlap(test_aabb.pos + qsize, qsize, p_vtx)) {
- //if (!Face3(p_vtx[0],p_vtx[1],p_vtx[2]).intersects_aabb2(aabb)) {
- //does not fit in child, go on
- continue;
- }
- }
-
- if (bake_cells_write[p_idx].childs[i] == CHILD_EMPTY) {
- //sub cell must be created
-
- if (bake_cells_used == (1 << bake_cells_alloc)) {
- //exhausted cells, creating more space
- bake_cells_alloc++;
- bake_cells_write = PoolVector<BakeCell>::Write();
- bake_cells.resize(1 << bake_cells_alloc);
- bake_cells_write = bake_cells.write();
- }
-
- bake_cells_write[p_idx].childs[i] = bake_cells_used;
- bake_cells_level_used[p_level + 1]++;
- bake_cells_used++;
- }
-
- _plot_face(bake_cells_write[p_idx].childs[i], p_level + 1, p_vtx, p_uv, p_material, aabb);
- }
- }
-}
-
-void BakedLight::_fixup_plot(int p_idx, int p_level, int p_x, int p_y, int p_z) {
-
- if (p_level == cell_subdiv - 1) {
-
- float alpha = bake_cells_write[p_idx].alpha;
-
- bake_cells_write[p_idx].albedo[0] /= alpha;
- bake_cells_write[p_idx].albedo[1] /= alpha;
- bake_cells_write[p_idx].albedo[2] /= alpha;
-
- //transfer emission to light
- bake_cells_write[p_idx].light[0] /= alpha;
- bake_cells_write[p_idx].light[1] /= alpha;
- bake_cells_write[p_idx].light[2] /= alpha;
-
- bake_cells_write[p_idx].alpha = 1.0;
-
- //remove neighbours from used sides
-
- for (int n = 0; n < 6; n++) {
-
- int ofs[3] = { 0, 0, 0 };
-
- ofs[n / 2] = (n & 1) ? 1 : -1;
-
- //convert to x,y,z on this level
- int x = p_x;
- int y = p_y;
- int z = p_z;
-
- x += ofs[0];
- y += ofs[1];
- z += ofs[2];
-
- int ofs_x = 0;
- int ofs_y = 0;
- int ofs_z = 0;
- int size = 1 << p_level;
- int half = size / 2;
-
- if (x < 0 || x >= size || y < 0 || y >= size || z < 0 || z >= size) {
- //neighbour is out, can't use it
- bake_cells_write[p_idx].used_sides &= ~(1 << uint32_t(n));
- continue;
- }
-
- uint32_t neighbour = 0;
-
- for (int i = 0; i < cell_subdiv - 1; i++) {
-
- BakeCell *bc = &bake_cells_write[neighbour];
-
- int child = 0;
- if (x >= ofs_x + half) {
- child |= 1;
- ofs_x += half;
- }
- if (y >= ofs_y + half) {
- child |= 2;
- ofs_y += half;
- }
- if (z >= ofs_z + half) {
- child |= 4;
- ofs_z += half;
- }
-
- neighbour = bc->childs[child];
- if (neighbour == CHILD_EMPTY) {
- break;
- }
-
- half >>= 1;
- }
-
- if (neighbour != CHILD_EMPTY) {
- bake_cells_write[p_idx].used_sides &= ~(1 << uint32_t(n));
- }
- }
- } else {
-
- //go down
-
- float alpha_average = 0;
- int half = cells_per_axis >> (p_level + 1);
- for (int i = 0; i < 8; i++) {
-
- uint32_t child = bake_cells_write[p_idx].childs[i];
-
- if (child == CHILD_EMPTY)
- continue;
-
- int nx = p_x;
- int ny = p_y;
- int nz = p_z;
-
- if (i & 1)
- nx += half;
- if (i & 2)
- ny += half;
- if (i & 4)
- nz += half;
-
- _fixup_plot(child, p_level + 1, nx, ny, nz);
- alpha_average += bake_cells_write[child].alpha;
- }
-
- bake_cells_write[p_idx].alpha = alpha_average / 8.0;
- bake_cells_write[p_idx].light[0] = 0;
- bake_cells_write[p_idx].light[1] = 0;
- bake_cells_write[p_idx].light[2] = 0;
- bake_cells_write[p_idx].albedo[0] = 0;
- bake_cells_write[p_idx].albedo[1] = 0;
- bake_cells_write[p_idx].albedo[2] = 0;
- }
-
- //clean up light
- bake_cells_write[p_idx].light_pass = 0;
- //find neighbours
-}
-
-void BakedLight::_bake_add_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh) {
-
- for (int i = 0; i < p_mesh->get_surface_count(); i++) {
-
- if (p_mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES)
- continue; //only triangles
-
- MaterialCache material = _get_material_cache(p_mesh->surface_get_material(i));
-
- Array a = p_mesh->surface_get_arrays(i);
-
- PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
- PoolVector<Vector3>::Read vr = vertices.read();
- PoolVector<Vector2> uv = a[Mesh::ARRAY_TEX_UV];
- PoolVector<Vector2>::Read uvr;
- PoolVector<int> index = a[Mesh::ARRAY_INDEX];
-
- bool read_uv = false;
-
- if (uv.size()) {
-
- uvr = uv.read();
- read_uv = true;
- }
-
- if (index.size()) {
-
- int facecount = index.size() / 3;
- PoolVector<int>::Read ir = index.read();
-
- for (int j = 0; j < facecount; j++) {
-
- Vector3 vtxs[3];
- Vector2 uvs[3];
-
- for (int k = 0; k < 3; k++) {
- vtxs[k] = p_xform.xform(vr[ir[j * 3 + k]]);
- }
-
- if (read_uv) {
- for (int k = 0; k < 3; k++) {
- uvs[k] = uvr[ir[j * 3 + k]];
- }
- }
-
- //plot face
- _plot_face(0, 0, vtxs, uvs, material, bounds);
- }
-
- } else {
-
- int facecount = vertices.size() / 3;
-
- for (int j = 0; j < facecount; j++) {
-
- Vector3 vtxs[3];
- Vector2 uvs[3];
-
- for (int k = 0; k < 3; k++) {
- vtxs[k] = p_xform.xform(vr[j * 3 + k]);
- }
-
- if (read_uv) {
- for (int k = 0; k < 3; k++) {
- uvs[k] = uvr[j * 3 + k];
- }
- }
-
- //plot face
- _plot_face(0, 0, vtxs, uvs, material, bounds);
- }
- }
- }
-}
-
-void BakedLight::_bake_add_to_aabb(const Transform &p_xform, Ref<Mesh> &p_mesh, bool &first) {
-
- for (int i = 0; i < p_mesh->get_surface_count(); i++) {
-
- if (p_mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES)
- continue; //only triangles
-
- Array a = p_mesh->surface_get_arrays(i);
- PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
- int vc = vertices.size();
- PoolVector<Vector3>::Read vr = vertices.read();
-
- if (first) {
- bounds.pos = p_xform.xform(vr[0]);
- first = false;
- }
-
- for (int j = 0; j < vc; j++) {
- bounds.expand_to(p_xform.xform(vr[j]));
- }
- }
-}
-
-void BakedLight::bake() {
-
- bake_cells_alloc = 16;
- bake_cells.resize(1 << bake_cells_alloc);
- bake_cells_used = 1;
- cells_per_axis = (1 << (cell_subdiv - 1));
- zero_alphas = 0;
-
- bool aabb_first = true;
- print_line("Generating AABB");
-
- bake_cells_level_used.resize(cell_subdiv);
- for (int i = 0; i < cell_subdiv; i++) {
- bake_cells_level_used[i] = 0;
- }
-
- int count = 0;
- for (Set<GeometryInstance *>::Element *E = geometries.front(); E; E = E->next()) {
-
- print_line("aabb geom " + itos(count) + "/" + itos(geometries.size()));
-
- GeometryInstance *geom = E->get();
-
- if (geom->cast_to<MeshInstance>()) {
-
- MeshInstance *mesh_instance = geom->cast_to<MeshInstance>();
- Ref<Mesh> mesh = mesh_instance->get_mesh();
- if (mesh.is_valid()) {
-
- _bake_add_to_aabb(geom->get_relative_transform(this), mesh, aabb_first);
- }
- }
- count++;
- }
-
- print_line("AABB: " + bounds);
- ERR_FAIL_COND(aabb_first);
-
- bake_cells_write = bake_cells.write();
- count = 0;
-
- for (Set<GeometryInstance *>::Element *E = geometries.front(); E; E = E->next()) {
-
- GeometryInstance *geom = E->get();
- print_line("plot geom " + itos(count) + "/" + itos(geometries.size()));
-
- if (geom->cast_to<MeshInstance>()) {
-
- MeshInstance *mesh_instance = geom->cast_to<MeshInstance>();
- Ref<Mesh> mesh = mesh_instance->get_mesh();
- if (mesh.is_valid()) {
-
- _bake_add_mesh(geom->get_relative_transform(this), mesh);
- }
- }
-
- count++;
- }
-
- _fixup_plot(0, 0, 0, 0, 0);
-
- bake_cells_write = PoolVector<BakeCell>::Write();
-
- bake_cells.resize(bake_cells_used);
-
- print_line("total bake cells used: " + itos(bake_cells_used));
- for (int i = 0; i < cell_subdiv; i++) {
- print_line("level " + itos(i) + ": " + itos(bake_cells_level_used[i]));
- }
- print_line("zero alphas: " + itos(zero_alphas));
-}
-
-void BakedLight::_bake_directional(int p_idx, int p_level, int p_x, int p_y, int p_z, const Vector3 &p_dir, const Color &p_color, int p_sign) {
-
- if (p_level == cell_subdiv - 1) {
-
- Vector3 end;
- end.x = float(p_x + 0.5) / cells_per_axis;
- end.y = float(p_y + 0.5) / cells_per_axis;
- end.z = float(p_z + 0.5) / cells_per_axis;
-
- end = bounds.pos + bounds.size * end;
-
- float max_ray_len = (bounds.size).length() * 1.2;
-
- Vector3 begin = end + max_ray_len * -p_dir;
-
- //clip begin
-
- for (int i = 0; i < 3; i++) {
-
- if (ABS(p_dir[i]) < CMP_EPSILON) {
- continue; // parallel to axis, don't clip
- }
-
- Plane p;
- p.normal[i] = 1.0;
- p.d = bounds.pos[i];
- if (p_dir[i] < 0) {
- p.d += bounds.size[i];
- }
-
- Vector3 inters;
- if (p.intersects_segment(end, begin, &inters)) {
- begin = inters;
- }
- }
-
- int idx = _plot_ray(begin, end);
-
- if (idx >= 0 && light_pass != bake_cells_write[idx].light_pass) {
- //hit something, add or remove light to it
-
- Color albedo = Color(bake_cells_write[idx].albedo[0], bake_cells_write[idx].albedo[1], bake_cells_write[idx].albedo[2]);
- bake_cells_write[idx].light[0] += albedo.r * p_color.r * p_sign;
- bake_cells_write[idx].light[1] += albedo.g * p_color.g * p_sign;
- bake_cells_write[idx].light[2] += albedo.b * p_color.b * p_sign;
- bake_cells_write[idx].light_pass = light_pass;
- }
-
- } else {
-
- int half = cells_per_axis >> (p_level + 1);
-
- //go down
- for (int i = 0; i < 8; i++) {
-
- uint32_t child = bake_cells_write[p_idx].childs[i];
-
- if (child == CHILD_EMPTY)
- continue;
-
- int nx = p_x;
- int ny = p_y;
- int nz = p_z;
-
- if (i & 1)
- nx += half;
- if (i & 2)
- ny += half;
- if (i & 4)
- nz += half;
-
- _bake_directional(child, p_level + 1, nx, ny, nz, p_dir, p_color, p_sign);
- }
- }
-}
-
-void BakedLight::_bake_light(Light *p_light) {
-
- if (p_light->cast_to<DirectionalLight>()) {
-
- DirectionalLight *dl = p_light->cast_to<DirectionalLight>();
-
- Transform rel_xf = dl->get_relative_transform(this);
-
- Vector3 light_dir = -rel_xf.basis.get_axis(2);
-
- Color color = dl->get_color();
- float nrg = dl->get_param(Light::PARAM_ENERGY);
- color.r *= nrg;
- color.g *= nrg;
- color.b *= nrg;
-
- light_pass++;
- _bake_directional(0, 0, 0, 0, 0, light_dir, color, 1);
- }
-}
-
-void BakedLight::_upscale_light(int p_idx, int p_level) {
-
- //go down
-
- float light_accum[3] = { 0, 0, 0 };
- float alpha_accum = 0;
-
- bool check_children = p_level < (cell_subdiv - 2);
-
- for (int i = 0; i < 8; i++) {
-
- uint32_t child = bake_cells_write[p_idx].childs[i];
-
- if (child == CHILD_EMPTY)
- continue;
-
- if (check_children) {
- _upscale_light(child, p_level + 1);
- }
-
- light_accum[0] += bake_cells_write[child].light[0];
- light_accum[1] += bake_cells_write[child].light[1];
- light_accum[2] += bake_cells_write[child].light[2];
- alpha_accum += bake_cells_write[child].alpha;
- }
-
- bake_cells_write[p_idx].light[0] = light_accum[0] / 8.0;
- bake_cells_write[p_idx].light[1] = light_accum[1] / 8.0;
- bake_cells_write[p_idx].light[2] = light_accum[2] / 8.0;
- bake_cells_write[p_idx].alpha = alpha_accum / 8.0;
-}
-
-void BakedLight::bake_lights() {
-
- ERR_FAIL_COND(bake_cells.size() == 0);
-
- bake_cells_write = bake_cells.write();
-
- for (Set<Light *>::Element *E = lights.front(); E; E = E->next()) {
-
- _bake_light(E->get());
- }
-
- _upscale_light(0, 0);
-
- bake_cells_write = PoolVector<BakeCell>::Write();
-}
-
-Color BakedLight::_cone_trace(const Vector3 &p_from, const Vector3 &p_dir, float p_half_angle) {
-
- Color color(0, 0, 0, 0);
- float tha = Math::tan(p_half_angle); //tan half angle
- Vector3 from = (p_from - bounds.pos) / bounds.size; //convert to 0..1
- from /= cells_per_axis; //convert to voxels of size 1
- Vector3 dir = (p_dir / bounds.size).normalized();
-
- float max_dist = Vector3(cells_per_axis, cells_per_axis, cells_per_axis).length();
-
- float dist = 1.0;
- // self occlusion in flat surfaces
-
- float alpha = 0;
-
- while (dist < max_dist && alpha < 0.95) {
-
-#if 0
- // smallest sample diameter possible is the voxel size
- float diameter = MAX(1.0, 2.0 * tha * dist);
- float lod = log2(diameter);
-
- Vector3 sample_pos = from + dist * dir;
-
-
- Color samples_base[2][8]={{Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0)},
- {Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0),Color(0,0,0,0)}};
-
- float levelf = Math::fposmod(lod,1.0);
- float fx = Math::fposmod(sample_pos.x,1.0);
- float fy = Math::fposmod(sample_pos.y,1.0);
- float fz = Math::fposmod(sample_pos.z,1.0);
-
- for(int l=0;l<2;l++){
-
- int bx = Math::floor(sample_pos.x);
- int by = Math::floor(sample_pos.y);
- int bz = Math::floor(sample_pos.z);
-
- int lodn=int(Math::floor(lod))-l;
-
- bx>>=lodn;
- by>>=lodn;
- bz>>=lodn;
-
- int limit = MAX(0,cell_subdiv-lodn-1);
-
- for(int c=0;c<8;c++) {
-
- int x = bx;
- int y = by;
- int z = bz;
-
- if (c&1) {
- x+=1;
- }
- if (c&2) {
- y+=1;
- }
- if (c&4) {
- z+=1;
- }
-
- int ofs_x=0;
- int ofs_y=0;
- int ofs_z=0;
- int size = cells_per_axis>>lodn;
- int half=size/2;
-
- bool outside=x<0 || x>=size || y<0 || y>=size || z<0 || z>=size;
-
- if (outside)
- continue;
-
-
- uint32_t cell=0;
-
- for(int i=0;i<limit;i++) {
-
- BakeCell *bc = &bake_cells_write[cell];
-
- int child = 0;
- if (x >= ofs_x + half) {
- child|=1;
- ofs_x+=half;
- }
- if (y >= ofs_y + half) {
- child|=2;
- ofs_y+=half;
- }
- if (z >= ofs_z + half) {
- child|=4;
- ofs_z+=half;
- }
-
- cell = bc->childs[child];
- if (cell==CHILD_EMPTY)
- break;
-
- half>>=1;
- }
-
- if (cell!=CHILD_EMPTY) {
-
- samples_base[l][c].r=bake_cells_write[cell].light[0];
- samples_base[l][c].g=bake_cells_write[cell].light[1];
- samples_base[l][c].b=bake_cells_write[cell].light[2];
- samples_base[l][c].a=bake_cells_write[cell].alpha;
- }
-
- }
-
-
- }
-
- Color m0x0 = samples_base[0][0].linear_interpolate(samples_base[0][1],fx);
- Color m0x1 = samples_base[0][2].linear_interpolate(samples_base[0][3],fx);
- Color m0y0 = m0x0.linear_interpolate(m0x1,fy);
- m0x0 = samples_base[0][4].linear_interpolate(samples_base[0][5],fx);
- m0x1 = samples_base[0][6].linear_interpolate(samples_base[0][7],fx);
- Color m0y1 = m0x0.linear_interpolate(m0x1,fy);
- Color m0z = m0y0.linear_interpolate(m0y1,fz);
-
- Color m1x0 = samples_base[1][0].linear_interpolate(samples_base[1][1],fx);
- Color m1x1 = samples_base[1][2].linear_interpolate(samples_base[1][3],fx);
- Color m1y0 = m1x0.linear_interpolate(m1x1,fy);
- m1x0 = samples_base[1][4].linear_interpolate(samples_base[1][5],fx);
- m1x1 = samples_base[1][6].linear_interpolate(samples_base[1][7],fx);
- Color m1y1 = m1x0.linear_interpolate(m1x1,fy);
- Color m1z = m1y0.linear_interpolate(m1y1,fz);
-
- Color m = m0z.linear_interpolate(m1z,levelf);
-#else
- float diameter = 1.0;
- Vector3 sample_pos = from + dist * dir;
-
- Color m(0, 0, 0, 0);
- {
- int x = Math::floor(sample_pos.x);
- int y = Math::floor(sample_pos.y);
- int z = Math::floor(sample_pos.z);
-
- int ofs_x = 0;
- int ofs_y = 0;
- int ofs_z = 0;
- int size = cells_per_axis;
- int half = size / 2;
-
- bool outside = x < 0 || x >= size || y < 0 || y >= size || z < 0 || z >= size;
-
- if (!outside) {
-
- uint32_t cell = 0;
-
- for (int i = 0; i < cell_subdiv - 1; i++) {
-
- BakeCell *bc = &bake_cells_write[cell];
-
- int child = 0;
- if (x >= ofs_x + half) {
- child |= 1;
- ofs_x += half;
- }
- if (y >= ofs_y + half) {
- child |= 2;
- ofs_y += half;
- }
- if (z >= ofs_z + half) {
- child |= 4;
- ofs_z += half;
- }
-
- cell = bc->childs[child];
- if (cell == CHILD_EMPTY)
- break;
-
- half >>= 1;
- }
-
- if (cell != CHILD_EMPTY) {
-
- m.r = bake_cells_write[cell].light[0];
- m.g = bake_cells_write[cell].light[1];
- m.b = bake_cells_write[cell].light[2];
- m.a = bake_cells_write[cell].alpha;
- }
- }
- }
-
-#endif
- // front-to-back compositing
- float a = (1.0 - alpha);
- color.r += a * m.r;
- color.g += a * m.g;
- color.b += a * m.b;
- alpha += a * m.a;
- //occlusion += a * voxelColor.a;
- //occlusion += (a * voxelColor.a) / (1.0 + 0.03 * diameter);
- dist += diameter * 0.5; // smoother
- //dist += diameter; // faster but misses more voxels
- }
-
- return color;
-}
-
-void BakedLight::_bake_radiance(int p_idx, int p_level, int p_x, int p_y, int p_z) {
-
- if (p_level == cell_subdiv - 1) {
-
- const int NUM_CONES = 6;
- Vector3 cone_directions[6] = {
- Vector3(1, 0, 0),
- Vector3(0.5, 0.866025, 0),
- Vector3(0.5, 0.267617, 0.823639),
- Vector3(0.5, -0.700629, 0.509037),
- Vector3(0.5, -0.700629, -0.509037),
- Vector3(0.5, 0.267617, -0.823639)
- };
- float coneWeights[6] = { 0.25, 0.15, 0.15, 0.15, 0.15, 0.15 };
-
- Vector3 pos = (Vector3(p_x, p_y, p_z) / float(cells_per_axis)) * bounds.size + bounds.pos;
- Vector3 voxel_size = bounds.size / float(cells_per_axis);
- pos += voxel_size * 0.5;
-
- Color accum;
-
- bake_cells_write[p_idx].light[0] = 0;
- bake_cells_write[p_idx].light[1] = 0;
- bake_cells_write[p_idx].light[2] = 0;
-
- int freepix = 0;
- for (int i = 0; i < 6; i++) {
-
- if (!(bake_cells_write[p_idx].used_sides & (1 << i)))
- continue;
-
- if ((i & 1) == 0)
- bake_cells_write[p_idx].light[i / 2] = 1.0;
- freepix++;
- continue;
-
- int ofs = i / 2;
-
- Vector3 dir;
- if ((i & 1) == 0)
- dir[ofs] = 1.0;
- else
- dir[ofs] = -1.0;
-
- for (int j = 0; j < 1; j++) {
-
- Vector3 cone_dir;
- cone_dir.x = cone_directions[j][(ofs + 0) % 3];
- cone_dir.y = cone_directions[j][(ofs + 1) % 3];
- cone_dir.z = cone_directions[j][(ofs + 2) % 3];
-
- cone_dir[ofs] *= dir[ofs];
-
- Color res = _cone_trace(pos + dir * voxel_size, cone_dir, Math::deg2rad(29.9849));
- accum.r += res.r; //*coneWeights[j];
- accum.g += res.g; //*coneWeights[j];
- accum.b += res.b; //*coneWeights[j];
- }
- }
-#if 0
- if (freepix==0) {
- bake_cells_write[p_idx].light[0]=0;
- bake_cells_write[p_idx].light[1]=0;
- bake_cells_write[p_idx].light[2]=0;
- }
-
- if (freepix==1) {
- bake_cells_write[p_idx].light[0]=1;
- bake_cells_write[p_idx].light[1]=0;
- bake_cells_write[p_idx].light[2]=0;
- }
-
- if (freepix==2) {
- bake_cells_write[p_idx].light[0]=0;
- bake_cells_write[p_idx].light[1]=1;
- bake_cells_write[p_idx].light[2]=0;
- }
-
- if (freepix==3) {
- bake_cells_write[p_idx].light[0]=1;
- bake_cells_write[p_idx].light[1]=1;
- bake_cells_write[p_idx].light[2]=0;
- }
-
- if (freepix==4) {
- bake_cells_write[p_idx].light[0]=0;
- bake_cells_write[p_idx].light[1]=0;
- bake_cells_write[p_idx].light[2]=1;
- }
-
- if (freepix==5) {
- bake_cells_write[p_idx].light[0]=1;
- bake_cells_write[p_idx].light[1]=0;
- bake_cells_write[p_idx].light[2]=1;
- }
-
- if (freepix==6) {
- bake_cells_write[p_idx].light[0]=0;
- bake_cells_write[p_idx].light[0]=1;
- bake_cells_write[p_idx].light[0]=1;
- }
-#endif
- //bake_cells_write[p_idx].radiance[0]=accum.r;
- //bake_cells_write[p_idx].radiance[1]=accum.g;
- //bake_cells_write[p_idx].radiance[2]=accum.b;
-
- } else {
-
- int half = cells_per_axis >> (p_level + 1);
-
- //go down
- for (int i = 0; i < 8; i++) {
-
- uint32_t child = bake_cells_write[p_idx].childs[i];
-
- if (child == CHILD_EMPTY)
- continue;
-
- int nx = p_x;
- int ny = p_y;
- int nz = p_z;
-
- if (i & 1)
- nx += half;
- if (i & 2)
- ny += half;
- if (i & 4)
- nz += half;
-
- _bake_radiance(child, p_level + 1, nx, ny, nz);
- }
- }
-}
-
-void BakedLight::bake_radiance() {
-
- ERR_FAIL_COND(bake_cells.size() == 0);
-
- bake_cells_write = bake_cells.write();
-
- _bake_radiance(0, 0, 0, 0, 0);
-
- bake_cells_write = PoolVector<BakeCell>::Write();
-}
-int BakedLight::_find_cell(int x, int y, int z) {
-
- uint32_t cell = 0;
-
- int ofs_x = 0;
- int ofs_y = 0;
- int ofs_z = 0;
- int size = cells_per_axis;
- int half = size / 2;
-
- if (x < 0 || x >= size)
- return -1;
- if (y < 0 || y >= size)
- return -1;
- if (z < 0 || z >= size)
- return -1;
-
- for (int i = 0; i < cell_subdiv - 1; i++) {
-
- BakeCell *bc = &bake_cells_write[cell];
-
- int child = 0;
- if (x >= ofs_x + half) {
- child |= 1;
- ofs_x += half;
- }
- if (y >= ofs_y + half) {
- child |= 2;
- ofs_y += half;
- }
- if (z >= ofs_z + half) {
- child |= 4;
- ofs_z += half;
- }
-
- cell = bc->childs[child];
- if (cell == CHILD_EMPTY)
- return -1;
-
- half >>= 1;
- }
-
- return cell;
-}
-
-int BakedLight::_plot_ray(const Vector3 &p_from, const Vector3 &p_to) {
-
- Vector3 from = (p_from - bounds.pos) / bounds.size;
- Vector3 to = (p_to - bounds.pos) / bounds.size;
-
- int x1 = Math::floor(from.x * cells_per_axis);
- int y1 = Math::floor(from.y * cells_per_axis);
- int z1 = Math::floor(from.z * cells_per_axis);
-
- int x2 = Math::floor(to.x * cells_per_axis);
- int y2 = Math::floor(to.y * cells_per_axis);
- int z2 = Math::floor(to.z * cells_per_axis);
-
- int i, dx, dy, dz, l, m, n, x_inc, y_inc, z_inc, err_1, err_2, dx2, dy2, dz2;
- int point[3];
-
- point[0] = x1;
- point[1] = y1;
- point[2] = z1;
- dx = x2 - x1;
- dy = y2 - y1;
- dz = z2 - z1;
- x_inc = (dx < 0) ? -1 : 1;
- l = ABS(dx);
- y_inc = (dy < 0) ? -1 : 1;
- m = ABS(dy);
- z_inc = (dz < 0) ? -1 : 1;
- n = ABS(dz);
- dx2 = l << 1;
- dy2 = m << 1;
- dz2 = n << 1;
-
- if ((l >= m) && (l >= n)) {
- err_1 = dy2 - l;
- err_2 = dz2 - l;
- for (i = 0; i < l; i++) {
- int cell = _find_cell(point[0], point[1], point[2]);
- if (cell >= 0)
- return cell;
-
- if (err_1 > 0) {
- point[1] += y_inc;
- err_1 -= dx2;
- }
- if (err_2 > 0) {
- point[2] += z_inc;
- err_2 -= dx2;
- }
- err_1 += dy2;
- err_2 += dz2;
- point[0] += x_inc;
- }
- } else if ((m >= l) && (m >= n)) {
- err_1 = dx2 - m;
- err_2 = dz2 - m;
- for (i = 0; i < m; i++) {
- int cell = _find_cell(point[0], point[1], point[2]);
- if (cell >= 0)
- return cell;
- if (err_1 > 0) {
- point[0] += x_inc;
- err_1 -= dy2;
- }
- if (err_2 > 0) {
- point[2] += z_inc;
- err_2 -= dy2;
- }
- err_1 += dx2;
- err_2 += dz2;
- point[1] += y_inc;
- }
- } else {
- err_1 = dy2 - n;
- err_2 = dx2 - n;
- for (i = 0; i < n; i++) {
- int cell = _find_cell(point[0], point[1], point[2]);
- if (cell >= 0)
- return cell;
-
- if (err_1 > 0) {
- point[1] += y_inc;
- err_1 -= dz2;
- }
- if (err_2 > 0) {
- point[0] += x_inc;
- err_2 -= dz2;
- }
- err_1 += dy2;
- err_2 += dx2;
- point[2] += z_inc;
- }
- }
- return _find_cell(point[0], point[1], point[2]);
-}
-
-void BakedLight::set_cell_subdiv(int p_subdiv) {
-
- cell_subdiv = p_subdiv;
-
- //VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv);
-}
-
-int BakedLight::get_cell_subdiv() const {
-
- return cell_subdiv;
-}
-
-Rect3 BakedLight::get_aabb() const {
-
- return Rect3(Vector3(0, 0, 0), Vector3(1, 1, 1));
-}
-PoolVector<Face3> BakedLight::get_faces(uint32_t p_usage_flags) const {
-
- return PoolVector<Face3>();
-}
-
-String BakedLight::get_configuration_warning() const {
- return String();
-}
-
-void BakedLight::_debug_mesh(int p_idx, int p_level, const Rect3 &p_aabb, DebugMode p_mode, Ref<MultiMesh> &p_multimesh, int &idx) {
-
- if (p_level == cell_subdiv - 1) {
-
- Vector3 center = p_aabb.pos + p_aabb.size * 0.5;
- Transform xform;
- xform.origin = center;
- xform.basis.scale(p_aabb.size * 0.5);
- p_multimesh->set_instance_transform(idx, xform);
- Color col;
- switch (p_mode) {
- case DEBUG_ALBEDO: {
- col = Color(bake_cells_write[p_idx].albedo[0], bake_cells_write[p_idx].albedo[1], bake_cells_write[p_idx].albedo[2]);
- } break;
- case DEBUG_LIGHT: {
- col = Color(bake_cells_write[p_idx].light[0], bake_cells_write[p_idx].light[1], bake_cells_write[p_idx].light[2]);
- Color colr = Color(bake_cells_write[p_idx].radiance[0], bake_cells_write[p_idx].radiance[1], bake_cells_write[p_idx].radiance[2]);
- col.r += colr.r;
- col.g += colr.g;
- col.b += colr.b;
- } break;
- }
- p_multimesh->set_instance_color(idx, col);
-
- idx++;
-
- } else {
-
- for (int i = 0; i < 8; i++) {
-
- if (bake_cells_write[p_idx].childs[i] == CHILD_EMPTY)
- continue;
-
- Rect3 aabb = p_aabb;
- aabb.size *= 0.5;
-
- if (i & 1)
- aabb.pos.x += aabb.size.x;
- if (i & 2)
- aabb.pos.y += aabb.size.y;
- if (i & 4)
- aabb.pos.z += aabb.size.z;
-
- _debug_mesh(bake_cells_write[p_idx].childs[i], p_level + 1, aabb, p_mode, p_multimesh, idx);
- }
- }
-}
-
-void BakedLight::create_debug_mesh(DebugMode p_mode) {
-
- Ref<MultiMesh> mm;
- mm.instance();
-
- mm->set_transform_format(MultiMesh::TRANSFORM_3D);
- mm->set_color_format(MultiMesh::COLOR_8BIT);
- mm->set_instance_count(bake_cells_level_used[cell_subdiv - 1]);
-
- Ref<Mesh> mesh;
- mesh.instance();
-
- {
- Array arr;
- arr.resize(Mesh::ARRAY_MAX);
-
- PoolVector<Vector3> vertices;
- PoolVector<Color> colors;
-
- int vtx_idx = 0;
-#define ADD_VTX(m_idx) \
- ; \
- vertices.push_back(face_points[m_idx]); \
- colors.push_back(Color(1, 1, 1, 1)); \
- vtx_idx++;
-
- for (int i = 0; i < 6; i++) {
-
- Vector3 face_points[4];
-
- for (int j = 0; j < 4; j++) {
-
- float v[3];
- v[0] = 1.0;
- v[1] = 1 - 2 * ((j >> 1) & 1);
- v[2] = v[1] * (1 - 2 * (j & 1));
-
- for (int k = 0; k < 3; k++) {
-
- if (i < 3)
- face_points[j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
- else
- face_points[3 - j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
- }
- }
-
- //tri 1
- ADD_VTX(0);
- ADD_VTX(1);
- ADD_VTX(2);
- //tri 2
- ADD_VTX(2);
- ADD_VTX(3);
- ADD_VTX(0);
- }
-
- arr[Mesh::ARRAY_VERTEX] = vertices;
- arr[Mesh::ARRAY_COLOR] = colors;
- mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, arr);
- }
-
- {
- Ref<SpatialMaterial> fsm;
- fsm.instance();
- fsm->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
- fsm->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
- fsm->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- fsm->set_albedo(Color(1, 1, 1, 1));
-
- mesh->surface_set_material(0, fsm);
- }
-
- mm->set_mesh(mesh);
-
- bake_cells_write = bake_cells.write();
-
- int idx = 0;
- _debug_mesh(0, 0, bounds, p_mode, mm, idx);
-
- print_line("written: " + itos(idx) + " total: " + itos(bake_cells_level_used[cell_subdiv - 1]));
-
- MultiMeshInstance *mmi = memnew(MultiMeshInstance);
- mmi->set_multimesh(mm);
- add_child(mmi);
-#ifdef TOOLS_ENABLED
- if (get_tree()->get_edited_scene_root() == this) {
- mmi->set_owner(this);
- } else {
- mmi->set_owner(get_owner());
- }
-#else
- mmi->set_owner(get_owner());
-#endif
-}
-
-void BakedLight::_debug_mesh_albedo() {
- create_debug_mesh(DEBUG_ALBEDO);
-}
-
-void BakedLight::_debug_mesh_light() {
- create_debug_mesh(DEBUG_LIGHT);
-}
-
-void BakedLight::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("set_cell_subdiv", "steps"), &BakedLight::set_cell_subdiv);
- ClassDB::bind_method(D_METHOD("get_cell_subdiv"), &BakedLight::get_cell_subdiv);
-
- ClassDB::bind_method(D_METHOD("bake"), &BakedLight::bake);
- ClassDB::set_method_flags(get_class_static(), _scs_create("bake"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
-
- ClassDB::bind_method(D_METHOD("bake_lights"), &BakedLight::bake_lights);
- ClassDB::set_method_flags(get_class_static(), _scs_create("bake_lights"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
-
- ClassDB::bind_method(D_METHOD("bake_radiance"), &BakedLight::bake_radiance);
- ClassDB::set_method_flags(get_class_static(), _scs_create("bake_radiance"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
-
- ClassDB::bind_method(D_METHOD("debug_mesh_albedo"), &BakedLight::_debug_mesh_albedo);
- ClassDB::set_method_flags(get_class_static(), _scs_create("debug_mesh_albedo"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
-
- ClassDB::bind_method(D_METHOD("debug_mesh_light"), &BakedLight::_debug_mesh_light);
- ClassDB::set_method_flags(get_class_static(), _scs_create("debug_mesh_light"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
-
- ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_subdiv"), "set_cell_subdiv", "get_cell_subdiv");
- ADD_SIGNAL(MethodInfo("baked_light_changed"));
-}
-
-BakedLight::BakedLight() {
-
- //baked_light=VisualServer::get_singleton()->baked_light_create();
- VS::get_singleton()->instance_set_base(get_instance(), baked_light);
-
- cell_subdiv = 8;
- bake_texture_size = 128;
- color_scan_cell_width = 8;
- light_pass = 0;
-}
-
-BakedLight::~BakedLight() {
-
- VS::get_singleton()->free(baked_light);
-}
-
-/////////////////////////
-
-#if 0
-void BakedLightSampler::set_param(Param p_param,float p_value) {
- ERR_FAIL_INDEX(p_param,PARAM_MAX);
- params[p_param]=p_value;
- VS::get_singleton()->baked_light_sampler_set_param(base,VS::BakedLightSamplerParam(p_param),p_value);
-}
-
-float BakedLightSampler::get_param(Param p_param) const{
-
- ERR_FAIL_INDEX_V(p_param,PARAM_MAX,0);
- return params[p_param];
-
-}
-
-void BakedLightSampler::set_resolution(int p_resolution){
-
- ERR_FAIL_COND(p_resolution<4 || p_resolution>32);
- resolution=p_resolution;
- VS::get_singleton()->baked_light_sampler_set_resolution(base,resolution);
-}
-int BakedLightSampler::get_resolution() const {
-
- return resolution;
-}
-
-AABB BakedLightSampler::get_aabb() const {
-
- float r = get_param(PARAM_RADIUS);
- return AABB( Vector3(-r,-r,-r),Vector3(r*2,r*2,r*2));
-}
-DVector<Face3> BakedLightSampler::get_faces(uint32_t p_usage_flags) const {
- return DVector<Face3>();
-}
-
-void BakedLightSampler::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("set_param","param","value"),&BakedLightSampler::set_param);
- ClassDB::bind_method(D_METHOD("get_param","param"),&BakedLightSampler::get_param);
-
- ClassDB::bind_method(D_METHOD("set_resolution","resolution"),&BakedLightSampler::set_resolution);
- ClassDB::bind_method(D_METHOD("get_resolution"),&BakedLightSampler::get_resolution);
-
-
- BIND_CONSTANT( PARAM_RADIUS );
- BIND_CONSTANT( PARAM_STRENGTH );
- BIND_CONSTANT( PARAM_ATTENUATION );
- BIND_CONSTANT( PARAM_DETAIL_RATIO );
- BIND_CONSTANT( PARAM_MAX );
-
- ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/radius",PROPERTY_HINT_RANGE,"0.01,1024,0.01"),"set_param","get_param",PARAM_RADIUS);
- ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/strength",PROPERTY_HINT_RANGE,"0.01,16,0.01"),"set_param","get_param",PARAM_STRENGTH);
- ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/attenuation",PROPERTY_HINT_EXP_EASING),"set_param","get_param",PARAM_ATTENUATION);
- ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0.01,1.0,0.01"),"set_param","get_param",PARAM_DETAIL_RATIO);
- //ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),"set_param","get_param",PARAM_DETAIL_RATIO);
- ADD_PROPERTY( PropertyInfo(Variant::REAL,"params/resolution",PROPERTY_HINT_RANGE,"4,32,1"),"set_resolution","get_resolution");
-
-}
-
-BakedLightSampler::BakedLightSampler() {
-
- base = VS::get_singleton()->baked_light_sampler_create();
- set_base(base);
-
- params[PARAM_RADIUS]=1.0;
- params[PARAM_STRENGTH]=1.0;
- params[PARAM_ATTENUATION]=1.0;
- params[PARAM_DETAIL_RATIO]=0.1;
- resolution=16;
-
-
-}
-
-BakedLightSampler::~BakedLightSampler(){
-
- VS::get_singleton()->free(base);
-}
-#endif
diff --git a/scene/3d/baked_light_instance.h b/scene/3d/baked_light_instance.h
deleted file mode 100644
index 63a5fa7255..0000000000
--- a/scene/3d/baked_light_instance.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*************************************************************************/
-/* baked_light_instance.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 BAKED_LIGHT_INSTANCE_H
-#define BAKED_LIGHT_INSTANCE_H
-
-#include "scene/3d/multimesh_instance.h"
-#include "scene/3d/visual_instance.h"
-#include "scene/resources/baked_light.h"
-
-class BakedLightBaker;
-class Light;
-
-class BakedLight : public VisualInstance {
- GDCLASS(BakedLight, VisualInstance);
-
-public:
- enum DebugMode {
- DEBUG_ALBEDO,
- DEBUG_LIGHT
- };
-
-private:
- RID baked_light;
- int cell_subdiv;
- Rect3 bounds;
- int cells_per_axis;
-
- enum {
- CHILD_EMPTY = 0xFFFFFFFF,
- };
-
- /* BAKE DATA */
-
- struct BakeCell {
-
- uint32_t childs[8];
- float albedo[3]; //albedo in RGB24
- float light[3]; //accumulated light in 16:16 fixed point (needs to be integer for moving lights fast)
- float radiance[3]; //accumulated light in 16:16 fixed point (needs to be integer for moving lights fast)
- uint32_t used_sides;
- float alpha; //used for upsampling
- uint32_t light_pass; //used for baking light
-
- BakeCell() {
- for (int i = 0; i < 8; i++) {
- childs[i] = 0xFFFFFFFF;
- }
-
- for (int i = 0; i < 3; i++) {
- light[i] = 0;
- albedo[i] = 0;
- radiance[i] = 0;
- }
- alpha = 0;
- light_pass = 0;
- used_sides = 0;
- }
- };
-
- int bake_texture_size;
- int color_scan_cell_width;
-
- struct MaterialCache {
- //128x128 textures
- Vector<Color> albedo;
- Vector<Color> emission;
- };
-
- Vector<Color> _get_bake_texture(Image &p_image, const Color &p_color);
-
- Map<Ref<Material>, MaterialCache> material_cache;
- MaterialCache _get_material_cache(Ref<Material> p_material);
-
- int bake_cells_alloc;
- int bake_cells_used;
- int zero_alphas;
- Vector<int> bake_cells_level_used;
- PoolVector<BakeCell> bake_cells;
- PoolVector<BakeCell>::Write bake_cells_write;
-
- void _plot_face(int p_idx, int p_level, const Vector3 *p_vtx, const Vector2 *p_uv, const MaterialCache &p_material, const Rect3 &p_aabb);
- void _fixup_plot(int p_idx, int p_level, int p_x, int p_y, int p_z);
- void _bake_add_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh);
- void _bake_add_to_aabb(const Transform &p_xform, Ref<Mesh> &p_mesh, bool &first);
-
- void _debug_mesh(int p_idx, int p_level, const Rect3 &p_aabb, DebugMode p_mode, Ref<MultiMesh> &p_multimesh, int &idx);
- void _debug_mesh_albedo();
- void _debug_mesh_light();
-
- _FORCE_INLINE_ int _find_cell(int x, int y, int z);
- int _plot_ray(const Vector3 &p_from, const Vector3 &p_to);
-
- uint32_t light_pass;
-
- void _bake_directional(int p_idx, int p_level, int p_x, int p_y, int p_z, const Vector3 &p_dir, const Color &p_color, int p_sign);
- void _upscale_light(int p_idx, int p_level);
- void _bake_light(Light *p_light);
-
- Color _cone_trace(const Vector3 &p_from, const Vector3 &p_dir, float p_half_angle);
- void _bake_radiance(int p_idx, int p_level, int p_x, int p_y, int p_z);
-
- friend class GeometryInstance;
-
- Set<GeometryInstance *> geometries;
- friend class Light;
-
- Set<Light *> lights;
-
-protected:
- static void _bind_methods();
-
-public:
- void set_cell_subdiv(int p_subdiv);
- int get_cell_subdiv() const;
-
- void bake();
- void bake_lights();
- void bake_radiance();
-
- void create_debug_mesh(DebugMode p_mode);
-
- virtual Rect3 get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
-
- String get_configuration_warning() const;
-
- BakedLight();
- ~BakedLight();
-};
-
-#if 0
-class BakedLightSampler : public VisualInstance {
- GDCLASS(BakedLightSampler,VisualInstance);
-
-
-public:
-
- enum Param {
- PARAM_RADIUS=VS::BAKED_LIGHT_SAMPLER_RADIUS,
- PARAM_STRENGTH=VS::BAKED_LIGHT_SAMPLER_STRENGTH,
- PARAM_ATTENUATION=VS::BAKED_LIGHT_SAMPLER_ATTENUATION,
- PARAM_DETAIL_RATIO=VS::BAKED_LIGHT_SAMPLER_DETAIL_RATIO,
- PARAM_MAX=VS::BAKED_LIGHT_SAMPLER_MAX
- };
-
-
-
-protected:
-
- RID base;
- float params[PARAM_MAX];
- int resolution;
- static void _bind_methods();
-public:
-
- virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
-
- void set_param(Param p_param,float p_value);
- float get_param(Param p_param) const;
-
- void set_resolution(int p_resolution);
- int get_resolution() const;
-
- BakedLightSampler();
- ~BakedLightSampler();
-};
-
-VARIANT_ENUM_CAST( BakedLightSampler::Param );
-
-#endif
-#endif // BAKED_LIGHT_H
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index 4dc01975b8..1b27313d3b 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -172,7 +172,7 @@ void CollisionObject::_get_property_list(List<PropertyInfo> *p_list) const {
}
}
-void CollisionObject::_input_event(Node *p_camera, const InputEvent &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape) {
+void CollisionObject::_input_event(Node *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape) {
if (get_script_instance()) {
get_script_instance()->call(SceneStringNames::get_singleton()->_input_event, p_camera, p_input_event, p_pos, p_normal, p_shape);
@@ -235,9 +235,9 @@ void CollisionObject::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_capture_input_on_drag", "enable"), &CollisionObject::set_capture_input_on_drag);
ClassDB::bind_method(D_METHOD("get_capture_input_on_drag"), &CollisionObject::get_capture_input_on_drag);
ClassDB::bind_method(D_METHOD("get_rid"), &CollisionObject::get_rid);
- BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::INPUT_EVENT, "event"), PropertyInfo(Variant::VECTOR3, "click_pos"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
+ BIND_VMETHOD(MethodInfo("_input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "click_pos"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
- ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::INPUT_EVENT, "event"), PropertyInfo(Variant::VECTOR3, "click_pos"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
+ ADD_SIGNAL(MethodInfo("input_event", PropertyInfo(Variant::OBJECT, "camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), PropertyInfo(Variant::VECTOR3, "click_pos"), PropertyInfo(Variant::VECTOR3, "click_normal"), PropertyInfo(Variant::INT, "shape_idx")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
ADD_SIGNAL(MethodInfo("mouse_exited"));
diff --git a/scene/3d/collision_object.h b/scene/3d/collision_object.h
index abe0b804bf..3822fb0d5a 100644
--- a/scene/3d/collision_object.h
+++ b/scene/3d/collision_object.h
@@ -70,7 +70,7 @@ protected:
void _get_property_list(List<PropertyInfo> *p_list) const;
static void _bind_methods();
friend class Viewport;
- virtual void _input_event(Node *p_camera, const InputEvent &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape);
+ virtual void _input_event(Node *p_camera, const Ref<InputEvent> &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape);
virtual void _mouse_enter();
virtual void _mouse_exit();
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 7370e1330c..96311236ef 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -881,11 +881,11 @@ void GIProbe::_fixup_plot(int p_idx, int p_level, int p_x, int p_y, int p_z, Bak
}
}
-Vector<Color> GIProbe::_get_bake_texture(Image &p_image, const Color &p_color) {
+Vector<Color> GIProbe::_get_bake_texture(Ref<Image> p_image, const Color &p_color) {
Vector<Color> ret;
- if (p_image.empty()) {
+ if (p_image.is_null()) {
ret.resize(bake_texture_size * bake_texture_size);
for (int i = 0; i < bake_texture_size * bake_texture_size; i++) {
@@ -895,14 +895,14 @@ Vector<Color> GIProbe::_get_bake_texture(Image &p_image, const Color &p_color) {
return ret;
}
- if (p_image.is_compressed()) {
+ if (p_image->is_compressed()) {
print_line("DECOMPRESSING!!!!");
- p_image.decompress();
+ p_image->decompress();
}
- p_image.convert(Image::FORMAT_RGBA8);
- p_image.resize(bake_texture_size, bake_texture_size, Image::INTERPOLATE_CUBIC);
+ p_image->convert(Image::FORMAT_RGBA8);
+ p_image->resize(bake_texture_size, bake_texture_size, Image::INTERPOLATE_CUBIC);
- PoolVector<uint8_t>::Read r = p_image.get_data().read();
+ PoolVector<uint8_t>::Read r = p_image->get_data().read();
ret.resize(bake_texture_size * bake_texture_size);
for (int i = 0; i < bake_texture_size * bake_texture_size; i++) {
@@ -934,7 +934,7 @@ GIProbe::Baker::MaterialCache GIProbe::_get_material_cache(Ref<Material> p_mater
Ref<Texture> albedo_tex = mat->get_texture(SpatialMaterial::TEXTURE_ALBEDO);
- Image img_albedo;
+ Ref<Image> img_albedo;
if (albedo_tex.is_valid()) {
img_albedo = albedo_tex->get_data();
@@ -950,7 +950,7 @@ GIProbe::Baker::MaterialCache GIProbe::_get_material_cache(Ref<Material> p_mater
emission_col.g *= mat->get_emission_energy();
emission_col.b *= mat->get_emission_energy();
- Image img_emission;
+ Ref<Image> img_emission;
if (emission_tex.is_valid()) {
@@ -960,7 +960,7 @@ GIProbe::Baker::MaterialCache GIProbe::_get_material_cache(Ref<Material> p_mater
mc.emission = _get_bake_texture(img_emission, emission_col);
} else {
- Image empty;
+ Ref<Image> empty;
mc.albedo = _get_bake_texture(empty, Color(0.7, 0.7, 0.7));
mc.emission = _get_bake_texture(empty, Color(0, 0, 0));
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index ae89a6f068..3b05d9952b 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -134,7 +134,7 @@ private:
Vector<Color> emission;
};
- Vector<Color> _get_bake_texture(Image &p_image, const Color &p_color);
+ Vector<Color> _get_bake_texture(Ref<Image> p_image, const Color &p_color);
Map<Ref<Material>, MaterialCache> material_cache;
MaterialCache _get_material_cache(Ref<Material> p_material);
int leaf_voxel_count;
@@ -170,7 +170,7 @@ private:
int color_scan_cell_width;
int bake_texture_size;
- Vector<Color> _get_bake_texture(Image &p_image, const Color &p_color);
+ Vector<Color> _get_bake_texture(Ref<Image> p_image, const Color &p_color);
Baker::MaterialCache _get_material_cache(Ref<Material> p_material, Baker *p_baker);
void _plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, const Vector3 *p_vtx, const Vector2 *p_uv, const Baker::MaterialCache &p_material, const Rect3 &p_aabb, Baker *p_baker);
void _plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, Baker *p_baker, const Vector<Ref<Material> > &p_materials, const Ref<Material> &p_override_material);
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index bb14ad5108..6ab65d3994 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -29,7 +29,6 @@
/*************************************************************************/
#include "light.h"
-#include "baked_light_instance.h"
#include "global_config.h"
#include "scene/resources/surface_tool.h"
@@ -166,26 +165,9 @@ void Light::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
_update_visibility();
-
- Node *node = this;
-
- while (node) {
-
- baked_light = node->cast_to<BakedLight>();
- if (baked_light) {
- baked_light->lights.insert(this);
- break;
- }
-
- node = node->get_parent();
- }
}
if (p_what == NOTIFICATION_EXIT_TREE) {
-
- if (baked_light) {
- baked_light->lights.erase(this);
- }
}
}
@@ -262,8 +244,6 @@ Light::Light(VisualServer::LightType p_type) {
light = VisualServer::get_singleton()->light_create(p_type);
VS::get_singleton()->instance_set_base(get_instance(), light);
- baked_light = NULL;
-
editor_only = false;
set_color(Color(1, 1, 1, 1));
set_shadow(false);
diff --git a/scene/3d/light.h b/scene/3d/light.h
index ed8758b09b..c02f9d12d3 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -75,7 +75,6 @@ private:
bool editor_only;
void _update_visibility();
- BakedLight *baked_light;
// bind helpers
protected:
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 038ca33a41..71079ea780 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -48,11 +48,13 @@ void Particles::set_emitting(bool p_emitting) {
void Particles::set_amount(int p_amount) {
+ ERR_FAIL_COND(p_amount < 1);
amount = p_amount;
VS::get_singleton()->particles_set_amount(particles, amount);
}
void Particles::set_lifetime(float p_lifetime) {
+ ERR_FAIL_COND(p_lifetime <= 0);
lifetime = p_lifetime;
VS::get_singleton()->particles_set_lifetime(particles, lifetime);
}
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 38e1ba1cd5..8d927e529e 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -214,6 +214,18 @@ float VehicleWheel::get_friction_slip() const {
return m_frictionSlip;
}
+void VehicleWheel::set_roll_influence(float p_value) {
+ m_rollInfluence = p_value;
+}
+
+float VehicleWheel::get_roll_influence() const {
+ return m_rollInfluence;
+}
+
+bool VehicleWheel::is_in_contact() const {
+ return m_raycastInfo.m_isInContact;
+}
+
void VehicleWheel::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "length"), &VehicleWheel::set_radius);
@@ -246,9 +258,15 @@ void VehicleWheel::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_friction_slip", "length"), &VehicleWheel::set_friction_slip);
ClassDB::bind_method(D_METHOD("get_friction_slip"), &VehicleWheel::get_friction_slip);
+ ClassDB::bind_method(D_METHOD("is_in_contact"), &VehicleWheel::is_in_contact);
+
+ ClassDB::bind_method(D_METHOD("set_roll_influence", "roll_influence"), &VehicleWheel::set_roll_influence);
+ ClassDB::bind_method(D_METHOD("get_roll_influence"), &VehicleWheel::get_roll_influence);
+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering");
ADD_GROUP("Wheel", "wheel_");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_roll_influence"), "set_roll_influence", "get_roll_influence");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_radius"), "set_radius", "get_radius");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_rest_length"), "set_suspension_rest_length", "get_suspension_rest_length");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "wheel_friction_slip"), "set_friction_slip", "get_friction_slip");
diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h
index cdb2ebc0be..7ed9bce730 100644
--- a/scene/3d/vehicle_body.h
+++ b/scene/3d/vehicle_body.h
@@ -126,6 +126,11 @@ public:
void set_use_as_steering(bool p_enabled);
bool is_used_as_steering() const;
+ bool is_in_contact() const;
+
+ void set_roll_influence(float p_value);
+ float get_roll_influence() const;
+
VehicleWheel();
};
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index a320a30e8a..ad72a512d8 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -113,6 +113,7 @@ void AudioPlayer::_notification(int p_what) {
void AudioPlayer::set_stream(Ref<AudioStream> p_stream) {
+ ERR_FAIL_COND(!p_stream.is_valid());
AudioServer::get_singleton()->lock();
mix_buffer.resize(AudioServer::get_singleton()->thread_get_mix_buffer_size());
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 839dcc3678..318db8458b 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -48,188 +48,185 @@ void BaseButton::_unpress_group() {
}
}
-void BaseButton::_gui_input(InputEvent p_event) {
+void BaseButton::_gui_input(Ref<InputEvent> p_event) {
if (status.disabled) // no interaction with disabled button
return;
- switch (p_event.type) {
+ Ref<InputEventMouseButton> b = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (b.is_valid()) {
+ if (status.disabled || b->get_button_index() != 1)
+ return;
- const InputEventMouseButton &b = p_event.mouse_button;
+ if (status.pressing_button)
+ return;
- if (status.disabled || b.button_index != 1)
- return;
+ if (action_mode == ACTION_MODE_BUTTON_PRESS) {
- if (status.pressing_button)
- break;
+ if (b->is_pressed()) {
- if (action_mode == ACTION_MODE_BUTTON_PRESS) {
-
- if (b.pressed) {
-
- emit_signal("button_down");
-
- if (!toggle_mode) { //mouse press attempt
+ emit_signal("button_down");
- status.press_attempt = true;
- status.pressing_inside = true;
+ if (!toggle_mode) { //mouse press attempt
- pressed();
- if (get_script_instance()) {
- Variant::CallError ce;
- get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
- }
+ status.press_attempt = true;
+ status.pressing_inside = true;
- emit_signal("pressed");
- _unpress_group();
+ pressed();
+ if (get_script_instance()) {
+ Variant::CallError ce;
+ get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
+ }
- } else {
+ emit_signal("pressed");
+ _unpress_group();
- status.pressed = !status.pressed;
- pressed();
- if (get_script_instance()) {
- Variant::CallError ce;
- get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
- }
- emit_signal("pressed");
- _unpress_group();
+ } else {
- toggled(status.pressed);
- emit_signal("toggled", status.pressed);
+ status.pressed = !status.pressed;
+ pressed();
+ if (get_script_instance()) {
+ Variant::CallError ce;
+ get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
}
+ emit_signal("pressed");
+ _unpress_group();
- } else {
+ toggled(status.pressed);
+ emit_signal("toggled", status.pressed);
+ }
+
+ } else {
- emit_signal("button_up");
+ emit_signal("button_up");
- /* this is pointless if (status.press_attempt && status.pressing_inside) {
- //released();
- emit_signal("released");
- }
-*/
- status.press_attempt = false;
+ /* this is pointless if (status.press_attempt && status.pressing_inside) {
+ //released();
+ emit_signal("released");
}
- update();
- break;
+*/
+ status.press_attempt = false;
}
+ update();
+ return;
+ }
- if (b.pressed) {
+ if (b->is_pressed()) {
- status.press_attempt = true;
- status.pressing_inside = true;
- emit_signal("button_down");
+ status.press_attempt = true;
+ status.pressing_inside = true;
+ emit_signal("button_down");
- } else {
+ } else {
- emit_signal("button_up");
+ emit_signal("button_up");
- if (status.press_attempt && status.pressing_inside) {
+ if (status.press_attempt && status.pressing_inside) {
- if (!toggle_mode) { //mouse press attempt
+ if (!toggle_mode) { //mouse press attempt
- pressed();
- if (get_script_instance()) {
- Variant::CallError ce;
- get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
- }
+ pressed();
+ if (get_script_instance()) {
+ Variant::CallError ce;
+ get_script_instance()->call(SceneStringNames::get_singleton()->_pressed, NULL, 0, ce);
+ }
- emit_signal("pressed");
+ emit_signal("pressed");
- } else {
+ } else {
- status.pressed = !status.pressed;
+ status.pressed = !status.pressed;
- pressed();
- emit_signal("pressed");
+ pressed();
+ emit_signal("pressed");
- toggled(status.pressed);
- emit_signal("toggled", status.pressed);
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_toggled, status.pressed);
- }
+ toggled(status.pressed);
+ emit_signal("toggled", status.pressed);
+ if (get_script_instance()) {
+ get_script_instance()->call(SceneStringNames::get_singleton()->_toggled, status.pressed);
}
-
- _unpress_group();
}
- status.press_attempt = false;
+ _unpress_group();
}
- update();
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- if (status.press_attempt && status.pressing_button == 0) {
- bool last_press_inside = status.pressing_inside;
- status.pressing_inside = has_point(Point2(p_event.mouse_motion.x, p_event.mouse_motion.y));
- if (last_press_inside != status.pressing_inside)
- update();
- }
- } break;
- case InputEvent::ACTION:
- case InputEvent::JOYPAD_BUTTON:
- case InputEvent::KEY: {
+ status.press_attempt = false;
+ }
- if (p_event.is_echo()) {
- break;
- }
+ update();
+ }
- if (status.disabled) {
- break;
- }
+ Ref<InputEventMouseMotion> mm = p_event;
- if (status.press_attempt && status.pressing_button == 0) {
- break;
- }
+ if (mm.is_valid()) {
+ if (status.press_attempt && status.pressing_button == 0) {
+ bool last_press_inside = status.pressing_inside;
+ status.pressing_inside = has_point(mm->get_pos());
+ if (last_press_inside != status.pressing_inside)
+ update();
+ }
+ }
- if (p_event.is_action("ui_accept")) {
+ if (!mm.is_valid() && !b.is_valid()) {
- if (p_event.is_pressed()) {
+ if (p_event->is_echo()) {
+ return;
+ }
- status.pressing_button++;
- status.press_attempt = true;
- status.pressing_inside = true;
- emit_signal("button_down");
+ if (status.disabled) {
+ return;
+ }
- } else if (status.press_attempt) {
+ if (status.press_attempt && status.pressing_button == 0) {
+ return;
+ }
- if (status.pressing_button)
- status.pressing_button--;
+ if (p_event->is_action("ui_accept")) {
- if (status.pressing_button)
- break;
+ if (p_event->is_pressed()) {
- status.press_attempt = false;
- status.pressing_inside = false;
+ status.pressing_button++;
+ status.press_attempt = true;
+ status.pressing_inside = true;
+ emit_signal("button_down");
- emit_signal("button_up");
+ } else if (status.press_attempt) {
- if (!toggle_mode) { //mouse press attempt
+ if (status.pressing_button)
+ status.pressing_button--;
- pressed();
- emit_signal("pressed");
- } else {
+ if (status.pressing_button)
+ return;
- status.pressed = !status.pressed;
+ status.press_attempt = false;
+ status.pressing_inside = false;
- pressed();
- emit_signal("pressed");
+ emit_signal("button_up");
- toggled(status.pressed);
- if (get_script_instance()) {
- get_script_instance()->call(SceneStringNames::get_singleton()->_toggled, status.pressed);
- }
- emit_signal("toggled", status.pressed);
- }
+ if (!toggle_mode) { //mouse press attempt
- _unpress_group();
+ pressed();
+ emit_signal("pressed");
+ } else {
+
+ status.pressed = !status.pressed;
+
+ pressed();
+ emit_signal("pressed");
+
+ toggled(status.pressed);
+ if (get_script_instance()) {
+ get_script_instance()->call(SceneStringNames::get_singleton()->_toggled, status.pressed);
+ }
+ emit_signal("toggled", status.pressed);
}
- accept_event();
- update();
+ _unpress_group();
}
+
+ accept_event();
+ update();
}
}
}
@@ -430,9 +427,9 @@ Ref<ShortCut> BaseButton::get_shortcut() const {
return shortcut;
}
-void BaseButton::_unhandled_input(InputEvent p_event) {
+void BaseButton::_unhandled_input(Ref<InputEvent> p_event) {
- if (!is_disabled() && is_visible_in_tree() && p_event.is_pressed() && !p_event.is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
+ if (!is_disabled() && is_visible_in_tree() && p_event->is_pressed() && !p_event->is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
if (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this))
return; //ignore because of modal window
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 62b6633bfc..dfcf3b0f8a 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -73,8 +73,8 @@ protected:
virtual void pressed();
virtual void toggled(bool p_pressed);
static void _bind_methods();
- virtual void _gui_input(InputEvent p_event);
- virtual void _unhandled_input(InputEvent p_event);
+ virtual void _gui_input(Ref<InputEvent> p_event);
+ virtual void _unhandled_input(Ref<InputEvent> p_event);
void _notification(int p_what);
public:
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index e7f4a274d5..16b2cfa083 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -308,6 +308,7 @@ MarginContainer *VBoxContainer::add_margin_child(const String &p_label, Control
l->set_text(p_label);
add_child(l);
MarginContainer *mc = memnew(MarginContainer);
+ mc->add_constant_override("margin_left", 0);
mc->add_child(p_control);
add_child(mc);
if (p_expand)
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index f57b3d0fd1..a456759281 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -69,48 +69,58 @@ void Button::_notification(int p_what) {
RID ci = get_canvas_item();
Size2 size = get_size();
Color color;
- Color icon_color = Color(1, 1, 1);
+ Color color_icon(1, 1, 1, 1);
//print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode()));
- String style_name = "";
+ Ref<StyleBox> style = get_stylebox("normal");
+
switch (get_draw_mode()) {
case DRAW_NORMAL: {
- style_name = "normal";
+ style = get_stylebox("normal");
+ if (!flat)
+ style->draw(ci, Rect2(Point2(0, 0), size));
color = get_color("font_color");
-
+ if (has_color("icon_color_normal"))
+ color_icon = get_color("icon_color_normal");
} break;
case DRAW_PRESSED: {
- style_name = "pressed";
- if (has_color("font_color_pressed")) {
+ style = get_stylebox("pressed");
+ style->draw(ci, Rect2(Point2(0, 0), size));
+ if (has_color("font_color_pressed"))
color = get_color("font_color_pressed");
- icon_color = color;
- } else
+ else
color = get_color("font_color");
+ if (has_color("icon_color_pressed"))
+ color_icon = get_color("icon_color_pressed");
} break;
case DRAW_HOVER: {
- style_name = "hover";
+ style = get_stylebox("hover");
+ style->draw(ci, Rect2(Point2(0, 0), size));
color = get_color("font_color_hover");
+ if (has_color("icon_color_hover"))
+ color_icon = get_color("icon_color_hover");
} break;
case DRAW_DISABLED: {
- style_name = "disabled";
+ style = get_stylebox("disabled");
+ style->draw(ci, Rect2(Point2(0, 0), size));
color = get_color("font_color_disabled");
+ if (has_color("icon_color_disabled"))
+ color_icon = get_color("icon_color_disabled");
} break;
}
- if (style_name != "" && !flat) get_stylebox(style_name)->draw(ci, Rect2(Point2(0, 0), size));
-
- Ref<StyleBox> style = get_stylebox(style_name);
if (has_focus()) {
+ Ref<StyleBox> style = get_stylebox("focus");
style->draw(ci, Rect2(Point2(), size));
}
@@ -147,8 +157,9 @@ void Button::_notification(int p_what) {
if (!_icon.is_null()) {
int valign = size.height - style->get_minimum_size().y;
-
- _icon->draw(ci, style->get_offset() + Point2(0, Math::floor((valign - _icon->get_height()) / 2.0)), is_disabled() ? Color(1, 1, 1, 0.4) : icon_color);
+ if (is_disabled())
+ color_icon.a = 0.4;
+ _icon->draw(ci, style->get_offset() + Point2(0, Math::floor((valign - _icon->get_height()) / 2.0)), color_icon);
}
}
}
diff --git a/scene/gui/button_array.cpp b/scene/gui/button_array.cpp
index eccf3ea64a..0d518059c8 100644
--- a/scene/gui/button_array.cpp
+++ b/scene/gui/button_array.cpp
@@ -287,12 +287,12 @@ void ButtonArray::_notification(int p_what) {
}
}
-void ButtonArray::_gui_input(const InputEvent &p_event) {
+void ButtonArray::_gui_input(const Ref<InputEvent> &p_event) {
if (
- ((orientation == HORIZONTAL && p_event.is_action("ui_left")) ||
- (orientation == VERTICAL && p_event.is_action("ui_up"))) &&
- p_event.is_pressed() && selected > 0) {
+ ((orientation == HORIZONTAL && p_event->is_action("ui_left")) ||
+ (orientation == VERTICAL && p_event->is_action("ui_up"))) &&
+ p_event->is_pressed() && selected > 0) {
set_selected(selected - 1);
accept_event();
emit_signal("button_selected", selected);
@@ -300,18 +300,20 @@ void ButtonArray::_gui_input(const InputEvent &p_event) {
}
if (
- ((orientation == HORIZONTAL && p_event.is_action("ui_right")) ||
- (orientation == VERTICAL && p_event.is_action("ui_down"))) &&
- p_event.is_pressed() && selected < (buttons.size() - 1)) {
+ ((orientation == HORIZONTAL && p_event->is_action("ui_right")) ||
+ (orientation == VERTICAL && p_event->is_action("ui_down"))) &&
+ p_event->is_pressed() && selected < (buttons.size() - 1)) {
set_selected(selected + 1);
accept_event();
emit_signal("button_selected", selected);
return;
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
- int ofs = orientation == HORIZONTAL ? p_event.mouse_button.x : p_event.mouse_button.y;
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+
+ int ofs = orientation == HORIZONTAL ? mb->get_pos().x : mb->get_pos().y;
for (int i = 0; i < buttons.size(); i++) {
@@ -324,9 +326,11 @@ void ButtonArray::_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
- int ofs = orientation == HORIZONTAL ? p_event.mouse_motion.x : p_event.mouse_motion.y;
+ int ofs = orientation == HORIZONTAL ? mm->get_pos().x : mm->get_pos().y;
int new_hover = -1;
for (int i = 0; i < buttons.size(); i++) {
diff --git a/scene/gui/button_array.h b/scene/gui/button_array.h
index f2f7bea9c6..0ebf681cb6 100644
--- a/scene/gui/button_array.h
+++ b/scene/gui/button_array.h
@@ -76,7 +76,7 @@ protected:
static void _bind_methods();
public:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void set_align(Align p_align);
Align get_align() const;
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index adb5e2f0b6..662ce63946 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -178,7 +178,7 @@ void ColorPicker::_update_presets() {
}
}
- Image i(size.x * presets.size(), size.y, false, Image::FORMAT_RGB8, img);
+ Ref<Image> i = memnew(Image(size.x * presets.size(), size.y, false, Image::FORMAT_RGB8, img));
Ref<ImageTexture> t;
t.instance();
@@ -297,13 +297,15 @@ void ColorPicker::_hsv_draw(int p_wich, Control *c) {
}
}
-void ColorPicker::_uv_input(const InputEvent &ev) {
- if (ev.type == InputEvent::MOUSE_BUTTON) {
- const InputEventMouseButton &bev = ev.mouse_button;
- if (bev.pressed && bev.button_index == BUTTON_LEFT) {
+void ColorPicker::_uv_input(const Ref<InputEvent> &ev) {
+
+ Ref<InputEventMouseButton> bev = ev;
+
+ if (bev.is_valid()) {
+ if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) {
changing_color = true;
- float x = CLAMP((float)bev.x, 0, 256);
- float y = CLAMP((float)bev.y, 0, 256);
+ float x = CLAMP((float)bev->get_pos().x, 0, 256);
+ float y = CLAMP((float)bev->get_pos().y, 0, 256);
s = x / 256;
v = 1.0 - y / 256.0;
color.set_hsv(h, s, v, color.a);
@@ -314,12 +316,15 @@ void ColorPicker::_uv_input(const InputEvent &ev) {
} else {
changing_color = false;
}
- } else if (ev.type == InputEvent::MOUSE_MOTION) {
- const InputEventMouse &bev = ev.mouse_motion;
+ }
+
+ Ref<InputEventMouseMotion> mev = ev;
+
+ if (mev.is_valid()) {
if (!changing_color)
return;
- float x = CLAMP((float)bev.x, 0, 256);
- float y = CLAMP((float)bev.y, 0, 256);
+ float x = CLAMP((float)mev->get_pos().x, 0, 256);
+ float y = CLAMP((float)mev->get_pos().y, 0, 256);
s = x / 256;
v = 1.0 - y / 256.0;
color.set_hsv(h, s, v, color.a);
@@ -330,12 +335,15 @@ void ColorPicker::_uv_input(const InputEvent &ev) {
}
}
-void ColorPicker::_w_input(const InputEvent &ev) {
- if (ev.type == InputEvent::MOUSE_BUTTON) {
- const InputEventMouseButton &bev = ev.mouse_button;
- if (bev.pressed && bev.button_index == BUTTON_LEFT) {
+void ColorPicker::_w_input(const Ref<InputEvent> &ev) {
+
+ Ref<InputEventMouseButton> bev = ev;
+
+ if (bev.is_valid()) {
+
+ if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) {
changing_color = true;
- h = 1 - ((float)bev.y) / 256.0;
+ h = 1 - ((float)bev->get_pos().y) / 256.0;
} else {
changing_color = false;
@@ -345,11 +353,15 @@ void ColorPicker::_w_input(const InputEvent &ev) {
set_pick_color(color);
_update_color();
emit_signal("color_changed", color);
- } else if (ev.type == InputEvent::MOUSE_MOTION) {
- const InputEventMouse &bev = ev.mouse_motion;
+ }
+
+ Ref<InputEventMouseMotion> mev = ev;
+
+ if (mev.is_valid()) {
+
if (!changing_color)
return;
- float y = CLAMP((float)bev.y, 0, 256);
+ float y = CLAMP((float)mev->get_pos().y, 0, 256);
h = 1.0 - y / 256.0;
color.set_hsv(h, s, v, color.a);
last_hsv = color;
@@ -359,23 +371,30 @@ void ColorPicker::_w_input(const InputEvent &ev) {
}
}
-void ColorPicker::_preset_input(const InputEvent &ev) {
- if (ev.type == InputEvent::MOUSE_BUTTON) {
- const InputEventMouseButton &bev = ev.mouse_button;
- if (bev.pressed && bev.button_index == BUTTON_LEFT) {
- int index = bev.x / (preset->get_size().x / presets.size());
+void ColorPicker::_preset_input(const Ref<InputEvent> &ev) {
+
+ Ref<InputEventMouseButton> bev = ev;
+
+ if (bev.is_valid()) {
+
+ if (bev->is_pressed() && bev->get_button_index() == BUTTON_LEFT) {
+ int index = bev->get_pos().x / (preset->get_size().x / presets.size());
set_pick_color(presets[index]);
- } else if (bev.pressed && bev.button_index == BUTTON_RIGHT) {
- int index = bev.x / (preset->get_size().x / presets.size());
+ } else if (bev->is_pressed() && bev->get_button_index() == BUTTON_RIGHT) {
+ int index = bev->get_pos().x / (preset->get_size().x / presets.size());
presets.erase(presets[index]);
_update_presets();
bt_add_preset->show();
}
_update_color();
emit_signal("color_changed", color);
- } else if (ev.type == InputEvent::MOUSE_MOTION) {
- const InputEventMouse &mev = ev.mouse_motion;
- int index = mev.x * presets.size();
+ }
+
+ Ref<InputEventMouseMotion> mev = ev;
+
+ if (mev.is_valid()) {
+
+ int index = mev->get_pos().x * presets.size();
if (preset->get_size().x != 0) {
index /= preset->get_size().x;
}
@@ -387,28 +406,34 @@ void ColorPicker::_preset_input(const InputEvent &ev) {
}
}
-void ColorPicker::_screen_input(const InputEvent &ev) {
- if (ev.type == InputEvent::MOUSE_BUTTON) {
- const InputEventMouseButton &bev = ev.mouse_button;
- if (bev.button_index == BUTTON_LEFT && !bev.pressed) {
+void ColorPicker::_screen_input(const Ref<InputEvent> &ev) {
+
+ Ref<InputEventMouseButton> bev = ev;
+
+ if (bev.is_valid()) {
+
+ if (bev->get_button_index() == BUTTON_LEFT && !bev->is_pressed()) {
emit_signal("color_changed", color);
screen->hide();
}
- } else if (ev.type == InputEvent::MOUSE_MOTION) {
- const InputEventMouse &mev = ev.mouse_motion;
+ }
+
+ Ref<InputEventMouseMotion> mev = ev;
+
+ if (mev.is_valid()) {
Viewport *r = get_tree()->get_root();
- if (!r->get_visible_rect().has_point(Point2(mev.global_x, mev.global_y)))
+ if (!r->get_visible_rect().has_point(Point2(mev->get_global_pos().x, mev->get_global_pos().y)))
return;
- Image img = r->get_screen_capture();
- if (!img.empty()) {
+ Ref<Image> img = r->get_screen_capture();
+ if (!img.is_null()) {
last_capture = img;
r->queue_screen_capture();
}
- if (!last_capture.empty()) {
- int pw = last_capture.get_format() == Image::FORMAT_RGBA8 ? 4 : 3;
- int ofs = (mev.global_y * last_capture.get_width() + mev.global_x) * pw;
+ if (last_capture.is_valid() && !last_capture->empty()) {
+ int pw = last_capture->get_format() == Image::FORMAT_RGBA8 ? 4 : 3;
+ int ofs = (mev->get_global_pos().y * last_capture->get_width() + mev->get_global_pos().x) * pw;
- PoolVector<uint8_t>::Read r = last_capture.get_data().read();
+ PoolVector<uint8_t>::Read r = last_capture->get_data().read();
Color c(r[ofs + 0] / 255.0, r[ofs + 1] / 255.0, r[ofs + 2] / 255.0);
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index bce1ae07f7..ca47c3a5f4 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -47,7 +47,7 @@ class ColorPicker : public BoxContainer {
private:
Control *screen;
- Image last_capture;
+ Ref<Image> last_capture;
Control *uv_edit;
Control *w_edit;
TextureRect *sample;
@@ -82,10 +82,10 @@ private:
void _sample_draw();
void _hsv_draw(int p_wich, Control *c);
- void _uv_input(const InputEvent &p_input);
- void _w_input(const InputEvent &p_input);
- void _preset_input(const InputEvent &p_input);
- void _screen_input(const InputEvent &p_input);
+ void _uv_input(const Ref<InputEvent> &p_input);
+ void _w_input(const Ref<InputEvent> &p_input);
+ void _preset_input(const Ref<InputEvent> &p_input);
+ void _screen_input(const Ref<InputEvent> &p_input);
void _add_preset_pressed();
void _screen_pick_pressed();
diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp
index c6f73fe6e6..9270b97e02 100644
--- a/scene/gui/color_ramp_edit.cpp
+++ b/scene/gui/color_ramp_edit.cpp
@@ -42,7 +42,8 @@ ColorRampEdit::ColorRampEdit() {
add_child(popup);
checker = Ref<ImageTexture>(memnew(ImageTexture));
- checker->create_from_image(Image(checker_bg_png), ImageTexture::FLAG_REPEAT);
+ Ref<Image> img = memnew(Image(checker_bg_png));
+ checker->create_from_image(img, ImageTexture::FLAG_REPEAT);
}
int ColorRampEdit::_get_point_from_pos(int x) {
@@ -70,9 +71,11 @@ void ColorRampEdit::_show_color_picker() {
ColorRampEdit::~ColorRampEdit() {
}
-void ColorRampEdit::_gui_input(const InputEvent &p_event) {
+void ColorRampEdit::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && p_event.key.pressed && p_event.key.scancode == KEY_DELETE && grabbed != -1) {
+ Ref<InputEventKey> k = p_event;
+
+ if (k.is_valid() && k->is_pressed() && k->get_scancode() == KEY_DELETE && grabbed != -1) {
points.remove(grabbed);
grabbed = -1;
@@ -82,16 +85,17 @@ void ColorRampEdit::_gui_input(const InputEvent &p_event) {
accept_event();
}
+ Ref<InputEventMouseButton> mb = p_event;
//Show color picker on double click.
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.doubleclick && p_event.mouse_button.pressed) {
- grabbed = _get_point_from_pos(p_event.mouse_button.x);
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_doubleclick() && mb->is_pressed()) {
+ grabbed = _get_point_from_pos(mb->get_pos().x);
_show_color_picker();
accept_event();
}
//Delete point on right click
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 2 && p_event.mouse_button.pressed) {
- grabbed = _get_point_from_pos(p_event.mouse_button.x);
+ if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) {
+ grabbed = _get_point_from_pos(mb->get_pos().x);
if (grabbed != -1) {
points.remove(grabbed);
grabbed = -1;
@@ -103,9 +107,9 @@ void ColorRampEdit::_gui_input(const InputEvent &p_event) {
}
//Hold alt key to duplicate selected color
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed && p_event.key.mod.alt) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed() && mb->get_alt()) {
- int x = p_event.mouse_button.x;
+ int x = mb->get_pos().x;
grabbed = _get_point_from_pos(x);
if (grabbed != -1) {
@@ -127,10 +131,10 @@ void ColorRampEdit::_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
update();
- int x = p_event.mouse_button.x;
+ int x = mb->get_pos().x;
int total_w = get_size().width - get_size().height - 3;
//Check if color selector was clicked.
@@ -195,7 +199,7 @@ void ColorRampEdit::_gui_input(const InputEvent &p_event) {
emit_signal("ramp_changed");
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == 1 && !p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
if (grabbing) {
grabbing = false;
@@ -204,15 +208,18 @@ void ColorRampEdit::_gui_input(const InputEvent &p_event) {
update();
}
- if (p_event.type == InputEvent::MOUSE_MOTION && grabbing) {
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid() && grabbing) {
int total_w = get_size().width - get_size().height - 3;
- int x = p_event.mouse_motion.x;
+ int x = mm->get_pos().x;
+
float newofs = CLAMP(x / float(total_w), 0, 1);
//Snap to nearest point if holding shift
- if (p_event.key.mod.shift) {
+ if (mm->get_shift()) {
float snap_treshhold = 0.03;
float smallest_ofs = snap_treshhold;
bool founded = false;
diff --git a/scene/gui/color_ramp_edit.h b/scene/gui/color_ramp_edit.h
index 38176d2e77..ede8954040 100644
--- a/scene/gui/color_ramp_edit.h
+++ b/scene/gui/color_ramp_edit.h
@@ -56,7 +56,7 @@ class ColorRampEdit : public Control {
void _show_color_picker();
protected:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index e62a993651..1263dc91be 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2419,7 +2419,7 @@ void Control::_bind_methods() {
ClassDB::bind_method(D_METHOD("_font_changed"), &Control::_font_changed);
- BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::INPUT_EVENT, "event")));
+ BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size"));
BIND_VMETHOD(MethodInfo(Variant::OBJECT, "get_drag_data", PropertyInfo(Variant::VECTOR2, "pos")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "can_drop_data", PropertyInfo(Variant::VECTOR2, "pos"), PropertyInfo(Variant::NIL, "data")));
@@ -2507,7 +2507,7 @@ void Control::_bind_methods() {
BIND_CONSTANT(MOUSE_FILTER_IGNORE);
ADD_SIGNAL(MethodInfo("resized"));
- ADD_SIGNAL(MethodInfo("gui_input", PropertyInfo(Variant::INPUT_EVENT, "ev")));
+ ADD_SIGNAL(MethodInfo("gui_input", PropertyInfo(Variant::OBJECT, "ev", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
ADD_SIGNAL(MethodInfo("mouse_entered"));
ADD_SIGNAL(MethodInfo("mouse_exited"));
ADD_SIGNAL(MethodInfo("focus_entered"));
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index cf5321e907..627bc96fb1 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -53,25 +53,34 @@ void WindowDialog::_fix_size() {
Size2i viewport_size = get_viewport_rect().size;
// Windows require additional padding to keep the window chrome visible.
- Ref<StyleBoxTexture> panel = get_stylebox("panel", "WindowDialog");
-
+ Ref<StyleBox> panel = get_stylebox("panel", "WindowDialog");
+ float top = 0;
+ float left = 0;
+ float bottom = 0;
+ float right = 0;
// Check validity, because the theme could contain a different type of StyleBox
- if (panel.is_valid()) {
- float top = panel->get_expand_margin_size(MARGIN_TOP);
- float left = panel->get_expand_margin_size(MARGIN_LEFT);
- float bottom = panel->get_expand_margin_size(MARGIN_BOTTOM);
- float right = panel->get_expand_margin_size(MARGIN_RIGHT);
-
- pos.x = MAX(left, MIN(pos.x, viewport_size.x - size.x - right));
- pos.y = MAX(top, MIN(pos.y, viewport_size.y - size.y - bottom));
- set_global_position(pos);
-
- // Also resize the window to fit if a resize should be possible at all.
- if (resizable) {
- size.x = MIN(size.x, viewport_size.x - left - right);
- size.y = MIN(size.y, viewport_size.y - top - bottom);
- set_size(size);
- }
+ if (panel->get_class() == "StyleBoxTexture") {
+ Ref<StyleBoxTexture> panel_texture = panel->cast_to<StyleBoxTexture>();
+ top = panel_texture->get_expand_margin_size(MARGIN_TOP);
+ left = panel_texture->get_expand_margin_size(MARGIN_LEFT);
+ bottom = panel_texture->get_expand_margin_size(MARGIN_BOTTOM);
+ right = panel_texture->get_expand_margin_size(MARGIN_RIGHT);
+ } else if (panel->get_class() == "StyleBoxFlat") {
+ Ref<StyleBoxFlat> panel_flat = panel->cast_to<StyleBoxFlat>();
+ top = panel_flat->_get_additional_border_size(MARGIN_TOP);
+ left = panel_flat->_get_additional_border_size(MARGIN_LEFT);
+ bottom = panel_flat->_get_additional_border_size(MARGIN_BOTTOM);
+ right = panel_flat->_get_additional_border_size(MARGIN_RIGHT);
+ }
+
+ pos.x = MAX(left, MIN(pos.x, viewport_size.x - size.x - right));
+ pos.y = MAX(top, MIN(pos.y, viewport_size.y - size.y - bottom));
+ set_global_position(pos);
+
+ if (resizable) {
+ size.x = MIN(size.x, viewport_size.x - left - right);
+ size.y = MIN(size.y, viewport_size.y - top - bottom);
+ set_size(size);
}
}
@@ -96,29 +105,33 @@ bool WindowDialog::has_point(const Point2 &p_point) const {
return r.has_point(p_point);
}
-void WindowDialog::_gui_input(const InputEvent &p_event) {
+void WindowDialog::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
- if (p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT) {
+
+ if (mb->is_pressed()) {
// Begin a possible dragging operation.
- drag_type = _drag_hit_test(Point2(p_event.mouse_button.x, p_event.mouse_button.y));
+ drag_type = _drag_hit_test(Point2(mb->get_pos().x, mb->get_pos().y));
if (drag_type != DRAG_NONE)
drag_offset = get_global_mouse_position() - get_position();
drag_offset_far = get_position() + get_size() - get_global_mouse_position();
- } else if (drag_type != DRAG_NONE && !p_event.mouse_button.pressed) {
+ } else if (drag_type != DRAG_NONE && !mb->is_pressed()) {
// End a dragging operation.
drag_type = DRAG_NONE;
}
}
- if (p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid()) {
if (drag_type == DRAG_NONE) {
// Update the cursor while moving along the borders.
CursorShape cursor = CURSOR_ARROW;
if (resizable) {
- int preview_drag_type = _drag_hit_test(Point2(p_event.mouse_button.x, p_event.mouse_button.y));
+ int preview_drag_type = _drag_hit_test(Point2(mm->get_pos().x, mm->get_pos().y));
switch (preview_drag_type) {
case DRAG_RESIZE_TOP:
case DRAG_RESIZE_BOTTOM:
@@ -200,7 +213,7 @@ void WindowDialog::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
close_button->set_normal_texture(get_icon("close", "WindowDialog"));
close_button->set_pressed_texture(get_icon("close", "WindowDialog"));
- close_button->set_hover_texture(get_icon("close_hilite", "WindowDialog"));
+ close_button->set_hover_texture(get_icon("close_highlight", "WindowDialog"));
close_button->set_anchor(MARGIN_LEFT, ANCHOR_END);
close_button->set_begin(Point2(get_constant("close_h_ofs", "WindowDialog"), -get_constant("close_v_ofs", "WindowDialog")));
} break;
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index 2365df3d79..9d8f113caa 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -60,7 +60,7 @@ class WindowDialog : public Popup {
Point2 drag_offset_far;
bool resizable;
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _closed();
int _drag_hit_test(const Point2 &pos) const;
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 391b39443d..3527b834c7 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -61,21 +61,20 @@ void FileDialog::_notification(int p_what) {
}
}
-void FileDialog::_unhandled_input(const InputEvent &p_event) {
+void FileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::KEY && is_window_modal_on_top()) {
+ Ref<InputEventKey> k = p_event;
+ if (k.is_valid() && is_window_modal_on_top()) {
- const InputEventKey &k = p_event.key;
-
- if (k.pressed) {
+ if (k->is_pressed()) {
bool handled = true;
- switch (k.scancode) {
+ switch (k->get_scancode()) {
case KEY_H: {
- if (k.mod.command) {
+ if (k->get_command()) {
set_show_hidden_files(!show_hidden_files);
} else {
handled = false;
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 2afd0227c6..9873a677b2 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -115,7 +115,7 @@ private:
void _update_drives();
- void _unhandled_input(const InputEvent &p_event);
+ void _unhandled_input(const Ref<InputEvent> &p_event);
virtual void _post_popup();
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index d5df3bac67..c52cdd9325 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -367,13 +367,14 @@ bool GraphEdit::_filter_input(const Point2 &p_point) {
return false;
}
-void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
+void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
float grab_r_extend = 2.0;
- if (p_ev.type == InputEvent::MOUSE_BUTTON && p_ev.mouse_button.button_index == BUTTON_LEFT && p_ev.mouse_button.pressed) {
+ Ref<InputEventMouseButton> mb = p_ev;
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
Ref<Texture> port = get_icon("port", "GraphNode");
- Vector2 mpos(p_ev.mouse_button.x, p_ev.mouse_button.y);
+ Vector2 mpos(mb->get_pos().x, mb->get_pos().y);
float grab_r = port->get_width() * 0.5 * grab_r_extend;
for (int i = get_child_count() - 1; i >= 0; i--) {
@@ -479,14 +480,15 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
}
}
- if (p_ev.type == InputEvent::MOUSE_MOTION && connecting) {
+ Ref<InputEventMouseMotion> mm = p_ev;
+ if (mm.is_valid() && connecting) {
- connecting_to = Vector2(p_ev.mouse_motion.x, p_ev.mouse_motion.y);
+ connecting_to = mm->get_pos();
connecting_target = false;
top_layer->update();
Ref<Texture> port = get_icon("port", "GraphNode");
- Vector2 mpos(p_ev.mouse_button.x, p_ev.mouse_button.y);
+ Vector2 mpos = mm->get_pos();
float grab_r = port->get_width() * 0.5 * grab_r_extend;
for (int i = get_child_count() - 1; i >= 0; i--) {
@@ -526,7 +528,7 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
}
}
- if (p_ev.type == InputEvent::MOUSE_BUTTON && p_ev.mouse_button.button_index == BUTTON_LEFT && !p_ev.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && !mb->is_pressed()) {
if (connecting && connecting_target) {
@@ -544,7 +546,7 @@ void GraphEdit::_top_layer_input(const InputEvent &p_ev) {
} else if (!just_disconected) {
String from = connecting_from;
int from_slot = connecting_index;
- Vector2 ofs = Vector2(p_ev.mouse_button.x, p_ev.mouse_button.y);
+ Vector2 ofs = Vector2(mb->get_pos().x, mb->get_pos().y);
emit_signal("connection_to_empty", from, from_slot, ofs);
}
connecting = false;
@@ -579,7 +581,7 @@ void GraphEdit::_bake_segment2d(CanvasItem *p_where, float p_begin, float p_end,
if (p_depth >= p_min_depth && (dp < p_tol || p_depth >= p_max_depth)) {
- p_where->draw_line(beg, end, p_color.linear_interpolate(p_to_color, mp), 4, true);
+ p_where->draw_line(beg, end, p_color.linear_interpolate(p_to_color, mp), 2, true);
lines++;
} else {
_bake_segment2d(p_where, p_begin, mp, p_a, p_out, p_b, p_in, p_depth + 1, p_min_depth, p_max_depth, p_tol, p_color, p_to_color, lines);
@@ -598,7 +600,7 @@ void GraphEdit::_draw_cos_line(CanvasItem *p_where, const Vector2 &p_from, const
int cp_neg_len = get_constant("bezier_len_neg");
if (diff > 0) {
- cp_offset = MIN(cp_len, diff * 0.5);
+ cp_offset = MAX(cp_len, diff * 0.5);
} else {
cp_offset = MAX(MIN(cp_len - diff, cp_neg_len), -diff * 0.5);
}
@@ -739,18 +741,19 @@ void GraphEdit::set_selected(Node *p_child) {
}
}
-void GraphEdit::_gui_input(const InputEvent &p_ev) {
+void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
- if (p_ev.type == InputEvent::MOUSE_MOTION && (p_ev.mouse_motion.button_mask & BUTTON_MASK_MIDDLE || (p_ev.mouse_motion.button_mask & BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE)))) {
- h_scroll->set_value(h_scroll->get_value() - p_ev.mouse_motion.relative_x);
- v_scroll->set_value(v_scroll->get_value() - p_ev.mouse_motion.relative_y);
+ Ref<InputEventMouseMotion> mm = p_ev;
+ if (mm.is_valid() && (mm->get_button_mask() & BUTTON_MASK_MIDDLE || (mm->get_button_mask() & BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE)))) {
+ h_scroll->set_value(h_scroll->get_value() - mm->get_relative().x);
+ v_scroll->set_value(v_scroll->get_value() - mm->get_relative().y);
}
- if (p_ev.type == InputEvent::MOUSE_MOTION && dragging) {
+ if (mm.is_valid() && dragging) {
just_selected = true;
// TODO: Remove local mouse pos hack if/when InputEventMouseMotion is fixed to support floats
- //drag_accum+=Vector2(p_ev.mouse_motion.relative_x,p_ev.mouse_motion.relative_y);
+ //drag_accum+=Vector2(mm->get_relative().x,mm->get_relative().y);
drag_accum = get_local_mouse_pos() - drag_origin;
for (int i = get_child_count() - 1; i >= 0; i--) {
GraphNode *gn = get_child(i)->cast_to<GraphNode>();
@@ -767,7 +770,7 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
}
}
- if (p_ev.type == InputEvent::MOUSE_MOTION && box_selecting) {
+ if (mm.is_valid() && box_selecting) {
box_selecting_to = get_local_mouse_pos();
box_selecting_rect = Rect2(MIN(box_selecting_from.x, box_selecting_to.x),
@@ -794,11 +797,10 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
top_layer->update();
}
- if (p_ev.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> b = p_ev;
+ if (b.is_valid()) {
- const InputEventMouseButton &b = p_ev.mouse_button;
-
- if (b.button_index == BUTTON_RIGHT && b.pressed) {
+ if (b->get_button_index() == BUTTON_RIGHT && b->is_pressed()) {
if (box_selecting) {
box_selecting = false;
for (int i = get_child_count() - 1; i >= 0; i--) {
@@ -815,12 +817,12 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
connecting = false;
top_layer->update();
} else {
- emit_signal("popup_request", Vector2(b.global_x, b.global_y));
+ emit_signal("popup_request", b->get_global_pos());
}
}
}
- if (b.button_index == BUTTON_LEFT && !b.pressed && dragging) {
+ if (b->get_button_index() == BUTTON_LEFT && !b->is_pressed() && dragging) {
if (!just_selected && drag_accum == Vector2() && Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
//deselect current node
for (int i = get_child_count() - 1; i >= 0; i--) {
@@ -855,7 +857,7 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
connections_layer->update();
}
- if (b.button_index == BUTTON_LEFT && b.pressed) {
+ if (b->get_button_index() == BUTTON_LEFT && b->is_pressed()) {
GraphNode *gn = NULL;
GraphNode *gn_selected = NULL;
@@ -878,7 +880,7 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
if (gn) {
- if (_filter_input(Vector2(b.x, b.y)))
+ if (_filter_input(b->get_pos()))
return;
dragging = true;
@@ -903,14 +905,14 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
}
} else {
- if (_filter_input(Vector2(b.x, b.y)))
+ if (_filter_input(b->get_pos()))
return;
if (Input::get_singleton()->is_key_pressed(KEY_SPACE))
return;
box_selecting = true;
box_selecting_from = get_local_mouse_pos();
- if (b.mod.control) {
+ if (b->get_control()) {
box_selection_mode_aditive = true;
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
@@ -921,7 +923,7 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
previus_selected.push_back(gn);
}
- } else if (b.mod.shift) {
+ } else if (b->get_shift()) {
box_selection_mode_aditive = false;
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
@@ -947,41 +949,42 @@ void GraphEdit::_gui_input(const InputEvent &p_ev) {
}
}
- if (b.button_index == BUTTON_LEFT && !b.pressed && box_selecting) {
+ if (b->get_button_index() == BUTTON_LEFT && !b->is_pressed() && box_selecting) {
box_selecting = false;
previus_selected.clear();
top_layer->update();
}
- if (b.button_index == BUTTON_WHEEL_UP && b.pressed) {
+ if (b->get_button_index() == BUTTON_WHEEL_UP && b->is_pressed()) {
//too difficult to get right
//set_zoom(zoom*ZOOM_SCALE);
}
- if (b.button_index == BUTTON_WHEEL_DOWN && b.pressed) {
+ if (b->get_button_index() == BUTTON_WHEEL_DOWN && b->is_pressed()) {
//too difficult to get right
//set_zoom(zoom/ZOOM_SCALE);
}
- if (b.button_index == BUTTON_WHEEL_UP) {
- h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * b.factor / 8);
+ if (b->get_button_index() == BUTTON_WHEEL_UP) {
+ h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * b->get_factor() / 8);
}
- if (b.button_index == BUTTON_WHEEL_DOWN) {
- h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * b.factor / 8);
+ if (b->get_button_index() == BUTTON_WHEEL_DOWN) {
+ h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * b->get_factor() / 8);
}
- if (b.button_index == BUTTON_WHEEL_RIGHT) {
- v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * b.factor / 8);
+ if (b->get_button_index() == BUTTON_WHEEL_RIGHT) {
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * b->get_factor() / 8);
}
- if (b.button_index == BUTTON_WHEEL_LEFT) {
- v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * b.factor / 8);
+ if (b->get_button_index() == BUTTON_WHEEL_LEFT) {
+ v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * b->get_factor() / 8);
}
}
- if (p_ev.type == InputEvent::KEY && p_ev.key.scancode == KEY_D && p_ev.key.pressed && p_ev.key.mod.command) {
+ Ref<InputEventKey> k = p_ev;
+ if (k.is_valid() && k->get_scancode() == KEY_D && k->is_pressed() && k->get_command()) {
emit_signal("duplicate_nodes_request");
accept_event();
}
- if (p_ev.type == InputEvent::KEY && p_ev.key.scancode == KEY_DELETE && p_ev.key.pressed) {
+ if (k.is_valid() && k->get_scancode() == KEY_DELETE && k->is_pressed()) {
emit_signal("delete_nodes_request");
accept_event();
}
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index ff3867a059..22d053d312 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -119,11 +119,11 @@ private:
void _update_scroll();
void _scroll_moved(double);
- void _gui_input(const InputEvent &p_ev);
+ void _gui_input(const Ref<InputEvent> &p_ev);
Control *connections_layer;
GraphEditFilter *top_layer;
- void _top_layer_input(const InputEvent &p_ev);
+ void _top_layer_input(const Ref<InputEvent> &p_ev);
void _top_layer_draw();
void _connections_layer_draw();
void _update_scroll_offset();
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index f7bb866f6f..fb0ff4f320 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -574,18 +574,19 @@ Color GraphNode::get_connection_output_color(int p_idx) {
return conn_output_cache[p_idx].color;
}
-void GraphNode::_gui_input(const InputEvent &p_ev) {
+void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) {
- if (p_ev.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb = p_ev;
+ if (mb.is_valid()) {
ERR_EXPLAIN("GraphNode must be the child of a GraphEdit node.");
ERR_FAIL_COND(get_parent_control() == NULL);
print_line("INPUT EVENT BUTTON");
- if (p_ev.mouse_button.pressed && p_ev.mouse_button.button_index == BUTTON_LEFT) {
+ if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
- Vector2 mpos = Vector2(p_ev.mouse_button.x, p_ev.mouse_button.y);
+ Vector2 mpos = Vector2(mb->get_pos().x, mb->get_pos().y);
if (close_rect.size != Size2() && close_rect.has_point(mpos)) {
emit_signal("close_request");
accept_event();
@@ -608,13 +609,14 @@ void GraphNode::_gui_input(const InputEvent &p_ev) {
get_parent_control()->grab_focus();
}
- if (!p_ev.mouse_button.pressed && p_ev.mouse_button.button_index == BUTTON_LEFT) {
+ if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
resizing = false;
}
}
- if (resizing && p_ev.type == InputEvent::MOUSE_MOTION) {
- Vector2 mpos = Vector2(p_ev.mouse_motion.x, p_ev.mouse_motion.y);
+ Ref<InputEventMouseMotion> mm = p_ev;
+ if (resizing && mm.is_valid()) {
+ Vector2 mpos = mm->get_pos();
Vector2 diff = mpos - resizing_from;
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index e98d0b3d07..056b699aa6 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -102,7 +102,7 @@ private:
bool has_point(const Point2 &p_point) const;
protected:
- void _gui_input(const InputEvent &p_ev);
+ void _gui_input(const Ref<InputEvent> &p_ev);
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/input_action.cpp b/scene/gui/input_action.cpp
index 5b03338286..311cb4ab13 100644
--- a/scene/gui/input_action.cpp
+++ b/scene/gui/input_action.cpp
@@ -30,95 +30,73 @@
#include "input_action.h"
#include "os/keyboard.h"
-void ShortCut::set_shortcut(const InputEvent &p_shortcut) {
+void ShortCut::set_shortcut(const Ref<InputEvent> &p_shortcut) {
shortcut = p_shortcut;
emit_changed();
}
-InputEvent ShortCut::get_shortcut() const {
+Ref<InputEvent> ShortCut::get_shortcut() const {
return shortcut;
}
-bool ShortCut::is_shortcut(const InputEvent &p_event) const {
+bool ShortCut::is_shortcut(const Ref<InputEvent> &p_event) const {
- bool same = false;
-
- switch (p_event.type) {
-
- case InputEvent::KEY: {
-
- same = (shortcut.key.scancode == p_event.key.scancode && shortcut.key.mod == p_event.key.mod);
-
- } break;
- case InputEvent::JOYPAD_BUTTON: {
-
- same = (shortcut.joy_button.button_index == p_event.joy_button.button_index);
-
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- same = (shortcut.mouse_button.button_index == p_event.mouse_button.button_index);
-
- } break;
- case InputEvent::JOYPAD_MOTION: {
-
- same = (shortcut.joy_motion.axis == p_event.joy_motion.axis && (shortcut.joy_motion.axis_value < 0) == (p_event.joy_motion.axis_value < 0));
-
- } break;
- default: {};
- }
-
- return same;
+ return shortcut.is_valid() && shortcut->action_match(p_event);
}
String ShortCut::get_as_text() const {
+ if (shortcut.is_valid())
+ return shortcut->as_text();
+ else
+ return "None";
+#if 0
switch (shortcut.type) {
- case InputEvent::NONE: {
+ case Ref<InputEvent>::NONE: {
return "None";
} break;
- case InputEvent::KEY: {
+ case Ref<InputEvent>::KEY: {
String str;
- if (shortcut.key.mod.shift)
+ if (shortcut->get_shift())
str += RTR("Shift+");
- if (shortcut.key.mod.alt)
+ if (shortcut->get_alt())
str += RTR("Alt+");
- if (shortcut.key.mod.control)
+ if (shortcut->get_control())
str += RTR("Ctrl+");
- if (shortcut.key.mod.meta)
+ if (shortcut->get_metakey())
str += RTR("Meta+");
- str += keycode_get_string(shortcut.key.scancode).capitalize();
+ str += keycode_get_string(shortcut->get_scancode()).capitalize();
return str;
} break;
- case InputEvent::JOYPAD_BUTTON: {
+ case Ref<InputEvent>::JOYPAD_BUTTON: {
- String str = RTR("Device") + " " + itos(shortcut.device) + ", " + RTR("Button") + " " + itos(shortcut.joy_button.button_index);
+ String str = RTR("Device") + " " + itos(shortcut.device) + ", " + RTR("Button") + " " + itos(shortcut.joy_button->get_button_index());
str += ".";
return str;
} break;
- case InputEvent::MOUSE_BUTTON: {
+ case Ref<InputEvent>::MOUSE_BUTTON: {
String str = RTR("Device") + " " + itos(shortcut.device) + ", ";
- switch (shortcut.mouse_button.button_index) {
+ switch (shortcut->get_button_index()) {
case BUTTON_LEFT: str += RTR("Left Button."); break;
case BUTTON_RIGHT: str += RTR("Right Button."); break;
case BUTTON_MIDDLE: str += RTR("Middle Button."); break;
case BUTTON_WHEEL_UP: str += RTR("Wheel Up."); break;
case BUTTON_WHEEL_DOWN: str += RTR("Wheel Down."); break;
- default: str += RTR("Button") + " " + itos(shortcut.mouse_button.button_index) + ".";
+ default: str += RTR("Button") + " " + itos(shortcut->get_button_index()) + ".";
}
return str;
} break;
- case InputEvent::JOYPAD_MOTION: {
+ case Ref<InputEvent>::JOYPAD_MOTION: {
int ax = shortcut.joy_motion.axis;
String str = RTR("Device") + " " + itos(shortcut.device) + ", " + RTR("Axis") + " " + itos(ax) + ".";
@@ -128,24 +106,25 @@ String ShortCut::get_as_text() const {
}
return "";
+#endif
}
bool ShortCut::is_valid() const {
- return shortcut.type != InputEvent::NONE;
+ return shortcut.is_valid();
}
void ShortCut::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_shortcut", "event"), &ShortCut::set_shortcut);
- ClassDB::bind_method(D_METHOD("get_shortcut"), &ShortCut::get_shortcut);
+ ClassDB::bind_method(D_METHOD("set_shortcut", "event:InputEvent"), &ShortCut::set_shortcut);
+ ClassDB::bind_method(D_METHOD("get_shortcut:InputEvent"), &ShortCut::get_shortcut);
ClassDB::bind_method(D_METHOD("is_valid"), &ShortCut::is_valid);
- ClassDB::bind_method(D_METHOD("is_shortcut", "event"), &ShortCut::is_shortcut);
+ ClassDB::bind_method(D_METHOD("is_shortcut", "event:InputEvent"), &ShortCut::is_shortcut);
ClassDB::bind_method(D_METHOD("get_as_text"), &ShortCut::get_as_text);
- ADD_PROPERTY(PropertyInfo(Variant::INPUT_EVENT, "shortcut"), "set_shortcut", "get_shortcut");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shortcut", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"), "set_shortcut", "get_shortcut");
}
ShortCut::ShortCut() {
diff --git a/scene/gui/input_action.h b/scene/gui/input_action.h
index c33490ae1d..6d13d8bd40 100644
--- a/scene/gui/input_action.h
+++ b/scene/gui/input_action.h
@@ -30,21 +30,22 @@
#ifndef INPUTACTION_H
#define INPUTACTION_H
+#include "os/input_event.h"
#include "resource.h"
class ShortCut : public Resource {
GDCLASS(ShortCut, Resource);
- InputEvent shortcut;
+ Ref<InputEvent> shortcut;
protected:
static void _bind_methods();
public:
- void set_shortcut(const InputEvent &p_shortcut);
- InputEvent get_shortcut() const;
- bool is_shortcut(const InputEvent &p_Event) const;
+ void set_shortcut(const Ref<InputEvent> &p_shortcut);
+ Ref<InputEvent> get_shortcut() const;
+ bool is_shortcut(const Ref<InputEvent> &p_Event) const;
bool is_valid() const;
String get_as_text() const;
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index b79104ba39..494dde0e20 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -42,7 +42,6 @@ void ItemList::add_item(const String &p_item, const Ref<Texture> &p_texture, boo
item.disabled = false;
item.tooltip_enabled = true;
item.custom_bg = Color(0, 0, 0, 0);
- item.custom_font_color = get_color("font_color");
items.push_back(item);
update();
@@ -152,20 +151,6 @@ Color ItemList::get_item_custom_bg_color(int p_idx) const {
return items[p_idx].custom_bg;
}
-void ItemList::set_item_custom_font_color(int p_idx, const Color &p_custom_font_color) {
-
- ERR_FAIL_INDEX(p_idx, items.size());
-
- items[p_idx].custom_font_color = p_custom_font_color;
-}
-
-Color ItemList::get_item_custom_font_color(int p_idx) const {
-
- ERR_FAIL_INDEX_V(p_idx, items.size(), Color());
-
- return items[p_idx].custom_font_color;
-}
-
void ItemList::set_item_tag_icon(int p_idx, const Ref<Texture> &p_tag_icon) {
ERR_FAIL_INDEX(p_idx, items.size());
@@ -424,14 +409,17 @@ Size2 ItemList::Item::get_icon_size() const {
return icon_region.size;
}
-void ItemList::_gui_input(const InputEvent &p_event) {
+void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
- if (defer_select_single >= 0 && p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_event;
+ if (defer_select_single >= 0 && mm.is_valid()) {
defer_select_single = -1;
return;
}
- if (defer_select_single >= 0 && p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_LEFT && !p_event.mouse_button.pressed) {
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (defer_select_single >= 0 && mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && !mb->is_pressed()) {
select(defer_select_single, true);
@@ -440,12 +428,10 @@ void ItemList::_gui_input(const InputEvent &p_event) {
return;
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && (p_event.mouse_button.button_index == BUTTON_LEFT || (allow_rmb_select && p_event.mouse_button.button_index == BUTTON_RIGHT)) && p_event.mouse_button.pressed) {
-
- const InputEventMouseButton &mb = p_event.mouse_button;
+ if (mb.is_valid() && (mb->get_button_index() == BUTTON_LEFT || (allow_rmb_select && mb->get_button_index() == BUTTON_RIGHT)) && mb->is_pressed()) {
search_string = ""; //any mousepress cancels
- Vector2 pos(mb.x, mb.y);
+ Vector2 pos(mb->get_pos().x, mb->get_pos().y);
Ref<StyleBox> bg = get_stylebox("bg");
pos -= bg->get_offset();
pos.y += scroll_bar->get_value();
@@ -469,11 +455,11 @@ void ItemList::_gui_input(const InputEvent &p_event) {
int i = closest;
- if (select_mode == SELECT_MULTI && items[i].selected && mb.mod.command) {
+ if (select_mode == SELECT_MULTI && items[i].selected && mb->get_command()) {
unselect(i);
emit_signal("multi_selected", i, false);
- } else if (select_mode == SELECT_MULTI && mb.mod.shift && current >= 0 && current < items.size() && current != i) {
+ } else if (select_mode == SELECT_MULTI && mb->get_shift() && current >= 0 && current < items.size() && current != i) {
int from = current;
int to = i;
@@ -487,24 +473,24 @@ void ItemList::_gui_input(const InputEvent &p_event) {
emit_signal("multi_selected", i, true);
}
- if (p_event.mouse_button.button_index == BUTTON_RIGHT) {
+ if (mb->get_button_index() == BUTTON_RIGHT) {
- emit_signal("item_rmb_selected", i, Vector2(mb.x, mb.y));
+ emit_signal("item_rmb_selected", i, Vector2(mb->get_pos().x, mb->get_pos().y));
}
} else {
- if (!mb.doubleclick && !mb.mod.command && select_mode == SELECT_MULTI && items[i].selectable && !items[i].disabled && items[i].selected && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ if (!mb->is_doubleclick() && !mb->get_command() && select_mode == SELECT_MULTI && items[i].selectable && !items[i].disabled && items[i].selected && mb->get_button_index() == BUTTON_LEFT) {
defer_select_single = i;
return;
}
- if (items[i].selected && p_event.mouse_button.button_index == BUTTON_RIGHT) {
+ if (items[i].selected && mb->get_button_index() == BUTTON_RIGHT) {
- emit_signal("item_rmb_selected", i, Vector2(mb.x, mb.y));
+ emit_signal("item_rmb_selected", i, Vector2(mb->get_pos().x, mb->get_pos().y));
} else {
bool selected = !items[i].selected;
- select(i, select_mode == SELECT_SINGLE || !mb.mod.command);
+ select(i, select_mode == SELECT_SINGLE || !mb->get_command());
if (selected) {
if (select_mode == SELECT_SINGLE) {
@@ -513,10 +499,10 @@ void ItemList::_gui_input(const InputEvent &p_event) {
emit_signal("multi_selected", i, true);
}
- if (p_event.mouse_button.button_index == BUTTON_RIGHT) {
+ if (mb->get_button_index() == BUTTON_RIGHT) {
- emit_signal("item_rmb_selected", i, Vector2(mb.x, mb.y));
- } else if (/*select_mode==SELECT_SINGLE &&*/ mb.doubleclick) {
+ emit_signal("item_rmb_selected", i, Vector2(mb->get_pos().x, mb->get_pos().y));
+ } else if (/*select_mode==SELECT_SINGLE &&*/ mb->is_doubleclick()) {
emit_signal("item_activated", i);
}
@@ -531,21 +517,21 @@ void ItemList::_gui_input(const InputEvent &p_event) {
}
}
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_WHEEL_UP && p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
- scroll_bar->set_value(scroll_bar->get_value() - scroll_bar->get_page() * p_event.mouse_button.factor / 8);
+ scroll_bar->set_value(scroll_bar->get_value() - scroll_bar->get_page() * mb->get_factor() / 8);
scroll_bar->set_value(scroll_bar->get_value() - scroll_bar->get_page() / 8);
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_WHEEL_DOWN && p_event.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
- scroll_bar->set_value(scroll_bar->get_value() + scroll_bar->get_page() * p_event.mouse_button.factor / 8);
+ scroll_bar->set_value(scroll_bar->get_value() + scroll_bar->get_page() * mb->get_factor() / 8);
scroll_bar->set_value(scroll_bar->get_value() + scroll_bar->get_page() / 8);
}
- if (p_event.is_pressed() && items.size() > 0) {
- if (p_event.is_action("ui_up")) {
+ if (p_event->is_pressed() && items.size() > 0) {
+ if (p_event->is_action("ui_up")) {
if (search_string != "") {
@@ -580,7 +566,7 @@ void ItemList::_gui_input(const InputEvent &p_event) {
}
accept_event();
}
- } else if (p_event.is_action("ui_down")) {
+ } else if (p_event->is_action("ui_down")) {
if (search_string != "") {
@@ -614,7 +600,7 @@ void ItemList::_gui_input(const InputEvent &p_event) {
}
accept_event();
}
- } else if (p_event.is_action("ui_page_up")) {
+ } else if (p_event->is_action("ui_page_up")) {
search_string = ""; //any mousepress cancels
@@ -629,7 +615,7 @@ void ItemList::_gui_input(const InputEvent &p_event) {
break;
}
}
- } else if (p_event.is_action("ui_page_down")) {
+ } else if (p_event->is_action("ui_page_down")) {
search_string = ""; //any mousepress cancels
@@ -645,7 +631,7 @@ void ItemList::_gui_input(const InputEvent &p_event) {
break;
}
}
- } else if (p_event.is_action("ui_left")) {
+ } else if (p_event->is_action("ui_left")) {
search_string = ""; //any mousepress cancels
@@ -657,7 +643,7 @@ void ItemList::_gui_input(const InputEvent &p_event) {
}
accept_event();
}
- } else if (p_event.is_action("ui_right")) {
+ } else if (p_event->is_action("ui_right")) {
search_string = ""; //any mousepress cancels
@@ -669,9 +655,9 @@ void ItemList::_gui_input(const InputEvent &p_event) {
}
accept_event();
}
- } else if (p_event.is_action("ui_cancel")) {
+ } else if (p_event->is_action("ui_cancel")) {
search_string = "";
- } else if (p_event.is_action("ui_select")) {
+ } else if (p_event->is_action("ui_select")) {
if (select_mode == SELECT_MULTI && current >= 0 && current < items.size()) {
if (items[current].selectable && !items[current].disabled && !items[current].selected) {
@@ -682,15 +668,17 @@ void ItemList::_gui_input(const InputEvent &p_event) {
emit_signal("multi_selected", current, false);
}
}
- } else if (p_event.is_action("ui_accept")) {
+ } else if (p_event->is_action("ui_accept")) {
search_string = ""; //any mousepress cance
if (current >= 0 && current < items.size()) {
emit_signal("item_activated", current);
}
- } else if (p_event.type == InputEvent::KEY) {
+ } else {
+
+ Ref<InputEventKey> k = p_event;
- if (p_event.key.unicode) {
+ if (k.is_valid() && k->get_unicode()) {
uint64_t now = OS::get_singleton()->get_ticks_msec();
uint64_t diff = now - search_time_msec;
@@ -701,7 +689,7 @@ void ItemList::_gui_input(const InputEvent &p_event) {
search_string = "";
}
- search_string += String::chr(p_event.key.unicode);
+ search_string += String::chr(k->get_unicode());
for (int i = 0; i < items.size(); i++) {
if (items[i].text.begins_with(search_string)) {
set_current(i);
@@ -1032,8 +1020,7 @@ void ItemList::_notification(int p_what) {
else
max_len = size.x;
- Color font_color_2 = items[i].custom_font_color;
- Color modulate = items[i].selected ? font_color_selected : font_color_2;
+ Color modulate = items[i].selected ? font_color_selected : font_color;
if (items[i].disabled)
modulate.a *= 0.5;
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index 96a894d3fd..c7abc2990f 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -62,7 +62,6 @@ private:
Variant metadata;
String tooltip;
Color custom_bg;
- Color custom_font_color;
Rect2 rect_cache;
Rect2 min_rect_cache;
@@ -105,7 +104,7 @@ private:
real_t icon_scale;
void _scroll_changed(double);
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
protected:
void _notification(int p_what);
@@ -145,9 +144,6 @@ public:
void set_item_custom_bg_color(int p_idx, const Color &p_custom_bg_color);
Color get_item_custom_bg_color(int p_idx) const;
- void set_item_custom_font_color(int p_idx, const Color &p_custom_font_color);
- Color get_item_custom_font_color(int p_idx) const;
-
void select(int p_idx, bool p_single = true);
void unselect(int p_idx);
bool is_selected(int p_idx) const;
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 8bb6828fa6..38debe8a77 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -42,445 +42,442 @@ static bool _is_text_char(CharType c) {
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
}
-void LineEdit::_gui_input(InputEvent p_event) {
+void LineEdit::_gui_input(Ref<InputEvent> p_event) {
- switch (p_event.type) {
+ Ref<InputEventMouseButton> b = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (b.is_valid()) {
- const InputEventMouseButton &b = p_event.mouse_button;
-
- if (b.pressed && b.button_index == BUTTON_RIGHT) {
- menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
- menu->set_size(Vector2(1, 1));
- menu->popup();
- grab_focus();
- return;
- }
+ if (b->is_pressed() && b->get_button_index() == BUTTON_RIGHT) {
+ menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
+ menu->set_size(Vector2(1, 1));
+ menu->popup();
+ grab_focus();
+ return;
+ }
- if (b.button_index != BUTTON_LEFT)
- break;
+ if (b->get_button_index() != BUTTON_LEFT)
+ return;
- _reset_caret_blink_timer();
- if (b.pressed) {
+ _reset_caret_blink_timer();
+ if (b->is_pressed()) {
- shift_selection_check_pre(b.mod.shift);
+ shift_selection_check_pre(b->get_shift());
- set_cursor_at_pixel_pos(b.x);
+ set_cursor_at_pixel_pos(b->get_pos().x);
- if (b.mod.shift) {
+ if (b->get_shift()) {
- selection_fill_at_cursor();
- selection.creating = true;
+ selection_fill_at_cursor();
+ selection.creating = true;
- } else {
+ } else {
- if (b.doubleclick) {
+ if (b->is_doubleclick()) {
- selection.enabled = true;
- selection.begin = 0;
- selection.end = text.length();
- selection.doubleclick = true;
- }
+ selection.enabled = true;
+ selection.begin = 0;
+ selection.end = text.length();
+ selection.doubleclick = true;
+ }
- selection.drag_attempt = false;
+ selection.drag_attempt = false;
- if ((cursor_pos < selection.begin) || (cursor_pos > selection.end) || !selection.enabled) {
+ if ((cursor_pos < selection.begin) || (cursor_pos > selection.end) || !selection.enabled) {
- selection_clear();
- selection.cursor_start = cursor_pos;
- selection.creating = true;
- } else if (selection.enabled) {
+ selection_clear();
+ selection.cursor_start = cursor_pos;
+ selection.creating = true;
+ } else if (selection.enabled) {
- selection.drag_attempt = true;
- }
+ selection.drag_attempt = true;
}
+ }
- update();
-
- } else {
+ update();
- if ((!selection.creating) && (!selection.doubleclick)) {
- selection_clear();
- }
- selection.creating = false;
- selection.doubleclick = false;
+ } else {
- if (OS::get_singleton()->has_virtual_keyboard())
- OS::get_singleton()->show_virtual_keyboard(text, get_global_rect());
+ if ((!selection.creating) && (!selection.doubleclick)) {
+ selection_clear();
}
+ selection.creating = false;
+ selection.doubleclick = false;
- update();
- } break;
- case InputEvent::MOUSE_MOTION: {
+ if (OS::get_singleton()->has_virtual_keyboard())
+ OS::get_singleton()->show_virtual_keyboard(text, get_global_rect());
+ }
- const InputEventMouseMotion &m = p_event.mouse_motion;
+ update();
+ }
- if (m.button_mask & BUTTON_LEFT) {
+ Ref<InputEventMouseMotion> m = p_event;
- if (selection.creating) {
- set_cursor_at_pixel_pos(m.x);
- selection_fill_at_cursor();
- }
- }
+ if (m.is_valid()) {
- } break;
- case InputEvent::KEY: {
+ if (m->get_button_mask() & BUTTON_LEFT) {
- const InputEventKey &k = p_event.key;
+ if (selection.creating) {
+ set_cursor_at_pixel_pos(m->get_pos().x);
+ selection_fill_at_cursor();
+ }
+ }
+ }
- if (!k.pressed)
- return;
- unsigned int code = k.scancode;
+ Ref<InputEventKey> k = p_event;
- if (k.mod.command) {
+ if (k.is_valid()) {
- bool handled = true;
+ if (!k->is_pressed())
+ return;
+ unsigned int code = k->get_scancode();
- switch (code) {
+ if (k->get_command()) {
- case (KEY_X): { // CUT
+ bool handled = true;
- if (editable) {
- cut_text();
- }
+ switch (code) {
- } break;
+ case (KEY_X): { // CUT
- case (KEY_C): { // COPY
+ if (editable) {
+ cut_text();
+ }
- copy_text();
+ } break;
- } break;
+ case (KEY_C): { // COPY
- case (KEY_V): { // PASTE
+ copy_text();
- if (editable) {
+ } break;
- paste_text();
- }
+ case (KEY_V): { // PASTE
- } break;
+ if (editable) {
- case (KEY_Z): { // Simple One level undo
+ paste_text();
+ }
- if (editable) {
+ } break;
- undo();
- }
+ case (KEY_Z): { // Simple One level undo
- } break;
+ if (editable) {
+
+ undo();
+ }
- case (KEY_U): { // Delete from start to cursor
+ } break;
- if (editable) {
+ case (KEY_U): { // Delete from start to cursor
- selection_clear();
- undo_text = text;
- text = text.substr(cursor_pos, text.length() - cursor_pos);
+ if (editable) {
- Ref<Font> font = get_font("font");
+ selection_clear();
+ undo_text = text;
+ text = text.substr(cursor_pos, text.length() - cursor_pos);
- cached_width = 0;
- if (font != NULL) {
- for (int i = 0; i < text.length(); i++)
- cached_width += font->get_char_size(text[i]).width;
- }
+ Ref<Font> font = get_font("font");
- set_cursor_pos(0);
- _text_changed();
+ cached_width = 0;
+ if (font != NULL) {
+ for (int i = 0; i < text.length(); i++)
+ cached_width += font->get_char_size(text[i]).width;
}
- } break;
+ set_cursor_pos(0);
+ _text_changed();
+ }
- case (KEY_Y): { // PASTE (Yank for unix users)
+ } break;
- if (editable) {
+ case (KEY_Y): { // PASTE (Yank for unix users)
- paste_text();
- }
+ if (editable) {
- } break;
- case (KEY_K): { // Delete from cursor_pos to end
+ paste_text();
+ }
- if (editable) {
+ } break;
+ case (KEY_K): { // Delete from cursor_pos to end
- selection_clear();
- undo_text = text;
- text = text.substr(0, cursor_pos);
- _text_changed();
- }
+ if (editable) {
- } break;
- case (KEY_A): { //Select All
- select();
- } break;
- default: { handled = false; }
- }
+ selection_clear();
+ undo_text = text;
+ text = text.substr(0, cursor_pos);
+ _text_changed();
+ }
- if (handled) {
- accept_event();
- return;
- }
+ } break;
+ case (KEY_A): { //Select All
+ select();
+ } break;
+ default: { handled = false; }
}
- _reset_caret_blink_timer();
- if (!k.mod.meta) {
+ if (handled) {
+ accept_event();
+ return;
+ }
+ }
- bool handled = true;
- switch (code) {
+ _reset_caret_blink_timer();
+ if (!k->get_metakey()) {
- case KEY_ENTER:
- case KEY_RETURN: {
+ bool handled = true;
+ switch (code) {
- emit_signal("text_entered", text);
- if (OS::get_singleton()->has_virtual_keyboard())
- OS::get_singleton()->hide_virtual_keyboard();
+ case KEY_ENTER:
+ case KEY_RETURN: {
- return;
- } break;
+ emit_signal("text_entered", text);
+ if (OS::get_singleton()->has_virtual_keyboard())
+ OS::get_singleton()->hide_virtual_keyboard();
- case KEY_BACKSPACE: {
+ return;
+ } break;
- if (!editable)
- break;
+ case KEY_BACKSPACE: {
- if (selection.enabled) {
- undo_text = text;
- selection_delete();
- break;
- }
+ if (!editable)
+ break;
+
+ if (selection.enabled) {
+ undo_text = text;
+ selection_delete();
+ break;
+ }
#ifdef APPLE_STYLE_KEYS
- if (k.mod.alt) {
+ if (k->get_alt()) {
#else
- if (k.mod.alt) {
- handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- int cc = cursor_pos;
- bool prev_char = false;
+ int cc = cursor_pos;
+ bool prev_char = false;
- while (cc > 0) {
- bool ischar = _is_text_char(text[cc - 1]);
+ while (cc > 0) {
+ bool ischar = _is_text_char(text[cc - 1]);
- if (prev_char && !ischar)
- break;
+ if (prev_char && !ischar)
+ break;
- prev_char = ischar;
- cc--;
- }
+ prev_char = ischar;
+ cc--;
+ }
- delete_text(cc, cursor_pos);
+ delete_text(cc, cursor_pos);
- set_cursor_pos(cc);
+ set_cursor_pos(cc);
- } else {
- undo_text = text;
- delete_char();
- }
+ } else {
+ undo_text = text;
+ delete_char();
+ }
- } break;
- case KEY_KP_4: {
- if (k.unicode != 0) {
- handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_left
+ } break;
+ case KEY_KP_4: {
+ if (k->get_unicode() != 0) {
+ handled = false;
+ break;
}
- case KEY_LEFT: {
+ // numlock disabled. fallthrough to key_left
+ }
+ case KEY_LEFT: {
#ifndef APPLE_STYLE_KEYS
- if (!k.mod.alt)
+ if (!k->get_alt())
#endif
- shift_selection_check_pre(k.mod.shift);
+ shift_selection_check_pre(k->get_shift());
#ifdef APPLE_STYLE_KEYS
- if (k.mod.command) {
- set_cursor_pos(0);
- } else if (k.mod.alt) {
+ if (k->get_command()) {
+ set_cursor_pos(0);
+ } else if (k->get_alt()) {
#else
- if (k.mod.alt) {
- handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- bool prev_char = false;
- int cc = cursor_pos;
+ bool prev_char = false;
+ int cc = cursor_pos;
- while (cc > 0) {
- bool ischar = _is_text_char(text[cc - 1]);
+ while (cc > 0) {
+ bool ischar = _is_text_char(text[cc - 1]);
- if (prev_char && !ischar)
- break;
+ if (prev_char && !ischar)
+ break;
- prev_char = ischar;
- cc--;
- }
+ prev_char = ischar;
+ cc--;
+ }
- set_cursor_pos(cc);
+ set_cursor_pos(cc);
- } else {
- set_cursor_pos(get_cursor_pos() - 1);
- }
+ } else {
+ set_cursor_pos(get_cursor_pos() - 1);
+ }
- shift_selection_check_post(k.mod.shift);
+ shift_selection_check_post(k->get_shift());
- } break;
- case KEY_KP_6: {
- if (k.unicode != 0) {
- handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_right
+ } break;
+ case KEY_KP_6: {
+ if (k->get_unicode() != 0) {
+ handled = false;
+ break;
}
- case KEY_RIGHT: {
+ // numlock disabled. fallthrough to key_right
+ }
+ case KEY_RIGHT: {
- shift_selection_check_pre(k.mod.shift);
+ shift_selection_check_pre(k->get_shift());
#ifdef APPLE_STYLE_KEYS
- if (k.mod.command) {
- set_cursor_pos(text.length());
- } else if (k.mod.alt) {
+ if (k->get_command()) {
+ set_cursor_pos(text.length());
+ } else if (k->get_alt()) {
#else
- if (k.mod.alt) {
- handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- bool prev_char = false;
- int cc = cursor_pos;
+ bool prev_char = false;
+ int cc = cursor_pos;
- while (cc < text.length()) {
- bool ischar = _is_text_char(text[cc]);
+ while (cc < text.length()) {
+ bool ischar = _is_text_char(text[cc]);
- if (prev_char && !ischar)
- break;
+ if (prev_char && !ischar)
+ break;
- prev_char = ischar;
- cc++;
- }
+ prev_char = ischar;
+ cc++;
+ }
- set_cursor_pos(cc);
+ set_cursor_pos(cc);
- } else {
- set_cursor_pos(get_cursor_pos() + 1);
- }
+ } else {
+ set_cursor_pos(get_cursor_pos() + 1);
+ }
- shift_selection_check_post(k.mod.shift);
+ shift_selection_check_post(k->get_shift());
- } break;
- case KEY_DELETE: {
+ } break;
+ case KEY_DELETE: {
- if (!editable)
- break;
+ if (!editable)
+ break;
- if (k.mod.shift && !k.mod.command && !k.mod.alt) {
- cut_text();
- break;
- }
+ if (k->get_shift() && !k->get_command() && !k->get_alt()) {
+ cut_text();
+ break;
+ }
- if (selection.enabled) {
- undo_text = text;
- selection_delete();
- break;
- }
+ if (selection.enabled) {
+ undo_text = text;
+ selection_delete();
+ break;
+ }
- int text_len = text.length();
+ int text_len = text.length();
- if (cursor_pos == text_len)
- break; // nothing to do
+ if (cursor_pos == text_len)
+ break; // nothing to do
#ifdef APPLE_STYLE_KEYS
- if (k.mod.alt) {
+ if (k->get_alt()) {
#else
- if (k.mod.alt) {
- handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- int cc = cursor_pos;
-
- bool prev_char = false;
+ int cc = cursor_pos;
- while (cc < text.length()) {
+ bool prev_char = false;
- bool ischar = _is_text_char(text[cc]);
+ while (cc < text.length()) {
- if (prev_char && !ischar)
- break;
- prev_char = ischar;
- cc++;
- }
+ bool ischar = _is_text_char(text[cc]);
- delete_text(cursor_pos, cc);
-
- } else {
- undo_text = text;
- set_cursor_pos(cursor_pos + 1);
- delete_char();
+ if (prev_char && !ischar)
+ break;
+ prev_char = ischar;
+ cc++;
}
- } break;
- case KEY_KP_7: {
- if (k.unicode != 0) {
- handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_home
- }
- case KEY_HOME: {
+ delete_text(cursor_pos, cc);
- shift_selection_check_pre(k.mod.shift);
- set_cursor_pos(0);
- shift_selection_check_post(k.mod.shift);
- } break;
- case KEY_KP_1: {
- if (k.unicode != 0) {
- handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_end
+ } else {
+ undo_text = text;
+ set_cursor_pos(cursor_pos + 1);
+ delete_char();
}
- case KEY_END: {
- shift_selection_check_pre(k.mod.shift);
- set_cursor_pos(text.length());
- shift_selection_check_post(k.mod.shift);
- } break;
-
- default: {
+ } break;
+ case KEY_KP_7: {
+ if (k->get_unicode() != 0) {
+ handled = false;
+ break;
+ }
+ // numlock disabled. fallthrough to key_home
+ }
+ case KEY_HOME: {
+ shift_selection_check_pre(k->get_shift());
+ set_cursor_pos(0);
+ shift_selection_check_post(k->get_shift());
+ } break;
+ case KEY_KP_1: {
+ if (k->get_unicode() != 0) {
handled = false;
- } break;
+ break;
+ }
+ // numlock disabled. fallthrough to key_end
}
+ case KEY_END: {
- if (handled) {
- accept_event();
- } else if (!k.mod.alt && !k.mod.command) {
- if (k.unicode >= 32 && k.scancode != KEY_DELETE) {
-
- if (editable) {
- selection_delete();
- CharType ucodestr[2] = { (CharType)k.unicode, 0 };
- append_at_cursor(ucodestr);
- _text_changed();
- accept_event();
- }
+ shift_selection_check_pre(k->get_shift());
+ set_cursor_pos(text.length());
+ shift_selection_check_post(k->get_shift());
+ } break;
- } else {
- return;
+ default: {
+
+ handled = false;
+ } break;
+ }
+
+ if (handled) {
+ accept_event();
+ } else if (!k->get_alt() && !k->get_command()) {
+ if (k->get_unicode() >= 32 && k->get_scancode() != KEY_DELETE) {
+
+ if (editable) {
+ selection_delete();
+ CharType ucodestr[2] = { (CharType)k->get_unicode(), 0 };
+ append_at_cursor(ucodestr);
+ _text_changed();
+ accept_event();
}
- }
- update();
+ } else {
+ return;
+ }
}
- return;
+ update();
+ }
- } break;
+ return;
}
}
@@ -576,7 +573,7 @@ void LineEdit::_notification(int p_what) {
RID ci = get_canvas_item();
- Ref<StyleBox> style = has_focus() ? get_stylebox("active") : get_stylebox("normal");
+ Ref<StyleBox> style = get_stylebox("normal");
if (!is_editable())
style = get_stylebox("read_only");
@@ -617,7 +614,7 @@ void LineEdit::_notification(int p_what) {
int font_ascent = font->get_ascent();
Color selection_color = get_color("selection_color");
- Color font_color = is_editable() ? has_focus() ? get_color("font_color_active") : get_color("font_color") : get_color("font_color_read_only");
+ Color font_color = get_color("font_color");
Color font_color_selected = get_color("font_color_selected");
Color cursor_color = get_color("cursor_color");
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index a969095947..1167cfb6d0 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -119,7 +119,7 @@ private:
void _editor_settings_changed();
#endif
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
protected:
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index cf468f2257..fe76b16460 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -31,9 +31,9 @@
#include "os/keyboard.h"
#include "scene/main/viewport.h"
-void MenuButton::_unhandled_key_input(InputEvent p_event) {
+void MenuButton::_unhandled_key_input(Ref<InputEvent> p_event) {
- if (p_event.is_pressed() && !p_event.is_echo() && (p_event.type == InputEvent::KEY || p_event.type == InputEvent::ACTION || p_event.type == InputEvent::JOYPAD_BUTTON)) {
+ if (p_event->is_pressed() && !p_event->is_echo() && (p_event->cast_to<InputEventKey>() || p_event->cast_to<InputEventJoypadButton>() || p_event->cast_to<InputEventAction>())) {
if (!get_parent() || !is_visible_in_tree() || is_disabled())
return;
@@ -59,10 +59,10 @@ void MenuButton::pressed() {
popup->set_invalidate_click_until_motion();
}
-void MenuButton::_gui_input(InputEvent p_event) {
+void MenuButton::_gui_input(Ref<InputEvent> p_event) {
- /*if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT) {
- clicked=p_event.mouse_button.pressed;
+ /*if (p_event.type==InputEvent::MOUSE_BUTTON && p_event->get_button_index()==BUTTON_LEFT) {
+ clicked=p_event->is_pressed();
}
if (clicked && p_event.type==InputEvent::MOUSE_MOTION && popup->is_visible_in_tree()) {
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h
index e07627c07c..6bb23452dd 100644
--- a/scene/gui/menu_button.h
+++ b/scene/gui/menu_button.h
@@ -43,11 +43,11 @@ class MenuButton : public Button {
PopupMenu *popup;
virtual void pressed();
- void _unhandled_key_input(InputEvent p_event);
+ void _unhandled_key_input(Ref<InputEvent> p_event);
Array _get_items() const;
void _set_items(const Array &p_items);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
protected:
static void _bind_methods();
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index b967a1a7ce..0806d35d48 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -56,24 +56,7 @@ void OptionButton::_notification(int p_what) {
Size2 size = get_size();
Point2 ofs(size.width - arrow->get_width() - get_constant("arrow_margin"), int(Math::abs((size.height - arrow->get_height()) / 2)));
-
- Color arrow_color = get_color("font_color");
- switch (get_draw_mode()) {
- case DRAW_NORMAL: {
- arrow_color = get_color("font_color");
- } break;
- case DRAW_PRESSED: {
- arrow_color = get_color("font_color_pressed");
- } break;
- case DRAW_HOVER: {
- arrow_color = get_color("font_color_hover");
- } break;
- case DRAW_DISABLED: {
- arrow_color = get_color("font_color_disabled");
- } break;
- }
-
- arrow->draw(ci, ofs, arrow_color);
+ arrow->draw(ci, ofs);
} break;
}
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 7d0b91a366..655d8ed6f6 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -30,7 +30,7 @@
#include "popup.h"
#include "os/keyboard.h"
-void Popup::_gui_input(InputEvent p_event) {
+void Popup::_gui_input(Ref<InputEvent> p_event) {
}
void Popup::_notification(int p_what) {
diff --git a/scene/gui/popup.h b/scene/gui/popup.h
index 950aa65fa4..0543ae1937 100644
--- a/scene/gui/popup.h
+++ b/scene/gui/popup.h
@@ -45,7 +45,7 @@ class Popup : public Control {
protected:
virtual void _post_popup() {}
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
virtual void _fix_size();
static void _bind_methods();
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index e3f26e0f0b..985d9addc9 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -208,171 +208,170 @@ void PopupMenu::_submenu_timeout() {
}
}
-void PopupMenu::_gui_input(const InputEvent &p_event) {
+void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) {
- switch (p_event.type) {
+ Ref<InputEventKey> k = p_event;
- case InputEvent::KEY: {
+ if (k.is_valid()) {
- if (!p_event.key.pressed)
- break;
+ if (!k->is_pressed())
+ return;
- switch (p_event.key.scancode) {
+ switch (k->get_scancode()) {
- case KEY_DOWN: {
+ case KEY_DOWN: {
- for (int i = mouse_over + 1; i < items.size(); i++) {
+ for (int i = mouse_over + 1; i < items.size(); i++) {
- if (i < 0 || i >= items.size())
- continue;
+ if (i < 0 || i >= items.size())
+ continue;
- if (!items[i].separator && !items[i].disabled) {
+ if (!items[i].separator && !items[i].disabled) {
- mouse_over = i;
- update();
- break;
- }
+ mouse_over = i;
+ update();
+ break;
}
- } break;
- case KEY_UP: {
+ }
+ } break;
+ case KEY_UP: {
- for (int i = mouse_over - 1; i >= 0; i--) {
+ for (int i = mouse_over - 1; i >= 0; i--) {
- if (i < 0 || i >= items.size())
- continue;
+ if (i < 0 || i >= items.size())
+ continue;
- if (!items[i].separator && !items[i].disabled) {
+ if (!items[i].separator && !items[i].disabled) {
- mouse_over = i;
- update();
- break;
- }
+ mouse_over = i;
+ update();
+ break;
}
- } break;
- case KEY_RETURN:
- case KEY_ENTER: {
+ }
+ } break;
+ case KEY_RETURN:
+ case KEY_ENTER: {
- if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator) {
+ if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator) {
- activate_item(mouse_over);
- }
- } break;
- }
+ activate_item(mouse_over);
+ }
+ } break;
+ }
+ }
- } break;
+ Ref<InputEventMouseButton> b = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (b.is_valid()) {
- const InputEventMouseButton &b = p_event.mouse_button;
- if (b.pressed)
- break;
+ if (b->is_pressed())
+ return;
- switch (b.button_index) {
+ switch (b->get_button_index()) {
- case BUTTON_WHEEL_DOWN: {
+ case BUTTON_WHEEL_DOWN: {
- if (get_global_position().y + get_size().y > get_viewport_rect().size.y) {
+ if (get_global_position().y + get_size().y > get_viewport_rect().size.y) {
- int vseparation = get_constant("vseparation");
- Ref<Font> font = get_font("font");
+ int vseparation = get_constant("vseparation");
+ Ref<Font> font = get_font("font");
- Point2 pos = get_position();
- int s = (vseparation + font->get_height()) * 3;
- pos.y -= (s * b.factor);
- set_position(pos);
+ Point2 pos = get_position();
+ int s = (vseparation + font->get_height()) * 3;
+ pos.y -= (s * b->get_factor());
+ set_position(pos);
- //update hover
- InputEvent ie;
- ie.type = InputEvent::MOUSE_MOTION;
- ie.mouse_motion.x = b.x;
- ie.mouse_motion.y = b.y + s;
- _gui_input(ie);
- }
- } break;
- case BUTTON_WHEEL_UP: {
+ //update hover
+ Ref<InputEventMouseMotion> ie;
+ ie.instance();
+ ie->set_pos(b->get_pos() + Vector2(0, s));
+ _gui_input(ie);
+ }
+ } break;
+ case BUTTON_WHEEL_UP: {
- if (get_global_position().y < 0) {
+ if (get_global_position().y < 0) {
- int vseparation = get_constant("vseparation");
- Ref<Font> font = get_font("font");
+ int vseparation = get_constant("vseparation");
+ Ref<Font> font = get_font("font");
- Point2 pos = get_position();
- int s = (vseparation + font->get_height()) * 3;
- pos.y += (s * b.factor);
- set_position(pos);
+ Point2 pos = get_position();
+ int s = (vseparation + font->get_height()) * 3;
+ pos.y += (s * b->get_factor());
+ set_position(pos);
- //update hover
- InputEvent ie;
- ie.type = InputEvent::MOUSE_MOTION;
- ie.mouse_motion.x = b.x;
- ie.mouse_motion.y = b.y - s;
- _gui_input(ie);
- }
- } break;
- case BUTTON_LEFT: {
+ //update hover
+ Ref<InputEventMouseMotion> ie;
+ ie.instance();
+ ie->set_pos(b->get_pos() - Vector2(0, s));
+ _gui_input(ie);
+ }
+ } break;
+ case BUTTON_LEFT: {
- int over = _get_mouse_over(Point2(b.x, b.y));
+ int over = _get_mouse_over(b->get_pos());
- if (invalidated_click) {
- invalidated_click = false;
- break;
- }
- if (over < 0) {
- hide();
- break; //non-activable
- }
+ if (invalidated_click) {
+ invalidated_click = false;
+ break;
+ }
+ if (over < 0) {
+ hide();
+ break; //non-activable
+ }
- if (items[over].separator || items[over].disabled)
- break;
+ if (items[over].separator || items[over].disabled)
+ break;
- if (items[over].submenu != "") {
+ if (items[over].submenu != "") {
- _activate_submenu(over);
- return;
- }
- activate_item(over);
+ _activate_submenu(over);
+ return;
+ }
+ activate_item(over);
- } break;
- }
+ } break;
+ }
- //update();
- } break;
- case InputEvent::MOUSE_MOTION: {
+ //update();
+ }
- if (invalidated_click) {
- moved += Vector2(p_event.mouse_motion.relative_x, p_event.mouse_motion.relative_y);
- if (moved.length() > 4)
- invalidated_click = false;
- }
+ Ref<InputEventMouseMotion> m = p_event;
- const InputEventMouseMotion &m = p_event.mouse_motion;
- for (List<Rect2>::Element *E = autohide_areas.front(); E; E = E->next()) {
+ if (m.is_valid()) {
- if (!Rect2(Point2(), get_size()).has_point(Point2(m.x, m.y)) && E->get().has_point(Point2(m.x, m.y))) {
- call_deferred("hide");
- return;
- }
- }
+ if (invalidated_click) {
+ moved += m->get_relative();
+ if (moved.length() > 4)
+ invalidated_click = false;
+ }
- int over = _get_mouse_over(Point2(m.x, m.y));
- int id = (over < 0 || items[over].separator || items[over].disabled) ? -1 : (items[over].ID >= 0 ? items[over].ID : over);
+ for (List<Rect2>::Element *E = autohide_areas.front(); E; E = E->next()) {
- if (id < 0) {
- mouse_over = -1;
- update();
- break;
+ if (!Rect2(Point2(), get_size()).has_point(m->get_pos()) && E->get().has_point(m->get_pos())) {
+ call_deferred("hide");
+ return;
}
+ }
- if (items[over].submenu != "" && submenu_over != over) {
- submenu_over = over;
- submenu_timer->start();
- }
+ int over = _get_mouse_over(m->get_pos());
+ int id = (over < 0 || items[over].separator || items[over].disabled) ? -1 : (items[over].ID >= 0 ? items[over].ID : over);
- if (over != mouse_over) {
- mouse_over = over;
- update();
- }
- } break;
+ if (id < 0) {
+ mouse_over = -1;
+ update();
+ return;
+ }
+
+ if (items[over].submenu != "" && submenu_over != over) {
+ submenu_over = over;
+ submenu_timer->start();
+ }
+
+ if (over != mouse_over) {
+ mouse_over = over;
+ update();
+ }
}
}
@@ -820,20 +819,22 @@ int PopupMenu::get_item_count() const {
return items.size();
}
-bool PopupMenu::activate_item_by_event(const InputEvent &p_event, bool p_for_global_only) {
+bool PopupMenu::activate_item_by_event(const Ref<InputEvent> &p_event, bool p_for_global_only) {
uint32_t code = 0;
- if (p_event.type == InputEvent::KEY) {
- code = p_event.key.scancode;
+ Ref<InputEventKey> k = p_event;
+
+ if (k.is_valid()) {
+ code = k->get_scancode();
if (code == 0)
- code = p_event.key.unicode;
- if (p_event.key.mod.control)
+ code = k->get_unicode();
+ if (k->get_control())
code |= KEY_MASK_CTRL;
- if (p_event.key.mod.alt)
+ if (k->get_alt())
code |= KEY_MASK_ALT;
- if (p_event.key.mod.meta)
+ if (k->get_metakey())
code |= KEY_MASK_META;
- if (p_event.key.mod.shift)
+ if (k->get_shift())
code |= KEY_MASK_SHIFT;
}
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index de809f29d3..7ef532453d 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -79,7 +79,7 @@ class PopupMenu : public Popup {
String _get_accel_text(int p_item) const;
int _get_mouse_over(const Point2 &p_over) const;
virtual Size2 get_minimum_size() const;
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _activate_submenu(int over);
void _submenu_timeout();
@@ -146,7 +146,7 @@ public:
int get_item_count() const;
- bool activate_item_by_event(const InputEvent &p_event, bool p_for_global_only = false);
+ bool activate_item_by_event(const Ref<InputEvent> &p_event, bool p_for_global_only = false);
void activate_item(int p_item);
void remove_item(int p_idx);
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 6e5f218a66..a142bf5981 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -734,160 +734,155 @@ Control::CursorShape RichTextLabel::get_cursor_shape(const Point2 &p_pos) const
return CURSOR_ARROW;
}
-void RichTextLabel::_gui_input(InputEvent p_event) {
+void RichTextLabel::_gui_input(Ref<InputEvent> p_event) {
- switch (p_event.type) {
+ Ref<InputEventMouseButton> b = p_event;
- case InputEvent::MOUSE_BUTTON: {
-
- if (main->first_invalid_line < main->lines.size())
- return;
-
- const InputEventMouseButton &b = p_event.mouse_button;
+ if (b.is_valid()) {
+ if (main->first_invalid_line < main->lines.size())
+ return;
- if (b.button_index == BUTTON_LEFT) {
+ if (b->get_button_index() == BUTTON_LEFT) {
- if (true) {
+ if (true) {
- if (b.pressed && !b.doubleclick) {
- int line = 0;
- Item *item = NULL;
+ if (b->is_pressed() && !b->is_doubleclick()) {
+ int line = 0;
+ Item *item = NULL;
- bool outside;
- _find_click(main, Point2i(b.x, b.y), &item, &line, &outside);
+ bool outside;
+ _find_click(main, b->get_pos(), &item, &line, &outside);
- if (item) {
+ if (item) {
- Variant meta;
- if (!outside && _find_meta(item, &meta)) {
- //meta clicked
+ Variant meta;
+ if (!outside && _find_meta(item, &meta)) {
+ //meta clicked
- emit_signal("meta_clicked", meta);
- } else if (selection.enabled) {
+ emit_signal("meta_clicked", meta);
+ } else if (selection.enabled) {
- selection.click = item;
- selection.click_char = line;
- }
+ selection.click = item;
+ selection.click_char = line;
}
+ }
- } else if (!b.pressed) {
+ } else if (!b->is_pressed()) {
- selection.click = NULL;
- }
+ selection.click = NULL;
}
}
+ }
- if (b.button_index == BUTTON_WHEEL_UP) {
+ if (b->get_button_index() == BUTTON_WHEEL_UP) {
- if (scroll_active)
+ if (scroll_active)
- vscroll->set_value(vscroll->get_value() - vscroll->get_page() * b.factor * 0.5 / 8);
- }
- if (b.button_index == BUTTON_WHEEL_DOWN) {
+ vscroll->set_value(vscroll->get_value() - vscroll->get_page() * b->get_factor() * 0.5 / 8);
+ }
+ if (b->get_button_index() == BUTTON_WHEEL_DOWN) {
- if (scroll_active)
+ if (scroll_active)
- vscroll->set_value(vscroll->get_value() + vscroll->get_page() * b.factor * 0.5 / 8);
- }
- } break;
- case InputEvent::KEY: {
-
- const InputEventKey &k = p_event.key;
- if (k.pressed && !k.mod.alt && !k.mod.shift && !k.mod.meta) {
- bool handled = true;
- switch (k.scancode) {
- case KEY_PAGEUP: {
-
- if (vscroll->is_visible_in_tree())
- vscroll->set_value(vscroll->get_value() - vscroll->get_page());
- } break;
- case KEY_PAGEDOWN: {
-
- if (vscroll->is_visible_in_tree())
- vscroll->set_value(vscroll->get_value() + vscroll->get_page());
- } break;
- case KEY_UP: {
-
- if (vscroll->is_visible_in_tree())
- vscroll->set_value(vscroll->get_value() - get_font("normal_font")->get_height());
- } break;
- case KEY_DOWN: {
-
- if (vscroll->is_visible_in_tree())
- vscroll->set_value(vscroll->get_value() + get_font("normal_font")->get_height());
- } break;
- case KEY_HOME: {
-
- if (vscroll->is_visible_in_tree())
- vscroll->set_value(0);
- } break;
- case KEY_END: {
-
- if (vscroll->is_visible_in_tree())
- vscroll->set_value(vscroll->get_max());
- } break;
- case KEY_INSERT:
- case KEY_C: {
-
- if (k.mod.command) {
- selection_copy();
- } else {
- handled = false;
- }
+ vscroll->set_value(vscroll->get_value() + vscroll->get_page() * b->get_factor() * 0.5 / 8);
+ }
+ }
- } break;
- default: handled = false;
- }
+ Ref<InputEventKey> k = p_event;
+
+ if (k.is_valid()) {
+ if (k->is_pressed() && !k->get_alt() && !k->get_shift() && !k->get_metakey()) {
+ bool handled = true;
+ switch (k->get_scancode()) {
+ case KEY_PAGEUP: {
+
+ if (vscroll->is_visible_in_tree())
+ vscroll->set_value(vscroll->get_value() - vscroll->get_page());
+ } break;
+ case KEY_PAGEDOWN: {
+
+ if (vscroll->is_visible_in_tree())
+ vscroll->set_value(vscroll->get_value() + vscroll->get_page());
+ } break;
+ case KEY_UP: {
+
+ if (vscroll->is_visible_in_tree())
+ vscroll->set_value(vscroll->get_value() - get_font("normal_font")->get_height());
+ } break;
+ case KEY_DOWN: {
+
+ if (vscroll->is_visible_in_tree())
+ vscroll->set_value(vscroll->get_value() + get_font("normal_font")->get_height());
+ } break;
+ case KEY_HOME: {
+
+ if (vscroll->is_visible_in_tree())
+ vscroll->set_value(0);
+ } break;
+ case KEY_END: {
+
+ if (vscroll->is_visible_in_tree())
+ vscroll->set_value(vscroll->get_max());
+ } break;
+ case KEY_INSERT:
+ case KEY_C: {
+
+ if (k->get_command()) {
+ selection_copy();
+ } else {
+ handled = false;
+ }
- if (handled)
- accept_event();
+ } break;
+ default: handled = false;
}
- } break;
- case InputEvent::MOUSE_MOTION: {
+ if (handled)
+ accept_event();
+ }
+ }
- if (main->first_invalid_line < main->lines.size())
- return;
+ Ref<InputEventMouseMotion> m = p_event;
- const InputEventMouseMotion &m = p_event.mouse_motion;
+ if (m.is_valid()) {
+ if (main->first_invalid_line < main->lines.size())
+ return;
- if (selection.click) {
+ if (selection.click) {
- int line = 0;
- Item *item = NULL;
- _find_click(main, Point2i(m.x, m.y), &item, &line);
- if (!item)
- return; // do not update
+ int line = 0;
+ Item *item = NULL;
+ _find_click(main, m->get_pos(), &item, &line);
+ if (!item)
+ return; // do not update
- selection.from = selection.click;
- selection.from_char = selection.click_char;
+ selection.from = selection.click;
+ selection.from_char = selection.click_char;
- selection.to = item;
- selection.to_char = line;
+ selection.to = item;
+ selection.to_char = line;
- bool swap = false;
- if (selection.from->index > selection.to->index)
+ bool swap = false;
+ if (selection.from->index > selection.to->index)
+ swap = true;
+ else if (selection.from->index == selection.to->index) {
+ if (selection.from_char > selection.to_char)
swap = true;
- else if (selection.from->index == selection.to->index) {
- if (selection.from_char > selection.to_char)
- swap = true;
- else if (selection.from_char == selection.to_char) {
+ else if (selection.from_char == selection.to_char) {
- selection.active = false;
- return;
- }
- }
-
- if (swap) {
- SWAP(selection.from, selection.to);
- SWAP(selection.from_char, selection.to_char);
+ selection.active = false;
+ return;
}
+ }
- selection.active = true;
- update();
+ if (swap) {
+ SWAP(selection.from, selection.to);
+ SWAP(selection.from_char, selection.to_char);
}
- } break;
+ selection.active = true;
+ update();
+ }
}
}
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 05d98b3ee8..eedb7e54db 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -272,7 +272,7 @@ private:
void _update_scroll();
void _scroll_changed(double);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
Item *_get_next_item(Item *p_item, bool p_free = false);
bool use_bbcode;
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 6475371eb9..27a16ccc33 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -38,191 +38,188 @@ void ScrollBar::set_can_focus_by_default(bool p_can_focus) {
focus_by_default = p_can_focus;
}
-void ScrollBar::_gui_input(InputEvent p_event) {
+void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
- switch (p_event.type) {
+ Ref<InputEventMouseButton> b = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (b.is_valid()) {
+ accept_event();
- const InputEventMouseButton &b = p_event.mouse_button;
- accept_event();
-
- if (b.button_index == 5 && b.pressed) {
-
- /*
- if (orientation==VERTICAL)
- set_val( get_val() + get_page() / 4.0 );
- else
- */
- set_value(get_value() + get_page() / 4.0);
- accept_event();
- }
-
- if (b.button_index == 4 && b.pressed) {
+ if (b->get_button_index() == 5 && b->is_pressed()) {
- /*
- if (orientation==HORIZONTAL)
- set_val( get_val() - get_page() / 4.0 );
- else
- */
- set_value(get_value() - get_page() / 4.0);
- accept_event();
- }
+ /*
+ if (orientation==VERTICAL)
+ set_val( get_val() + get_page() / 4.0 );
+ else
+ */
+ set_value(get_value() + get_page() / 4.0);
+ accept_event();
+ }
- if (b.button_index != 1)
- return;
+ if (b->get_button_index() == 4 && b->is_pressed()) {
- if (b.pressed) {
+ /*
+ if (orientation==HORIZONTAL)
+ set_val( get_val() - get_page() / 4.0 );
+ else
+ */
+ set_value(get_value() - get_page() / 4.0);
+ accept_event();
+ }
- double ofs = orientation == VERTICAL ? b.y : b.x;
- Ref<Texture> decr = get_icon("decrement");
- Ref<Texture> incr = get_icon("increment");
+ if (b->get_button_index() != 1)
+ return;
- double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width();
- double incr_size = orientation == VERTICAL ? incr->get_height() : incr->get_width();
- double grabber_ofs = get_grabber_offset();
- double grabber_size = get_grabber_size();
- double total = orientation == VERTICAL ? get_size().height : get_size().width;
+ if (b->is_pressed()) {
- if (ofs < decr_size) {
+ double ofs = orientation == VERTICAL ? b->get_pos().y : b->get_pos().x;
+ Ref<Texture> decr = get_icon("decrement");
+ Ref<Texture> incr = get_icon("increment");
- set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
- break;
- }
+ double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width();
+ double incr_size = orientation == VERTICAL ? incr->get_height() : incr->get_width();
+ double grabber_ofs = get_grabber_offset();
+ double grabber_size = get_grabber_size();
+ double total = orientation == VERTICAL ? get_size().height : get_size().width;
- if (ofs > total - incr_size) {
+ if (ofs < decr_size) {
- set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
- break;
- }
+ set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
+ return;
+ }
- ofs -= decr_size;
+ if (ofs > total - incr_size) {
- if (ofs < grabber_ofs) {
+ set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
+ return;
+ }
- set_value(get_value() - get_page());
- break;
- }
+ ofs -= decr_size;
- ofs -= grabber_ofs;
+ if (ofs < grabber_ofs) {
- if (ofs < grabber_size) {
+ set_value(get_value() - get_page());
+ return;
+ }
- drag.active = true;
- drag.pos_at_click = grabber_ofs + ofs;
- drag.value_at_click = get_as_ratio();
- update();
- } else {
+ ofs -= grabber_ofs;
- set_value(get_value() + get_page());
- }
+ if (ofs < grabber_size) {
+ drag.active = true;
+ drag.pos_at_click = grabber_ofs + ofs;
+ drag.value_at_click = get_as_ratio();
+ update();
} else {
- drag.active = false;
- update();
+ set_value(get_value() + get_page());
}
- } break;
- case InputEvent::MOUSE_MOTION: {
+ } else {
- const InputEventMouseMotion &m = p_event.mouse_motion;
+ drag.active = false;
+ update();
+ }
+ }
- accept_event();
+ Ref<InputEventMouseMotion> m = p_event;
- if (drag.active) {
+ if (m.is_valid()) {
- double ofs = orientation == VERTICAL ? m.y : m.x;
- Ref<Texture> decr = get_icon("decrement");
+ accept_event();
- double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width();
- ofs -= decr_size;
+ if (drag.active) {
- double diff = (ofs - drag.pos_at_click) / get_area_size();
+ double ofs = orientation == VERTICAL ? m->get_pos().y : m->get_pos().x;
+ Ref<Texture> decr = get_icon("decrement");
- set_as_ratio(drag.value_at_click + diff);
- } else {
+ double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width();
+ ofs -= decr_size;
- double ofs = orientation == VERTICAL ? m.y : m.x;
- Ref<Texture> decr = get_icon("decrement");
- Ref<Texture> incr = get_icon("increment");
+ double diff = (ofs - drag.pos_at_click) / get_area_size();
- double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width();
- double incr_size = orientation == VERTICAL ? incr->get_height() : incr->get_width();
- double total = orientation == VERTICAL ? get_size().height : get_size().width;
+ set_as_ratio(drag.value_at_click + diff);
+ } else {
- HiliteStatus new_hilite;
+ double ofs = orientation == VERTICAL ? m->get_pos().y : m->get_pos().x;
+ Ref<Texture> decr = get_icon("decrement");
+ Ref<Texture> incr = get_icon("increment");
- if (ofs < decr_size) {
+ double decr_size = orientation == VERTICAL ? decr->get_height() : decr->get_width();
+ double incr_size = orientation == VERTICAL ? incr->get_height() : incr->get_width();
+ double total = orientation == VERTICAL ? get_size().height : get_size().width;
- new_hilite = HILITE_DECR;
+ HighlightStatus new_hilite;
- } else if (ofs > total - incr_size) {
+ if (ofs < decr_size) {
- new_hilite = HILITE_INCR;
+ new_hilite = HIGHLIGHT_DECR;
- } else {
+ } else if (ofs > total - incr_size) {
- new_hilite = HILITE_RANGE;
- }
+ new_hilite = HIGHLIGHT_INCR;
- if (new_hilite != hilite) {
+ } else {
- hilite = new_hilite;
- update();
- }
+ new_hilite = HIGHLIGHT_RANGE;
}
- } break;
- case InputEvent::KEY: {
- const InputEventKey &k = p_event.key;
+ if (new_hilite != highlight) {
- if (!k.pressed)
- return;
+ highlight = new_hilite;
+ update();
+ }
+ }
+ }
- switch (k.scancode) {
+ Ref<InputEventKey> k = p_event;
- case KEY_LEFT: {
+ if (k.is_valid()) {
- if (orientation != HORIZONTAL)
- return;
- set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
+ if (!k->is_pressed())
+ return;
- } break;
- case KEY_RIGHT: {
+ switch (k->get_scancode()) {
- if (orientation != HORIZONTAL)
- return;
- set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
+ case KEY_LEFT: {
- } break;
- case KEY_UP: {
+ if (orientation != HORIZONTAL)
+ return;
+ set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
- if (orientation != VERTICAL)
- return;
+ } break;
+ case KEY_RIGHT: {
- set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
+ if (orientation != HORIZONTAL)
+ return;
+ set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
- } break;
- case KEY_DOWN: {
+ } break;
+ case KEY_UP: {
- if (orientation != VERTICAL)
- return;
- set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
+ if (orientation != VERTICAL)
+ return;
- } break;
- case KEY_HOME: {
+ set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
- set_value(get_min());
+ } break;
+ case KEY_DOWN: {
- } break;
- case KEY_END: {
+ if (orientation != VERTICAL)
+ return;
+ set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
- set_value(get_max());
+ } break;
+ case KEY_HOME: {
- } break;
- }
- break;
+ set_value(get_min());
+
+ } break;
+ case KEY_END: {
+
+ set_value(get_max());
+
+ } break;
}
}
}
@@ -233,10 +230,10 @@ void ScrollBar::_notification(int p_what) {
RID ci = get_canvas_item();
- Ref<Texture> decr = hilite == HILITE_DECR ? get_icon("decrement_hilite") : get_icon("decrement");
- Ref<Texture> incr = hilite == HILITE_INCR ? get_icon("increment_hilite") : get_icon("increment");
+ Ref<Texture> decr = highlight == HIGHLIGHT_DECR ? get_icon("decrement_highlight") : get_icon("decrement");
+ Ref<Texture> incr = highlight == HIGHLIGHT_INCR ? get_icon("increment_highlight") : get_icon("increment");
Ref<StyleBox> bg = has_focus() ? get_stylebox("scroll_focus") : get_stylebox("scroll");
- Ref<StyleBox> grabber = (drag.active || hilite == HILITE_RANGE) ? get_stylebox("grabber_hilite") : get_stylebox("grabber");
+ Ref<StyleBox> grabber = (drag.active || highlight == HIGHLIGHT_RANGE) ? get_stylebox("grabber_highlight") : get_stylebox("grabber");
Point2 ofs;
@@ -386,7 +383,7 @@ void ScrollBar::_notification(int p_what) {
if (p_what == NOTIFICATION_MOUSE_EXIT) {
- hilite = HILITE_NONE;
+ highlight = HIGHLIGHT_NONE;
update();
}
}
@@ -522,87 +519,84 @@ void ScrollBar::_drag_slave_exit() {
drag_slave = NULL;
}
-void ScrollBar::_drag_slave_input(const InputEvent &p_input) {
+void ScrollBar::_drag_slave_input(const Ref<InputEvent> &p_input) {
- switch (p_input.type) {
+ Ref<InputEventMouseButton> mb = p_input;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
- const InputEventMouseButton &mb = p_input.mouse_button;
+ if (mb->get_button_index() != 1)
+ return;
- if (mb.button_index != 1)
- break;
+ if (mb->is_pressed()) {
+
+ if (drag_slave_touching) {
+ set_fixed_process(false);
+ drag_slave_touching_deaccel = false;
+ drag_slave_touching = false;
+ drag_slave_speed = Vector2();
+ drag_slave_accum = Vector2();
+ last_drag_slave_accum = Vector2();
+ drag_slave_from = Vector2();
+ }
- if (mb.pressed) {
+ if (true) {
+ drag_slave_speed = Vector2();
+ drag_slave_accum = Vector2();
+ last_drag_slave_accum = Vector2();
+ //drag_slave_from=Vector2(h_scroll->get_val(),v_scroll->get_val());
+ drag_slave_from = Vector2(orientation == HORIZONTAL ? get_value() : 0, orientation == VERTICAL ? get_value() : 0);
+ drag_slave_touching = OS::get_singleton()->has_touchscreen_ui_hint();
+ drag_slave_touching_deaccel = false;
+ time_since_motion = 0;
if (drag_slave_touching) {
- set_fixed_process(false);
- drag_slave_touching_deaccel = false;
- drag_slave_touching = false;
- drag_slave_speed = Vector2();
- drag_slave_accum = Vector2();
- last_drag_slave_accum = Vector2();
- drag_slave_from = Vector2();
+ set_fixed_process(true);
+ time_since_motion = 0;
}
+ }
+
+ } else {
- if (true) {
- drag_slave_speed = Vector2();
- drag_slave_accum = Vector2();
- last_drag_slave_accum = Vector2();
- //drag_slave_from=Vector2(h_scroll->get_val(),v_scroll->get_val());
- drag_slave_from = Vector2(orientation == HORIZONTAL ? get_value() : 0, orientation == VERTICAL ? get_value() : 0);
+ if (drag_slave_touching) {
- drag_slave_touching = OS::get_singleton()->has_touchscreen_ui_hint();
+ if (drag_slave_speed == Vector2()) {
drag_slave_touching_deaccel = false;
- time_since_motion = 0;
- if (drag_slave_touching) {
- set_fixed_process(true);
- time_since_motion = 0;
- }
+ drag_slave_touching = false;
+ set_fixed_process(false);
+ } else {
+
+ drag_slave_touching_deaccel = true;
}
+ }
+ }
+ }
- } else {
+ Ref<InputEventMouseMotion> mm = p_input;
- if (drag_slave_touching) {
+ if (mm.is_valid()) {
- if (drag_slave_speed == Vector2()) {
- drag_slave_touching_deaccel = false;
- drag_slave_touching = false;
- set_fixed_process(false);
- } else {
+ if (drag_slave_touching && !drag_slave_touching_deaccel) {
- drag_slave_touching_deaccel = true;
- }
- }
- }
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- const InputEventMouseMotion &mm = p_input.mouse_motion;
-
- if (drag_slave_touching && !drag_slave_touching_deaccel) {
-
- Vector2 motion = Vector2(mm.relative_x, mm.relative_y);
-
- drag_slave_accum -= motion;
- Vector2 diff = drag_slave_from + drag_slave_accum;
-
- if (orientation == HORIZONTAL)
- set_value(diff.x);
- /*
- else
- drag_slave_accum.x=0;
- */
- if (orientation == VERTICAL)
- set_value(diff.y);
- /*
- else
- drag_slave_accum.y=0;
- */
- time_since_motion = 0;
- }
+ Vector2 motion = Vector2(mm->get_relative().x, mm->get_relative().y);
- } break;
+ drag_slave_accum -= motion;
+ Vector2 diff = drag_slave_from + drag_slave_accum;
+
+ if (orientation == HORIZONTAL)
+ set_value(diff.x);
+ /*
+ else
+ drag_slave_accum.x=0;
+ */
+ if (orientation == VERTICAL)
+ set_value(diff.y);
+ /*
+ else
+ drag_slave_accum.y=0;
+ */
+ time_since_motion = 0;
+ }
}
}
@@ -640,11 +634,11 @@ NodePath ScrollBar::get_drag_slave() const {
#if 0
-void ScrollBar::mouse_button(const Point2& p_pos, int b.button_index,bool b.pressed,int p_modifier_mask) {
+void ScrollBar::mouse_button(const Point2& p_pos, int b->get_button_index(),bool b->is_pressed(),int p_modifier_mask) {
// wheel!
- if (b.button_index==BUTTON_WHEEL_UP && b.pressed) {
+ if (b->get_button_index()==BUTTON_WHEEL_UP && b->is_pressed()) {
if (orientation==VERTICAL)
set_val( get_val() - get_page() / 4.0 );
@@ -652,7 +646,7 @@ void ScrollBar::mouse_button(const Point2& p_pos, int b.button_index,bool b.pres
set_val( get_val() + get_page() / 4.0 );
}
- if (b.button_index==BUTTON_WHEEL_DOWN && b.pressed) {
+ if (b->get_button_index()==BUTTON_WHEEL_DOWN && b->is_pressed()) {
if (orientation==HORIZONTAL)
set_val( get_val() - get_page() / 4.0 );
@@ -660,10 +654,10 @@ void ScrollBar::mouse_button(const Point2& p_pos, int b.button_index,bool b.pres
set_val( get_val() + get_page() / 4.0 );
}
- if (b.button_index!=BUTTON_LEFT)
+ if (b->get_button_index()!=BUTTON_LEFT)
return;
- if (b.pressed) {
+ if (b->is_pressed()) {
int ofs = orientation==VERTICAL ? p_pos.y : p_pos.x ;
int grabber_ofs = get_grabber_offset();
@@ -692,7 +686,7 @@ void ScrollBar::mouse_button(const Point2& p_pos, int b.button_index,bool b.pres
}
}
-void ScrollBar::mouse_motion(const Point2& p_pos, const Point2& p_rel, int b.button_index_mask) {
+void ScrollBar::mouse_motion(const Point2& p_pos, const Point2& p_rel, int b->get_button_index()_mask) {
if (!drag.active)
return;
@@ -712,9 +706,9 @@ void ScrollBar::mouse_motion(const Point2& p_pos, const Point2& p_rel, int b.but
}
-bool ScrollBar::key(unsigned long p_unicode, unsigned long p_scan_code,bool b.pressed,bool p_repeat,int p_modifier_mask) {
+bool ScrollBar::key(unsigned long p_unicode, unsigned long p_scan_code,bool b->is_pressed(),bool p_repeat,int p_modifier_mask) {
- if (!b.pressed)
+ if (!b->is_pressed())
return false;
switch (p_scan_code) {
@@ -784,7 +778,7 @@ void ScrollBar::_bind_methods() {
ScrollBar::ScrollBar(Orientation p_orientation) {
orientation = p_orientation;
- hilite = HILITE_NONE;
+ highlight = HIGHLIGHT_NONE;
custom_step = -1;
drag_slave = NULL;
diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h
index 9f035b4901..8310e12590 100644
--- a/scene/gui/scroll_bar.h
+++ b/scene/gui/scroll_bar.h
@@ -39,11 +39,11 @@ class ScrollBar : public Range {
GDCLASS(ScrollBar, Range);
- enum HiliteStatus {
- HILITE_NONE,
- HILITE_DECR,
- HILITE_RANGE,
- HILITE_INCR,
+ enum HighlightStatus {
+ HIGHLIGHT_NONE,
+ HIGHLIGHT_DECR,
+ HIGHLIGHT_RANGE,
+ HIGHLIGHT_INCR,
};
static bool focus_by_default;
@@ -52,7 +52,7 @@ class ScrollBar : public Range {
Size2 size;
float custom_step;
- HiliteStatus hilite;
+ HighlightStatus highlight;
struct Drag {
@@ -84,9 +84,9 @@ class ScrollBar : public Range {
bool click_handled;
void _drag_slave_exit();
- void _drag_slave_input(const InputEvent &p_input);
+ void _drag_slave_input(const Ref<InputEvent> &p_input);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
protected:
void _notification(int p_what);
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index a89c2b27c9..70b4ac47f8 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -76,113 +76,109 @@ void ScrollContainer::_cancel_drag() {
drag_from = Vector2();
}
-void ScrollContainer::_gui_input(const InputEvent &p_gui_input) {
+void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
- switch (p_gui_input.type) {
+ Ref<InputEventMouseButton> mb = p_gui_input;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
- const InputEventMouseButton &mb = p_gui_input.mouse_button;
-
- if (mb.button_index == BUTTON_WHEEL_UP && mb.pressed) {
- // only horizontal is enabled, scroll horizontally
- if (h_scroll->is_visible() && !v_scroll->is_visible()) {
- h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() / 8 * mb.factor);
- } else if (v_scroll->is_visible_in_tree()) {
- v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() / 8 * mb.factor);
- }
+ if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
+ // only horizontal is enabled, scroll horizontally
+ if (h_scroll->is_visible() && !v_scroll->is_visible()) {
+ h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() / 8 * mb->get_factor());
+ } else if (v_scroll->is_visible_in_tree()) {
+ v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() / 8 * mb->get_factor());
}
+ }
- if (mb.button_index == BUTTON_WHEEL_DOWN && mb.pressed) {
- // only horizontal is enabled, scroll horizontally
- if (h_scroll->is_visible() && !v_scroll->is_visible()) {
- h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() / 8 * mb.factor);
- } else if (v_scroll->is_visible()) {
- v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() / 8 * mb.factor);
- }
+ if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
+ // only horizontal is enabled, scroll horizontally
+ if (h_scroll->is_visible() && !v_scroll->is_visible()) {
+ h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() / 8 * mb->get_factor());
+ } else if (v_scroll->is_visible()) {
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() / 8 * mb->get_factor());
}
+ }
- if (mb.button_index == BUTTON_WHEEL_LEFT && mb.pressed) {
- if (h_scroll->is_visible_in_tree()) {
- h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * mb.factor / 8);
- }
+ if (mb->get_button_index() == BUTTON_WHEEL_LEFT && mb->is_pressed()) {
+ if (h_scroll->is_visible_in_tree()) {
+ h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() * mb->get_factor() / 8);
}
+ }
- if (mb.button_index == BUTTON_WHEEL_RIGHT && mb.pressed) {
- if (h_scroll->is_visible_in_tree()) {
- h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * mb.factor / 8);
- }
+ if (mb->get_button_index() == BUTTON_WHEEL_RIGHT && mb->is_pressed()) {
+ if (h_scroll->is_visible_in_tree()) {
+ h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * mb->get_factor() / 8);
}
+ }
- if (!OS::get_singleton()->has_touchscreen_ui_hint())
- return;
+ if (!OS::get_singleton()->has_touchscreen_ui_hint())
+ return;
- if (mb.button_index != BUTTON_LEFT)
- break;
+ if (mb->get_button_index() != BUTTON_LEFT)
+ return;
- if (mb.pressed) {
+ if (mb->is_pressed()) {
- if (drag_touching) {
- set_fixed_process(false);
- drag_touching_deaccel = false;
- drag_touching = false;
- drag_speed = Vector2();
- drag_accum = Vector2();
- last_drag_accum = Vector2();
- drag_from = Vector2();
- }
+ if (drag_touching) {
+ set_fixed_process(false);
+ drag_touching_deaccel = false;
+ drag_touching = false;
+ drag_speed = Vector2();
+ drag_accum = Vector2();
+ last_drag_accum = Vector2();
+ drag_from = Vector2();
+ }
- if (true) {
- drag_speed = Vector2();
- drag_accum = Vector2();
- last_drag_accum = Vector2();
- drag_from = Vector2(h_scroll->get_value(), v_scroll->get_value());
- drag_touching = OS::get_singleton()->has_touchscreen_ui_hint();
- drag_touching_deaccel = false;
+ if (true) {
+ drag_speed = Vector2();
+ drag_accum = Vector2();
+ last_drag_accum = Vector2();
+ drag_from = Vector2(h_scroll->get_value(), v_scroll->get_value());
+ drag_touching = OS::get_singleton()->has_touchscreen_ui_hint();
+ drag_touching_deaccel = false;
+ time_since_motion = 0;
+ if (drag_touching) {
+ set_fixed_process(true);
time_since_motion = 0;
- if (drag_touching) {
- set_fixed_process(true);
- time_since_motion = 0;
- }
}
+ }
- } else {
- if (drag_touching) {
+ } else {
+ if (drag_touching) {
- if (drag_speed == Vector2()) {
- drag_touching_deaccel = false;
- drag_touching = false;
- set_fixed_process(false);
- } else {
+ if (drag_speed == Vector2()) {
+ drag_touching_deaccel = false;
+ drag_touching = false;
+ set_fixed_process(false);
+ } else {
- drag_touching_deaccel = true;
- }
+ drag_touching_deaccel = true;
}
}
+ }
+ }
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- const InputEventMouseMotion &mm = p_gui_input.mouse_motion;
+ Ref<InputEventMouseMotion> mm = p_gui_input;
- if (drag_touching && !drag_touching_deaccel) {
+ if (mm.is_valid()) {
- Vector2 motion = Vector2(mm.relative_x, mm.relative_y);
- drag_accum -= motion;
- Vector2 diff = drag_from + drag_accum;
+ if (drag_touching && !drag_touching_deaccel) {
- if (scroll_h)
- h_scroll->set_value(diff.x);
- else
- drag_accum.x = 0;
- if (scroll_v)
- v_scroll->set_value(diff.y);
- else
- drag_accum.y = 0;
- time_since_motion = 0;
- }
+ Vector2 motion = Vector2(mm->get_relative().x, mm->get_relative().y);
+ drag_accum -= motion;
+ Vector2 diff = drag_from + drag_accum;
- } break;
+ if (scroll_h)
+ h_scroll->set_value(diff.x);
+ else
+ drag_accum.x = 0;
+ if (scroll_v)
+ v_scroll->set_value(diff.y);
+ else
+ drag_accum.y = 0;
+ time_since_motion = 0;
+ }
}
}
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index bbc6d829ef..e5df3e5e1c 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -64,7 +64,7 @@ class ScrollContainer : public Container {
protected:
Size2 get_minimum_size() const;
- void _gui_input(const InputEvent &p_gui_input);
+ void _gui_input(const Ref<InputEvent> &p_gui_input);
void _notification(int p_what);
void _scroll_moved(float);
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index d2a2ff7966..ae2bf0999e 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -37,16 +37,17 @@ Size2 Slider::get_minimum_size() const {
return ms;
}
-void Slider::_gui_input(InputEvent p_event) {
+void Slider::_gui_input(Ref<InputEvent> p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb = p_event;
- InputEventMouseButton &mb = p_event.mouse_button;
- if (mb.button_index == BUTTON_LEFT) {
+ if (mb.is_valid()) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
+
+ if (mb->is_pressed()) {
+ Ref<Texture> grabber = get_icon(mouse_inside || has_focus() ? "grabber_highlight" : "grabber");
+ grab.pos = orientation == VERTICAL ? mb->get_pos().y : mb->get_pos().x;
- if (mb.pressed) {
- Ref<Texture> grabber = get_icon(mouse_inside || has_focus() ? "grabber_hilite" : "grabber");
- grab.pos = orientation == VERTICAL ? mb.y : mb.x;
double grab_width = (double)grabber->get_size().width;
double grab_height = (double)grabber->get_size().height;
double max = orientation == VERTICAL ? get_size().height - grab_height : get_size().width - grab_width;
@@ -59,20 +60,22 @@ void Slider::_gui_input(InputEvent p_event) {
} else {
grab.active = false;
}
- } else if (mb.pressed && mb.button_index == BUTTON_WHEEL_UP) {
+ } else if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_UP) {
set_value(get_value() + get_step());
- } else if (mb.pressed && mb.button_index == BUTTON_WHEEL_DOWN) {
+ } else if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
set_value(get_value() - get_step());
}
+ }
- } else if (p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_event;
+ if (mm.is_valid()) {
if (grab.active) {
Size2i size = get_size();
Ref<Texture> grabber = get_icon("grabber");
- float motion = (orientation == VERTICAL ? p_event.mouse_motion.y : p_event.mouse_motion.x) - grab.pos;
+ float motion = (orientation == VERTICAL ? mm->get_pos().y : mm->get_pos().x) - grab.pos;
if (orientation == VERTICAL)
motion = -motion;
float areasize = orientation == VERTICAL ? size.height - grabber->get_size().height : size.width - grabber->get_size().width;
@@ -81,42 +84,44 @@ void Slider::_gui_input(InputEvent p_event) {
float umotion = motion / float(areasize);
set_as_ratio(grab.uvalue + umotion);
}
- } else {
+ }
- if (p_event.is_action("ui_left") && p_event.is_pressed()) {
+ if (!mm.is_valid() && !mb.is_valid()) {
+
+ if (p_event->is_action("ui_left") && p_event->is_pressed()) {
if (orientation != HORIZONTAL)
return;
set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
accept_event();
- } else if (p_event.is_action("ui_right") && p_event.is_pressed()) {
+ } else if (p_event->is_action("ui_right") && p_event->is_pressed()) {
if (orientation != HORIZONTAL)
return;
set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
accept_event();
- } else if (p_event.is_action("ui_up") && p_event.is_pressed()) {
+ } else if (p_event->is_action("ui_up") && p_event->is_pressed()) {
if (orientation != VERTICAL)
return;
set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
accept_event();
- } else if (p_event.is_action("ui_down") && p_event.is_pressed()) {
+ } else if (p_event->is_action("ui_down") && p_event->is_pressed()) {
if (orientation != VERTICAL)
return;
set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
accept_event();
- } else if (p_event.type == InputEvent::KEY) {
+ } else {
- const InputEventKey &k = p_event.key;
+ Ref<InputEventKey> k = p_event;
- if (!k.pressed)
+ if (!k.is_valid() || !k->is_pressed())
return;
- switch (k.scancode) {
+ switch (k->get_scancode()) {
case KEY_HOME: {
@@ -129,7 +134,7 @@ void Slider::_gui_input(InputEvent p_event) {
accept_event();
} break;
- };
+ }
}
}
}
@@ -153,7 +158,7 @@ void Slider::_notification(int p_what) {
Size2i size = get_size();
Ref<StyleBox> style = get_stylebox("slider");
Ref<StyleBox> focus = get_stylebox("focus");
- Ref<Texture> grabber = get_icon(mouse_inside || has_focus() ? "grabber_hilite" : "grabber");
+ Ref<Texture> grabber = get_icon(mouse_inside || has_focus() ? "grabber_highlight" : "grabber");
Ref<Texture> tick = get_icon("tick");
if (orientation == VERTICAL) {
diff --git a/scene/gui/slider.h b/scene/gui/slider.h
index 61ad76e31e..7194484058 100644
--- a/scene/gui/slider.h
+++ b/scene/gui/slider.h
@@ -48,7 +48,7 @@ class Slider : public Range {
float custom_step;
protected:
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
static void _bind_methods();
bool ticks_on_borders;
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 83d535a2e7..2eb2028391 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -65,7 +65,7 @@ LineEdit *SpinBox::get_line_edit() {
return line_edit;
}
-void SpinBox::_line_edit_input(const InputEvent &p_event) {
+void SpinBox::_line_edit_input(const Ref<InputEvent> &p_event) {
}
void SpinBox::_range_click_timeout() {
@@ -86,17 +86,19 @@ void SpinBox::_range_click_timeout() {
}
}
-void SpinBox::_gui_input(const InputEvent &p_event) {
+void SpinBox::_gui_input(const Ref<InputEvent> &p_event) {
if (!is_editable()) {
return;
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed) {
- const InputEventMouseButton &mb = p_event.mouse_button;
- bool up = mb.y < (get_size().height / 2);
+ Ref<InputEventMouseButton> mb = p_event;
- switch (mb.button_index) {
+ if (mb.is_valid() && mb->is_pressed()) {
+
+ bool up = mb->get_pos().y < (get_size().height / 2);
+
+ switch (mb->get_button_index()) {
case BUTTON_LEFT: {
@@ -116,28 +118,28 @@ void SpinBox::_gui_input(const InputEvent &p_event) {
case BUTTON_WHEEL_UP: {
if (line_edit->has_focus()) {
- set_value(get_value() + get_step() * mb.factor);
+ set_value(get_value() + get_step() * mb->get_factor());
accept_event();
}
} break;
case BUTTON_WHEEL_DOWN: {
if (line_edit->has_focus()) {
- set_value(get_value() - get_step() * mb.factor);
+ set_value(get_value() - get_step() * mb->get_factor());
accept_event();
}
} break;
}
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index == 1) {
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == 1) {
//set_default_cursor_shape(CURSOR_VSIZE);
- Vector2 cpos = Vector2(p_event.mouse_button.x, p_event.mouse_button.y);
+ Vector2 cpos = Vector2(mb->get_pos().x, mb->get_pos().y);
drag.mouse_pos = cpos;
}
- if (p_event.type == InputEvent::MOUSE_BUTTON && !p_event.mouse_button.pressed && p_event.mouse_button.button_index == 1) {
+ if (mb.is_valid() && !mb->is_pressed() && mb->get_button_index() == 1) {
//set_default_cursor_shape(CURSOR_ARROW);
range_click_timer->stop();
@@ -149,9 +151,12 @@ void SpinBox::_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::MOUSE_MOTION && p_event.mouse_button.button_mask & 1) {
+ Ref<InputEventMouseMotion> mm = p_event;
+
+ if (mm.is_valid() && mm->get_button_mask() & 1) {
+
+ Vector2 cpos = mm->get_pos();
- Vector2 cpos = Vector2(p_event.mouse_motion.x, p_event.mouse_motion.y);
if (drag.enabled) {
float diff_y = drag.mouse_pos.y - cpos.y;
@@ -194,12 +199,7 @@ void SpinBox::_notification(int p_what) {
RID ci = get_canvas_item();
Size2i size = get_size();
- Color color = has_focus() ? line_edit->get_color("font_color_active") : line_edit->get_color("font_color");
- if (!is_editable())
- color = line_edit->get_color("font_color_read_only");
- updown->draw(ci, Point2i(size.width - updown->get_width(), (size.height - updown->get_height()) / 2), color);
-
- } else if (p_what == NOTIFICATION_FOCUS_EXIT) {
+ updown->draw(ci, Point2i(size.width - updown->get_width(), (size.height - updown->get_height()) / 2));
} else if (p_what == NOTIFICATION_FOCUS_EXIT) {
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index 338ae875f0..683ed0c344 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -49,7 +49,7 @@ class SpinBox : public Range {
String prefix;
String suffix;
- void _line_edit_input(const InputEvent &p_event);
+ void _line_edit_input(const Ref<InputEvent> &p_event);
struct Drag {
float base_val;
@@ -62,7 +62,7 @@ class SpinBox : public Range {
void _line_edit_focus_exit();
protected:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index df24fa84d8..91fd18e2ed 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -270,32 +270,32 @@ void SplitContainer::_notification(int p_what) {
}
}
-void SplitContainer::_gui_input(const InputEvent &p_event) {
+void SplitContainer::_gui_input(const Ref<InputEvent> &p_event) {
if (collapsed || !_getch(0) || !_getch(1) || dragger_visibility != DRAGGER_VISIBLE)
return;
- if (p_event.type == InputEvent::MOUSE_BUTTON) {
+ Ref<InputEventMouseButton> mb = p_event;
- const InputEventMouseButton &mb = p_event.mouse_button;
+ if (mb.is_valid()) {
- if (mb.button_index == BUTTON_LEFT) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
- if (mb.pressed) {
+ if (mb->is_pressed()) {
int sep = get_constant("separation");
if (vertical) {
- if (mb.y > middle_sep && mb.y < middle_sep + sep) {
+ if (mb->get_pos().y > middle_sep && mb->get_pos().y < middle_sep + sep) {
dragging = true;
- drag_from = mb.y;
+ drag_from = mb->get_pos().y;
drag_ofs = expand_ofs;
}
} else {
- if (mb.x > middle_sep && mb.x < middle_sep + sep) {
+ if (mb->get_pos().x > middle_sep && mb->get_pos().x < middle_sep + sep) {
dragging = true;
- drag_from = mb.x;
+ drag_from = mb->get_pos().x;
drag_ofs = expand_ofs;
}
}
@@ -306,13 +306,13 @@ void SplitContainer::_gui_input(const InputEvent &p_event) {
}
}
- if (p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_event;
- const InputEventMouseMotion &mm = p_event.mouse_motion;
+ if (mm.is_valid()) {
if (dragging) {
- expand_ofs = drag_ofs + ((vertical ? mm.y : mm.x) - drag_from);
+ expand_ofs = drag_ofs + ((vertical ? mm->get_pos().y : mm->get_pos().x) - drag_from);
queue_sort();
emit_signal("dragged", get_split_offset());
}
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 12722c9f95..94b80cf279 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -59,7 +59,7 @@ private:
void _resort();
protected:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index 952f2a9710..6bbfa1aeb0 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -63,11 +63,13 @@ int TabContainer::_get_top_margin() const {
return tab_height + content_height;
}
-void TabContainer::_gui_input(const InputEvent &p_event) {
+void TabContainer::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
- Point2 pos(p_event.mouse_button.x, p_event.mouse_button.y);
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+
+ Point2 pos(mb->get_pos().x, mb->get_pos().y);
Size2 size = get_size();
// Click must be on tabs in the tab header area.
@@ -206,9 +208,6 @@ void TabContainer::_notification(int p_what) {
break;
}
- // Draw the tab area.
- panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
-
// Draw all visible tabs.
int x = 0;
for (int i = 0; i < tab_widths.size(); i++) {
@@ -227,7 +226,7 @@ void TabContainer::_notification(int p_what) {
// Draw the tab background.
int tab_width = tab_widths[i];
- Rect2 tab_rect(tabs_ofs_cache + x, 2, tab_width, header_height);
+ Rect2 tab_rect(tabs_ofs_cache + x, 0, tab_width, header_height);
tab_style->draw(canvas, tab_rect);
// Draw the tab contents.
@@ -282,6 +281,8 @@ void TabContainer::_notification(int p_what) {
Color(1, 1, 1, first_tab_cache > 0 ? 1.0 : 0.5));
}
+ // Draw the tab area.
+ panel->draw(canvas, Rect2(0, header_height, size.width, size.height - header_height));
} break;
case NOTIFICATION_THEME_CHANGED: {
if (get_tab_count() > 0) {
@@ -660,7 +661,7 @@ TabContainer::TabContainer() {
current = 0;
previous = 0;
mouse_x_cache = 0;
- align = ALIGN_LEFT;
+ align = ALIGN_CENTER;
tabs_visible = true;
popup = NULL;
-} \ No newline at end of file
+}
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index 87a99c82b8..1105c6b298 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -63,7 +63,7 @@ private:
protected:
void _child_renamed_callback();
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
virtual void add_child_notify(Node *p_child);
virtual void remove_child_notify(Node *p_child);
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index fb27f3b017..d94c33e408 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -79,13 +79,15 @@ Size2 Tabs::get_minimum_size() const {
return ms;
}
-void Tabs::_gui_input(const InputEvent &p_event) {
+void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
- if (p_event.type == InputEvent::MOUSE_MOTION) {
+ Ref<InputEventMouseMotion> mm = p_event;
- Point2 pos(p_event.mouse_motion.x, p_event.mouse_motion.y);
+ if (mm.is_valid()) {
- hilite_arrow = -1;
+ Point2 pos = mm->get_pos();
+
+ highlight_arrow = -1;
if (buttons_visible) {
Ref<Texture> incr = get_icon("increment");
@@ -94,9 +96,9 @@ void Tabs::_gui_input(const InputEvent &p_event) {
int limit = get_size().width - incr->get_width() - decr->get_width();
if (pos.x > limit + decr->get_width()) {
- hilite_arrow = 1;
+ highlight_arrow = 1;
} else if (pos.x > limit) {
- hilite_arrow = 0;
+ highlight_arrow = 0;
}
}
@@ -130,9 +132,11 @@ void Tabs::_gui_input(const InputEvent &p_event) {
return;
}
- if (rb_pressing && p_event.type == InputEvent::MOUSE_BUTTON &&
- !p_event.mouse_button.pressed &&
- p_event.mouse_button.button_index == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
+
+ if (rb_pressing && mb.is_valid() &&
+ !mb->is_pressed() &&
+ mb->get_button_index() == BUTTON_LEFT) {
if (rb_hover != -1) {
//pressed
@@ -143,9 +147,9 @@ void Tabs::_gui_input(const InputEvent &p_event) {
update();
}
- if (cb_pressing && p_event.type == InputEvent::MOUSE_BUTTON &&
- !p_event.mouse_button.pressed &&
- p_event.mouse_button.button_index == BUTTON_LEFT) {
+ if (cb_pressing && mb.is_valid() &&
+ !mb->is_pressed() &&
+ mb->get_button_index() == BUTTON_LEFT) {
if (cb_hover != -1) {
//pressed
@@ -156,12 +160,12 @@ void Tabs::_gui_input(const InputEvent &p_event) {
update();
}
- if (p_event.type == InputEvent::MOUSE_BUTTON &&
- p_event.mouse_button.pressed &&
- p_event.mouse_button.button_index == BUTTON_LEFT) {
+ if (mb.is_valid() &&
+ mb->is_pressed() &&
+ mb->get_button_index() == BUTTON_LEFT) {
// clicks
- Point2 pos(p_event.mouse_button.x, p_event.mouse_button.y);
+ Point2 pos(mb->get_pos().x, mb->get_pos().y);
if (buttons_visible) {
@@ -268,8 +272,8 @@ void Tabs::_notification(int p_what) {
Ref<Texture> incr = get_icon("increment");
Ref<Texture> decr = get_icon("decrement");
- Ref<Texture> incr_hl = get_icon("increment_hilite");
- Ref<Texture> decr_hl = get_icon("decrement_hilite");
+ Ref<Texture> incr_hl = get_icon("increment_highlight");
+ Ref<Texture> decr_hl = get_icon("decrement_highlight");
int limit = get_size().width - incr->get_size().width - decr->get_size().width;
@@ -385,12 +389,12 @@ void Tabs::_notification(int p_what) {
int vofs = (get_size().height - incr->get_size().height) / 2;
if (offset > 0)
- draw_texture(hilite_arrow == 0 ? decr_hl : decr, Point2(limit, vofs));
+ draw_texture(highlight_arrow == 0 ? decr_hl : decr, Point2(limit, vofs));
else
draw_texture(decr, Point2(limit, vofs), Color(1, 1, 1, 0.5));
if (missing_right)
- draw_texture(hilite_arrow == 1 ? incr_hl : incr, Point2(limit + decr->get_size().width, vofs));
+ draw_texture(highlight_arrow == 1 ? incr_hl : incr, Point2(limit + decr->get_size().width, vofs));
else
draw_texture(incr, Point2(limit + decr->get_size().width, vofs), Color(1, 1, 1, 0.5));
@@ -677,7 +681,7 @@ Tabs::Tabs() {
tab_align = ALIGN_CENTER;
rb_hover = -1;
rb_pressing = false;
- hilite_arrow = -1;
+ highlight_arrow = -1;
cb_hover = -1;
cb_pressing = false;
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index 2392327206..61b97d2dff 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -69,7 +69,7 @@ private:
int offset;
int max_drawn_tab;
- int hilite_arrow;
+ int highlight_arrow;
bool buttons_visible;
bool missing_right;
Vector<Tab> tabs;
@@ -90,7 +90,7 @@ private:
void _ensure_no_over_offset();
protected:
- void _gui_input(const InputEvent &p_event);
+ void _gui_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
static void _bind_methods();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index fb986cfb97..4989a3d863 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1440,1271 +1440,1266 @@ void TextEdit::_get_mouse_pos(const Point2i &p_mouse, int &r_row, int &r_col) co
r_col = col;
}
-void TextEdit::_gui_input(const InputEvent &p_gui_input) {
+void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
- switch (p_gui_input.type) {
+ Ref<InputEventMouseButton> mb = p_gui_input;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
+ if (completion_active && completion_rect.has_point(mb->get_pos())) {
- const InputEventMouseButton &mb = p_gui_input.mouse_button;
-
- if (completion_active && completion_rect.has_point(Point2(mb.x, mb.y))) {
-
- if (!mb.pressed)
- return;
+ if (!mb->is_pressed())
+ return;
- if (mb.button_index == BUTTON_WHEEL_UP) {
- if (completion_index > 0) {
- completion_index--;
- completion_current = completion_options[completion_index];
- update();
- }
+ if (mb->get_button_index() == BUTTON_WHEEL_UP) {
+ if (completion_index > 0) {
+ completion_index--;
+ completion_current = completion_options[completion_index];
+ update();
}
- if (mb.button_index == BUTTON_WHEEL_DOWN) {
+ }
+ if (mb->get_button_index() == BUTTON_WHEEL_DOWN) {
- if (completion_index < completion_options.size() - 1) {
- completion_index++;
- completion_current = completion_options[completion_index];
- update();
- }
+ if (completion_index < completion_options.size() - 1) {
+ completion_index++;
+ completion_current = completion_options[completion_index];
+ update();
}
+ }
- if (mb.button_index == BUTTON_LEFT) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
- completion_index = CLAMP(completion_line_ofs + (mb.y - completion_rect.pos.y) / get_row_height(), 0, completion_options.size() - 1);
+ completion_index = CLAMP(completion_line_ofs + (mb->get_pos().y - completion_rect.pos.y) / get_row_height(), 0, completion_options.size() - 1);
- completion_current = completion_options[completion_index];
- update();
- if (mb.doubleclick)
- _confirm_completion();
- }
- return;
- } else {
- _cancel_completion();
- _cancel_code_hint();
+ completion_current = completion_options[completion_index];
+ update();
+ if (mb->is_doubleclick())
+ _confirm_completion();
}
+ return;
+ } else {
+ _cancel_completion();
+ _cancel_code_hint();
+ }
- if (mb.pressed) {
+ if (mb->is_pressed()) {
- if (mb.button_index == BUTTON_WHEEL_UP && !mb.mod.command) {
- v_scroll->set_value(v_scroll->get_value() - (3 * mb.factor));
- }
- if (mb.button_index == BUTTON_WHEEL_DOWN && !mb.mod.command) {
- v_scroll->set_value(v_scroll->get_value() + (3 * mb.factor));
- }
- if (mb.button_index == BUTTON_WHEEL_LEFT) {
- h_scroll->set_value(h_scroll->get_value() - (100 * mb.factor));
- }
- if (mb.button_index == BUTTON_WHEEL_RIGHT) {
- h_scroll->set_value(h_scroll->get_value() + (100 * mb.factor));
- }
- if (mb.button_index == BUTTON_LEFT) {
+ if (mb->get_button_index() == BUTTON_WHEEL_UP && !mb->get_command()) {
+ v_scroll->set_value(v_scroll->get_value() - (3 * mb->get_factor()));
+ }
+ if (mb->get_button_index() == BUTTON_WHEEL_DOWN && !mb->get_command()) {
+ v_scroll->set_value(v_scroll->get_value() + (3 * mb->get_factor()));
+ }
+ if (mb->get_button_index() == BUTTON_WHEEL_LEFT) {
+ h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));
+ }
+ if (mb->get_button_index() == BUTTON_WHEEL_RIGHT) {
+ h_scroll->set_value(h_scroll->get_value() + (100 * mb->get_factor()));
+ }
+ if (mb->get_button_index() == BUTTON_LEFT) {
- _reset_caret_blink_timer();
+ _reset_caret_blink_timer();
- int row, col;
- _get_mouse_pos(Point2i(mb.x, mb.y), row, col);
+ int row, col;
+ _get_mouse_pos(Point2i(mb->get_pos().x, mb->get_pos().y), row, col);
- if (mb.mod.command && highlighted_word != String()) {
+ if (mb->get_command() && highlighted_word != String()) {
- emit_signal("symbol_lookup", highlighted_word, row, col);
+ emit_signal("symbol_lookup", highlighted_word, row, col);
+ return;
+ }
+
+ // toggle breakpoint on gutter click
+ if (draw_breakpoint_gutter) {
+ int gutter = cache.style_normal->get_margin(MARGIN_LEFT);
+ if (mb->get_pos().x > gutter && mb->get_pos().x <= gutter + cache.breakpoint_gutter_width + 3) {
+ set_line_as_breakpoint(row, !is_line_set_as_breakpoint(row));
+ emit_signal("breakpoint_toggled", row);
return;
}
+ }
- // toggle breakpoint on gutter click
- if (draw_breakpoint_gutter) {
- int gutter = cache.style_normal->get_margin(MARGIN_LEFT);
- if (mb.x > gutter && mb.x <= gutter + cache.breakpoint_gutter_width + 3) {
- set_line_as_breakpoint(row, !is_line_set_as_breakpoint(row));
- emit_signal("breakpoint_toggled", row);
- return;
- }
- }
+ int prev_col = cursor.column;
+ int prev_line = cursor.line;
- int prev_col = cursor.column;
- int prev_line = cursor.line;
+ cursor_set_line(row);
+ cursor_set_column(col);
- cursor_set_line(row);
- cursor_set_column(col);
+ if (mb->get_shift() && (cursor.column != prev_col || cursor.line != prev_line)) {
- if (mb.mod.shift && (cursor.column != prev_col || cursor.line != prev_line)) {
+ if (!selection.active) {
+ selection.active = true;
+ selection.selecting_mode = Selection::MODE_POINTER;
+ selection.from_column = prev_col;
+ selection.from_line = prev_line;
+ selection.to_column = cursor.column;
+ selection.to_line = cursor.line;
+
+ if (selection.from_line > selection.to_line || (selection.from_line == selection.to_line && selection.from_column > selection.to_column)) {
+ SWAP(selection.from_column, selection.to_column);
+ SWAP(selection.from_line, selection.to_line);
+ selection.shiftclick_left = false;
+ } else {
+ selection.shiftclick_left = true;
+ }
+ selection.selecting_line = prev_line;
+ selection.selecting_column = prev_col;
+ update();
+ } else {
- if (!selection.active) {
- selection.active = true;
- selection.selecting_mode = Selection::MODE_POINTER;
- selection.from_column = prev_col;
- selection.from_line = prev_line;
- selection.to_column = cursor.column;
- selection.to_line = cursor.line;
+ if (cursor.line < selection.selecting_line || (cursor.line == selection.selecting_line && cursor.column < selection.selecting_column)) {
- if (selection.from_line > selection.to_line || (selection.from_line == selection.to_line && selection.from_column > selection.to_column)) {
+ if (selection.shiftclick_left) {
SWAP(selection.from_column, selection.to_column);
SWAP(selection.from_line, selection.to_line);
- selection.shiftclick_left = false;
- } else {
- selection.shiftclick_left = true;
+ selection.shiftclick_left = !selection.shiftclick_left;
}
- selection.selecting_line = prev_line;
- selection.selecting_column = prev_col;
- update();
- } else {
+ selection.from_column = cursor.column;
+ selection.from_line = cursor.line;
- if (cursor.line < selection.selecting_line || (cursor.line == selection.selecting_line && cursor.column < selection.selecting_column)) {
-
- if (selection.shiftclick_left) {
- SWAP(selection.from_column, selection.to_column);
- SWAP(selection.from_line, selection.to_line);
- selection.shiftclick_left = !selection.shiftclick_left;
- }
- selection.from_column = cursor.column;
- selection.from_line = cursor.line;
-
- } else if (cursor.line > selection.selecting_line || (cursor.line == selection.selecting_line && cursor.column > selection.selecting_column)) {
-
- if (!selection.shiftclick_left) {
- SWAP(selection.from_column, selection.to_column);
- SWAP(selection.from_line, selection.to_line);
- selection.shiftclick_left = !selection.shiftclick_left;
- }
- selection.to_column = cursor.column;
- selection.to_line = cursor.line;
+ } else if (cursor.line > selection.selecting_line || (cursor.line == selection.selecting_line && cursor.column > selection.selecting_column)) {
- } else {
- selection.active = false;
+ if (!selection.shiftclick_left) {
+ SWAP(selection.from_column, selection.to_column);
+ SWAP(selection.from_line, selection.to_line);
+ selection.shiftclick_left = !selection.shiftclick_left;
}
+ selection.to_column = cursor.column;
+ selection.to_line = cursor.line;
- update();
+ } else {
+ selection.active = false;
}
- } else {
-
- //if sel active and dblick last time < something
-
- //else
- selection.active = false;
- selection.selecting_mode = Selection::MODE_POINTER;
- selection.selecting_line = row;
- selection.selecting_column = col;
+ update();
}
- if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec() - last_dblclk) < 600 && cursor.line == prev_line) {
- //tripleclick select line
- select(cursor.line, 0, cursor.line, text[cursor.line].length());
- selection.selecting_column = 0;
- last_dblclk = 0;
+ } else {
- } else if (mb.doubleclick && text[cursor.line].length()) {
+ //if sel active and dblick last time < something
- //doubleclick select world
- String s = text[cursor.line];
- int beg = CLAMP(cursor.column, 0, s.length());
- int end = beg;
+ //else
+ selection.active = false;
+ selection.selecting_mode = Selection::MODE_POINTER;
+ selection.selecting_line = row;
+ selection.selecting_column = col;
+ }
- if (s[beg] > 32 || beg == s.length()) {
+ if (!mb->is_doubleclick() && (OS::get_singleton()->get_ticks_msec() - last_dblclk) < 600 && cursor.line == prev_line) {
+ //tripleclick select line
+ select(cursor.line, 0, cursor.line, text[cursor.line].length());
+ selection.selecting_column = 0;
+ last_dblclk = 0;
- bool symbol = beg < s.length() && _is_symbol(s[beg]); //not sure if right but most editors behave like this
+ } else if (mb->is_doubleclick() && text[cursor.line].length()) {
- while (beg > 0 && s[beg - 1] > 32 && (symbol == _is_symbol(s[beg - 1]))) {
- beg--;
- }
- while (end < s.length() && s[end + 1] > 32 && (symbol == _is_symbol(s[end + 1]))) {
- end++;
- }
+ //doubleclick select world
+ String s = text[cursor.line];
+ int beg = CLAMP(cursor.column, 0, s.length());
+ int end = beg;
- if (end < s.length())
- end += 1;
+ if (s[beg] > 32 || beg == s.length()) {
- select(cursor.line, beg, cursor.line, end);
+ bool symbol = beg < s.length() && _is_symbol(s[beg]); //not sure if right but most editors behave like this
- selection.selecting_column = beg;
+ while (beg > 0 && s[beg - 1] > 32 && (symbol == _is_symbol(s[beg - 1]))) {
+ beg--;
+ }
+ while (end < s.length() && s[end + 1] > 32 && (symbol == _is_symbol(s[end + 1]))) {
+ end++;
}
- last_dblclk = OS::get_singleton()->get_ticks_msec();
- }
+ if (end < s.length())
+ end += 1;
- update();
- }
+ select(cursor.line, beg, cursor.line, end);
- if (mb.button_index == BUTTON_RIGHT && context_menu_enabled) {
+ selection.selecting_column = beg;
+ }
- menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
- menu->set_size(Vector2(1, 1));
- menu->popup();
- grab_focus();
+ last_dblclk = OS::get_singleton()->get_ticks_msec();
}
- } else {
- if (mb.button_index == BUTTON_LEFT)
- click_select_held->stop();
+ update();
+ }
+
+ if (mb->get_button_index() == BUTTON_RIGHT && context_menu_enabled) {
- // notify to show soft keyboard
- notification(NOTIFICATION_FOCUS_ENTER);
+ menu->set_position(get_global_transform().xform(get_local_mouse_pos()));
+ menu->set_size(Vector2(1, 1));
+ menu->popup();
+ grab_focus();
}
+ } else {
- } break;
- case InputEvent::MOUSE_MOTION: {
+ if (mb->get_button_index() == BUTTON_LEFT)
+ click_select_held->stop();
+
+ // notify to show soft keyboard
+ notification(NOTIFICATION_FOCUS_ENTER);
+ }
+ }
- const InputEventMouseMotion &mm = p_gui_input.mouse_motion;
+ Ref<InputEventMouseMotion> mm = p_gui_input;
- if (select_identifiers_enabled) {
- if (mm.mod.command && mm.button_mask == 0) {
+ if (mm.is_valid()) {
- String new_word = get_word_at_pos(Vector2(mm.x, mm.y));
- if (new_word != highlighted_word) {
- highlighted_word = new_word;
- update();
- }
- } else {
- if (highlighted_word != String()) {
- highlighted_word = String();
- update();
- }
+ if (select_identifiers_enabled) {
+ if (mm->get_command() && mm->get_button_mask() == 0) {
+
+ String new_word = get_word_at_pos(mm->get_pos());
+ if (new_word != highlighted_word) {
+ highlighted_word = new_word;
+ update();
+ }
+ } else {
+ if (highlighted_word != String()) {
+ highlighted_word = String();
+ update();
}
}
+ }
- if (mm.button_mask & BUTTON_MASK_LEFT && get_viewport()->gui_get_drag_data() == Variant()) { //ignore if dragging
+ if (mm->get_button_mask() & BUTTON_MASK_LEFT && get_viewport()->gui_get_drag_data() == Variant()) { //ignore if dragging
- if (selection.selecting_mode != Selection::MODE_NONE) {
+ if (selection.selecting_mode != Selection::MODE_NONE) {
- _reset_caret_blink_timer();
+ _reset_caret_blink_timer();
- int row, col;
- _get_mouse_pos(Point2i(mm.x, mm.y), row, col);
+ int row, col;
+ _get_mouse_pos(mm->get_pos(), row, col);
- select(selection.selecting_line, selection.selecting_column, row, col);
+ select(selection.selecting_line, selection.selecting_column, row, col);
- cursor_set_line(row);
- cursor_set_column(col);
- update();
+ cursor_set_line(row);
+ cursor_set_column(col);
+ update();
- click_select_held->start();
- }
+ click_select_held->start();
}
+ }
+ }
- } break;
+ Ref<InputEventKey> k = p_gui_input;
- case InputEvent::KEY: {
+ if (k.is_valid()) {
- InputEventKey k = p_gui_input.key;
+ k = k->duplicate(); //it will be modified later on
#ifdef OSX_ENABLED
- if (k.scancode == KEY_META) {
+ if (k->get_scancode() == KEY_META) {
#else
- if (k.scancode == KEY_CONTROL) {
+ if (k->get_scancode() == KEY_CONTROL) {
#endif
- if (select_identifiers_enabled) {
+ if (select_identifiers_enabled) {
- if (k.pressed) {
+ if (k->is_pressed()) {
- highlighted_word = get_word_at_pos(get_local_mouse_pos());
- update();
+ highlighted_word = get_word_at_pos(get_local_mouse_pos());
+ update();
- } else {
- highlighted_word = String();
- update();
- }
+ } else {
+ highlighted_word = String();
+ update();
}
}
+ }
- if (!k.pressed)
- return;
-
- if (completion_active) {
- if (readonly)
- break;
-
- bool valid = true;
- if (k.mod.command || k.mod.meta)
- valid = false;
-
- if (valid) {
-
- if (!k.mod.alt) {
- if (k.scancode == KEY_UP) {
+ if (!k->is_pressed())
+ return;
- if (completion_index > 0) {
- completion_index--;
- completion_current = completion_options[completion_index];
- update();
- }
- accept_event();
- return;
- }
+ if (completion_active) {
+ if (readonly)
+ return;
- if (k.scancode == KEY_DOWN) {
+ bool valid = true;
+ if (k->get_command() || k->get_metakey())
+ valid = false;
- if (completion_index < completion_options.size() - 1) {
- completion_index++;
- completion_current = completion_options[completion_index];
- update();
- }
- accept_event();
- return;
- }
+ if (valid) {
- if (k.scancode == KEY_PAGEUP) {
+ if (!k->get_alt()) {
+ if (k->get_scancode() == KEY_UP) {
- completion_index -= get_constant("completion_lines");
- if (completion_index < 0)
- completion_index = 0;
+ if (completion_index > 0) {
+ completion_index--;
completion_current = completion_options[completion_index];
update();
- accept_event();
- return;
}
+ accept_event();
+ return;
+ }
- if (k.scancode == KEY_PAGEDOWN) {
+ if (k->get_scancode() == KEY_DOWN) {
- completion_index += get_constant("completion_lines");
- if (completion_index >= completion_options.size())
- completion_index = completion_options.size() - 1;
+ if (completion_index < completion_options.size() - 1) {
+ completion_index++;
completion_current = completion_options[completion_index];
update();
- accept_event();
- return;
}
+ accept_event();
+ return;
+ }
- if (k.scancode == KEY_HOME && completion_index > 0) {
+ if (k->get_scancode() == KEY_PAGEUP) {
+ completion_index -= get_constant("completion_lines");
+ if (completion_index < 0)
completion_index = 0;
- completion_current = completion_options[completion_index];
- update();
- accept_event();
- return;
- }
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
+ }
- if (k.scancode == KEY_END && completion_index < completion_options.size() - 1) {
+ if (k->get_scancode() == KEY_PAGEDOWN) {
+ completion_index += get_constant("completion_lines");
+ if (completion_index >= completion_options.size())
completion_index = completion_options.size() - 1;
- completion_current = completion_options[completion_index];
- update();
- accept_event();
- return;
- }
-
- if (k.scancode == KEY_DOWN) {
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
+ }
- if (completion_index < completion_options.size() - 1) {
- completion_index++;
- completion_current = completion_options[completion_index];
- update();
- }
- accept_event();
- return;
- }
+ if (k->get_scancode() == KEY_HOME && completion_index > 0) {
- if (k.scancode == KEY_ENTER || k.scancode == KEY_RETURN || k.scancode == KEY_TAB) {
+ completion_index = 0;
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
+ }
- _confirm_completion();
- accept_event();
- return;
- }
+ if (k->get_scancode() == KEY_END && completion_index < completion_options.size() - 1) {
- if (k.scancode == KEY_BACKSPACE) {
+ completion_index = completion_options.size() - 1;
+ completion_current = completion_options[completion_index];
+ update();
+ accept_event();
+ return;
+ }
- _reset_caret_blink_timer();
+ if (k->get_scancode() == KEY_DOWN) {
- backspace_at_cursor();
- _update_completion_candidates();
- accept_event();
- return;
+ if (completion_index < completion_options.size() - 1) {
+ completion_index++;
+ completion_current = completion_options[completion_index];
+ update();
}
+ accept_event();
+ return;
+ }
- if (k.scancode == KEY_SHIFT) {
- accept_event();
- return;
- }
+ if (k->get_scancode() == KEY_ENTER || k->get_scancode() == KEY_RETURN || k->get_scancode() == KEY_TAB) {
+
+ _confirm_completion();
+ accept_event();
+ return;
}
- if (k.unicode > 32) {
+ if (k->get_scancode() == KEY_BACKSPACE) {
_reset_caret_blink_timer();
- const CharType chr[2] = { (CharType)k.unicode, 0 };
- if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
- _consume_pair_symbol(chr[0]);
- } else {
+ backspace_at_cursor();
+ _update_completion_candidates();
+ accept_event();
+ return;
+ }
- // remove the old character if in insert mode
- if (insert_mode) {
- begin_complex_operation();
+ if (k->get_scancode() == KEY_SHIFT) {
+ accept_event();
+ return;
+ }
+ }
- // make sure we don't try and remove empty space
- if (cursor.column < get_line(cursor.line).length()) {
- _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
- }
- }
+ if (k->get_unicode() > 32) {
- _insert_text_at_cursor(chr);
+ _reset_caret_blink_timer();
- if (insert_mode) {
- end_complex_operation();
+ const CharType chr[2] = { (CharType)k->get_unicode(), 0 };
+ if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
+ _consume_pair_symbol(chr[0]);
+ } else {
+
+ // remove the old character if in insert mode
+ if (insert_mode) {
+ begin_complex_operation();
+
+ // make sure we don't try and remove empty space
+ if (cursor.column < get_line(cursor.line).length()) {
+ _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
}
}
- _update_completion_candidates();
- accept_event();
- return;
+ _insert_text_at_cursor(chr);
+
+ if (insert_mode) {
+ end_complex_operation();
+ }
}
- }
+ _update_completion_candidates();
+ accept_event();
- _cancel_completion();
+ return;
+ }
}
- /* TEST CONTROL FIRST!! */
+ _cancel_completion();
+ }
- // some remaps for duplicate functions..
- if (k.mod.command && !k.mod.shift && !k.mod.alt && !k.mod.meta && k.scancode == KEY_INSERT) {
+ /* TEST CONTROL FIRST!! */
- k.scancode = KEY_C;
- }
- if (!k.mod.command && k.mod.shift && !k.mod.alt && !k.mod.meta && k.scancode == KEY_INSERT) {
+ // some remaps for duplicate functions..
+ if (k->get_command() && !k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_scancode() == KEY_INSERT) {
- k.scancode = KEY_V;
- k.mod.command = true;
- k.mod.shift = false;
- }
+ k->set_scancode(KEY_C);
+ }
+ if (!k->get_command() && k->get_shift() && !k->get_alt() && !k->get_metakey() && k->get_scancode() == KEY_INSERT) {
- if (!k.mod.command) {
- _reset_caret_blink_timer();
- }
+ k->set_scancode(KEY_V);
+ k->set_command(true);
+ k->set_shift(false);
+ }
- // save here for insert mode, just in case it is cleared in the following section
- bool had_selection = selection.active;
+ if (!k->get_command()) {
+ _reset_caret_blink_timer();
+ }
- // stuff to do when selection is active..
- if (selection.active) {
+ // save here for insert mode, just in case it is cleared in the following section
+ bool had_selection = selection.active;
- if (readonly)
- break;
+ // stuff to do when selection is active..
+ if (selection.active) {
- bool clear = false;
- bool unselect = false;
- bool dobreak = false;
+ if (readonly)
+ return;
- switch (k.scancode) {
+ bool clear = false;
+ bool unselect = false;
+ bool dobreak = false;
- case KEY_TAB: {
- if (k.mod.shift) {
- indent_selection_left();
- } else {
- indent_selection_right();
- }
- dobreak = true;
- accept_event();
- } break;
- case KEY_X:
- case KEY_C:
- //special keys often used with control, wait...
- clear = (!k.mod.command || k.mod.shift || k.mod.alt);
- break;
- case KEY_DELETE:
- if (!k.mod.shift) {
- accept_event();
- clear = true;
- dobreak = true;
- } else if (k.mod.command || k.mod.alt) {
- dobreak = true;
- }
- break;
- case KEY_BACKSPACE:
+ switch (k->get_scancode()) {
+
+ case KEY_TAB: {
+ if (k->get_shift()) {
+ indent_selection_left();
+ } else {
+ indent_selection_right();
+ }
+ dobreak = true;
+ accept_event();
+ } break;
+ case KEY_X:
+ case KEY_C:
+ //special keys often used with control, wait...
+ clear = (!k->get_command() || k->get_shift() || k->get_alt());
+ break;
+ case KEY_DELETE:
+ if (!k->get_shift()) {
accept_event();
clear = true;
dobreak = true;
+ } else if (k->get_command() || k->get_alt()) {
+ dobreak = true;
+ }
+ break;
+ case KEY_BACKSPACE:
+ accept_event();
+ clear = true;
+ dobreak = true;
+ break;
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_UP:
+ case KEY_DOWN:
+ case KEY_PAGEUP:
+ case KEY_PAGEDOWN:
+ case KEY_HOME:
+ case KEY_END:
+ // ignore arrows if any modifiers are held (shift = selecting, others may be used for editor hotkeys)
+ if (k->get_command() || k->get_shift() || k->get_alt())
break;
- case KEY_LEFT:
- case KEY_RIGHT:
- case KEY_UP:
- case KEY_DOWN:
- case KEY_PAGEUP:
- case KEY_PAGEDOWN:
- case KEY_HOME:
- case KEY_END:
- // ignore arrows if any modifiers are held (shift = selecting, others may be used for editor hotkeys)
- if (k.mod.command || k.mod.shift || k.mod.alt)
- break;
- unselect = true;
- break;
+ unselect = true;
+ break;
- default:
- if (k.unicode >= 32 && !k.mod.command && !k.mod.alt && !k.mod.meta)
- clear = true;
- if (auto_brace_completion_enabled && _is_pair_left_symbol(k.unicode))
- clear = false;
- }
+ default:
+ if (k->get_unicode() >= 32 && !k->get_command() && !k->get_alt() && !k->get_metakey())
+ clear = true;
+ if (auto_brace_completion_enabled && _is_pair_left_symbol(k->get_unicode()))
+ clear = false;
+ }
- if (unselect) {
- selection.active = false;
- selection.selecting_mode = Selection::MODE_NONE;
- update();
- }
- if (clear) {
+ if (unselect) {
+ selection.active = false;
+ selection.selecting_mode = Selection::MODE_NONE;
+ update();
+ }
+ if (clear) {
- if (!dobreak) {
- begin_complex_operation();
- }
- selection.active = false;
- update();
- _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
- cursor_set_line(selection.from_line);
- cursor_set_column(selection.from_column);
- update();
+ if (!dobreak) {
+ begin_complex_operation();
}
- if (dobreak)
- break;
+ selection.active = false;
+ update();
+ _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
+ cursor_set_line(selection.from_line);
+ cursor_set_column(selection.from_column);
+ update();
}
+ if (dobreak)
+ return;
+ }
- selection.selecting_text = false;
+ selection.selecting_text = false;
- bool scancode_handled = true;
+ bool scancode_handled = true;
- // special scancode test...
+ // special scancode test...
- switch (k.scancode) {
+ switch (k->get_scancode()) {
- case KEY_ENTER:
- case KEY_RETURN: {
+ case KEY_ENTER:
+ case KEY_RETURN: {
- if (readonly)
- break;
+ if (readonly)
+ break;
- String ins = "\n";
+ String ins = "\n";
- //keep indentation
- int space_count = 0;
- for (int i = 0; i < text[cursor.line].length(); i++) {
- if (text[cursor.line][i] == '\t') {
+ //keep indentation
+ int space_count = 0;
+ for (int i = 0; i < text[cursor.line].length(); i++) {
+ if (text[cursor.line][i] == '\t') {
+ if (indent_using_spaces) {
+ ins += space_indent;
+ } else {
+ ins += "\t";
+ }
+ space_count = 0;
+ } else if (text[cursor.line][i] == ' ') {
+ space_count++;
+
+ if (space_count == indent_size) {
if (indent_using_spaces) {
ins += space_indent;
} else {
ins += "\t";
}
space_count = 0;
- } else if (text[cursor.line][i] == ' ') {
- space_count++;
-
- if (space_count == indent_size) {
- if (indent_using_spaces) {
- ins += space_indent;
- } else {
- ins += "\t";
- }
- space_count = 0;
- }
- } else {
- break;
}
+ } else {
+ break;
}
- if (auto_indent) {
- // indent once again if previous line will end with ':'
- // (i.e. colon precedes current cursor position)
- if (cursor.column > 0 && text[cursor.line][cursor.column - 1] == ':') {
- if (indent_using_spaces) {
- ins += space_indent;
- } else {
- ins += "\t";
- }
+ }
+ if (auto_indent) {
+ // indent once again if previous line will end with ':'
+ // (i.e. colon precedes current cursor position)
+ if (cursor.column > 0 && text[cursor.line][cursor.column - 1] == ':') {
+ if (indent_using_spaces) {
+ ins += space_indent;
+ } else {
+ ins += "\t";
}
}
+ }
- bool first_line = false;
- if (k.mod.command) {
- if (k.mod.shift) {
- if (cursor.line > 0) {
- cursor_set_line(cursor.line - 1);
- cursor_set_column(text[cursor.line].length());
- } else {
- cursor_set_column(0);
- first_line = true;
- }
- } else {
+ bool first_line = false;
+ if (k->get_command()) {
+ if (k->get_shift()) {
+ if (cursor.line > 0) {
+ cursor_set_line(cursor.line - 1);
cursor_set_column(text[cursor.line].length());
+ } else {
+ cursor_set_column(0);
+ first_line = true;
}
+ } else {
+ cursor_set_column(text[cursor.line].length());
}
+ }
- _insert_text_at_cursor(ins);
- _push_current_op();
+ _insert_text_at_cursor(ins);
+ _push_current_op();
- if (first_line) {
- cursor_set_line(0);
- }
+ if (first_line) {
+ cursor_set_line(0);
+ }
- } break;
- case KEY_ESCAPE: {
- if (completion_hint != "") {
- completion_hint = "";
- update();
- } else {
- scancode_handled = false;
- }
- } break;
- case KEY_TAB: {
- if (k.mod.command) break; // avoid tab when command
+ } break;
+ case KEY_ESCAPE: {
+ if (completion_hint != "") {
+ completion_hint = "";
+ update();
+ } else {
+ scancode_handled = false;
+ }
+ } break;
+ case KEY_TAB: {
+ if (k->get_command()) break; // avoid tab when command
- if (readonly)
- break;
+ if (readonly)
+ break;
- if (selection.active) {
+ if (selection.active) {
- } else {
- if (k.mod.shift) {
-
- //simple unindent
- int cc = cursor.column;
- if (cc > 0 && cc <= text[cursor.line].length()) {
- if (text[cursor.line][cursor.column - 1] == '\t') {
- backspace_at_cursor();
- } else {
- if (cursor.column - indent_size >= 0) {
-
- bool unindent = true;
- for (int i = 1; i <= indent_size; i++) {
- if (text[cursor.line][cursor.column - i] != ' ') {
- unindent = false;
- break;
- }
- }
+ } else {
+ if (k->get_shift()) {
- if (unindent) {
- _remove_text(cursor.line, cursor.column - indent_size, cursor.line, cursor.column);
- cursor_set_column(cursor.column - indent_size);
+ //simple unindent
+ int cc = cursor.column;
+ if (cc > 0 && cc <= text[cursor.line].length()) {
+ if (text[cursor.line][cursor.column - 1] == '\t') {
+ backspace_at_cursor();
+ } else {
+ if (cursor.column - indent_size >= 0) {
+
+ bool unindent = true;
+ for (int i = 1; i <= indent_size; i++) {
+ if (text[cursor.line][cursor.column - i] != ' ') {
+ unindent = false;
+ break;
}
}
+
+ if (unindent) {
+ _remove_text(cursor.line, cursor.column - indent_size, cursor.line, cursor.column);
+ cursor_set_column(cursor.column - indent_size);
+ }
}
}
+ }
+ } else {
+ //simple indent
+ if (indent_using_spaces) {
+ _insert_text_at_cursor(space_indent);
} else {
- //simple indent
- if (indent_using_spaces) {
- _insert_text_at_cursor(space_indent);
- } else {
- _insert_text_at_cursor("\t");
- }
+ _insert_text_at_cursor("\t");
}
}
+ }
- } break;
- case KEY_BACKSPACE: {
- if (readonly)
- break;
+ } break;
+ case KEY_BACKSPACE: {
+ if (readonly)
+ break;
#ifdef APPLE_STYLE_KEYS
- if (k.mod.alt) {
+ if (k->get_alt()) {
#else
- if (k.mod.alt) {
- scancode_handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ scancode_handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- int line = cursor.line;
- int column = cursor.column;
-
- bool prev_char = false;
- bool only_whitespace = true;
-
- while (only_whitespace && line > 0) {
-
- while (column > 0) {
- CharType c = text[line][column - 1];
-
- if (c != '\t' && c != ' ') {
- only_whitespace = false;
- break;
- }
+ int line = cursor.line;
+ int column = cursor.column;
- column--;
- }
+ bool prev_char = false;
+ bool only_whitespace = true;
- if (only_whitespace) {
- line--;
- column = text[line].length();
- }
- }
+ while (only_whitespace && line > 0) {
while (column > 0) {
- bool ischar = _is_text_char(text[line][column - 1]);
+ CharType c = text[line][column - 1];
- if (prev_char && !ischar)
+ if (c != '\t' && c != ' ') {
+ only_whitespace = false;
break;
+ }
- prev_char = ischar;
column--;
}
- _remove_text(line, column, cursor.line, cursor.column);
+ if (only_whitespace) {
+ line--;
+ column = text[line].length();
+ }
+ }
- cursor_set_line(line);
- cursor_set_column(column);
+ while (column > 0) {
+ bool ischar = _is_text_char(text[line][column - 1]);
- } else {
- backspace_at_cursor();
- }
+ if (prev_char && !ischar)
+ break;
- } break;
- case KEY_KP_4: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
+ prev_char = ischar;
+ column--;
}
- // numlock disabled. fallthrough to key_left
+
+ _remove_text(line, column, cursor.line, cursor.column);
+
+ cursor_set_line(line);
+ cursor_set_column(column);
+
+ } else {
+ backspace_at_cursor();
}
- case KEY_LEFT: {
- if (k.mod.shift)
- _pre_shift_selection();
+ } break;
+ case KEY_KP_4: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
+ }
+ // numlock disabled. fallthrough to key_left
+ }
+ case KEY_LEFT: {
+
+ if (k->get_shift())
+ _pre_shift_selection();
#ifdef APPLE_STYLE_KEYS
- else
+ else
#else
- else if (!k.mod.alt)
+ else if (!k->get_alt())
#endif
- deselect();
+ deselect();
#ifdef APPLE_STYLE_KEYS
- if (k.mod.command) {
- cursor_set_column(0);
- } else if (k.mod.alt) {
+ if (k->get_command()) {
+ cursor_set_column(0);
+ } else if (k->get_alt()) {
#else
- if (k.mod.alt) {
- scancode_handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ scancode_handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- bool prev_char = false;
- int cc = cursor.column;
- while (cc > 0) {
+ bool prev_char = false;
+ int cc = cursor.column;
+ while (cc > 0) {
- bool ischar = _is_text_char(text[cursor.line][cc - 1]);
+ bool ischar = _is_text_char(text[cursor.line][cc - 1]);
- if (prev_char && !ischar)
- break;
+ if (prev_char && !ischar)
+ break;
- prev_char = ischar;
- cc--;
- }
+ prev_char = ischar;
+ cc--;
+ }
- cursor_set_column(cc);
+ cursor_set_column(cc);
- } else if (cursor.column == 0) {
+ } else if (cursor.column == 0) {
- if (cursor.line > 0) {
- cursor_set_line(cursor.line - 1);
- cursor_set_column(text[cursor.line].length());
- }
- } else {
- cursor_set_column(cursor_get_column() - 1);
+ if (cursor.line > 0) {
+ cursor_set_line(cursor.line - 1);
+ cursor_set_column(text[cursor.line].length());
}
+ } else {
+ cursor_set_column(cursor_get_column() - 1);
+ }
- if (k.mod.shift)
- _post_shift_selection();
+ if (k->get_shift())
+ _post_shift_selection();
- } break;
- case KEY_KP_6: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_right
+ } break;
+ case KEY_KP_6: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
- case KEY_RIGHT: {
+ // numlock disabled. fallthrough to key_right
+ }
+ case KEY_RIGHT: {
- if (k.mod.shift)
- _pre_shift_selection();
+ if (k->get_shift())
+ _pre_shift_selection();
#ifdef APPLE_STYLE_KEYS
- else
+ else
#else
- else if (!k.mod.alt)
+ else if (!k->get_alt())
#endif
- deselect();
+ deselect();
#ifdef APPLE_STYLE_KEYS
- if (k.mod.command) {
- cursor_set_column(text[cursor.line].length());
- } else if (k.mod.alt) {
+ if (k->get_command()) {
+ cursor_set_column(text[cursor.line].length());
+ } else if (k->get_alt()) {
#else
- if (k.mod.alt) {
- scancode_handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ scancode_handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- bool prev_char = false;
- int cc = cursor.column;
- while (cc < text[cursor.line].length()) {
+ bool prev_char = false;
+ int cc = cursor.column;
+ while (cc < text[cursor.line].length()) {
- bool ischar = _is_text_char(text[cursor.line][cc]);
+ bool ischar = _is_text_char(text[cursor.line][cc]);
- if (prev_char && !ischar)
- break;
- prev_char = ischar;
- cc++;
- }
+ if (prev_char && !ischar)
+ break;
+ prev_char = ischar;
+ cc++;
+ }
- cursor_set_column(cc);
+ cursor_set_column(cc);
- } else if (cursor.column == text[cursor.line].length()) {
+ } else if (cursor.column == text[cursor.line].length()) {
- if (cursor.line < text.size() - 1) {
- cursor_set_line(cursor.line + 1);
- cursor_set_column(0);
- }
- } else {
- cursor_set_column(cursor_get_column() + 1);
+ if (cursor.line < text.size() - 1) {
+ cursor_set_line(cursor.line + 1);
+ cursor_set_column(0);
}
+ } else {
+ cursor_set_column(cursor_get_column() + 1);
+ }
- if (k.mod.shift)
- _post_shift_selection();
+ if (k->get_shift())
+ _post_shift_selection();
- } break;
- case KEY_KP_8: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_up
+ } break;
+ case KEY_KP_8: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
- case KEY_UP: {
+ // numlock disabled. fallthrough to key_up
+ }
+ case KEY_UP: {
- if (k.mod.shift)
- _pre_shift_selection();
- if (k.mod.alt) {
- scancode_handled = false;
- break;
- }
+ if (k->get_shift())
+ _pre_shift_selection();
+ if (k->get_alt()) {
+ scancode_handled = false;
+ break;
+ }
#ifndef APPLE_STYLE_KEYS
- if (k.mod.command) {
- _scroll_lines_up();
- break;
- }
+ if (k->get_command()) {
+ _scroll_lines_up();
+ break;
+ }
#else
- if (k.mod.command && k.mod.alt) {
- _scroll_lines_up();
- break;
- }
+ if (k->get_command() && k->get_alt()) {
+ _scroll_lines_up();
+ break;
+ }
- if (k.mod.command)
- cursor_set_line(0);
- else
+ if (k->get_command())
+ cursor_set_line(0);
+ else
#endif
- cursor_set_line(cursor_get_line() - 1);
+ cursor_set_line(cursor_get_line() - 1);
- if (k.mod.shift)
- _post_shift_selection();
- _cancel_code_hint();
+ if (k->get_shift())
+ _post_shift_selection();
+ _cancel_code_hint();
- } break;
- case KEY_KP_2: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_down
+ } break;
+ case KEY_KP_2: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
- case KEY_DOWN: {
+ // numlock disabled. fallthrough to key_down
+ }
+ case KEY_DOWN: {
- if (k.mod.shift)
- _pre_shift_selection();
- if (k.mod.alt) {
- scancode_handled = false;
- break;
- }
+ if (k->get_shift())
+ _pre_shift_selection();
+ if (k->get_alt()) {
+ scancode_handled = false;
+ break;
+ }
#ifndef APPLE_STYLE_KEYS
- if (k.mod.command) {
- _scroll_lines_down();
- break;
- }
+ if (k->get_command()) {
+ _scroll_lines_down();
+ break;
+ }
#else
- if (k.mod.command && k.mod.alt) {
- _scroll_lines_down();
- break;
- }
+ if (k->get_command() && k->get_alt()) {
+ _scroll_lines_down();
+ break;
+ }
- if (k.mod.command)
- cursor_set_line(text.size() - 1);
- else
+ if (k->get_command())
+ cursor_set_line(text.size() - 1);
+ else
#endif
- cursor_set_line(cursor_get_line() + 1);
+ cursor_set_line(cursor_get_line() + 1);
- if (k.mod.shift)
- _post_shift_selection();
- _cancel_code_hint();
+ if (k->get_shift())
+ _post_shift_selection();
+ _cancel_code_hint();
- } break;
+ } break;
- case KEY_DELETE: {
+ case KEY_DELETE: {
- if (readonly)
- break;
+ if (readonly)
+ break;
- if (k.mod.shift && !k.mod.command && !k.mod.alt) {
- cut();
- break;
- }
+ if (k->get_shift() && !k->get_command() && !k->get_alt()) {
+ cut();
+ break;
+ }
- int curline_len = text[cursor.line].length();
+ int curline_len = text[cursor.line].length();
- if (cursor.line == text.size() - 1 && cursor.column == curline_len)
- break; //nothing to do
+ if (cursor.line == text.size() - 1 && cursor.column == curline_len)
+ break; //nothing to do
- int next_line = cursor.column < curline_len ? cursor.line : cursor.line + 1;
- int next_column;
+ int next_line = cursor.column < curline_len ? cursor.line : cursor.line + 1;
+ int next_column;
#ifdef APPLE_STYLE_KEYS
- if (k.mod.alt) {
+ if (k->get_alt()) {
#else
- if (k.mod.alt) {
- scancode_handled = false;
- break;
- } else if (k.mod.command) {
+ if (k->get_alt()) {
+ scancode_handled = false;
+ break;
+ } else if (k->get_command()) {
#endif
- int last_line = text.size() - 1;
+ int last_line = text.size() - 1;
- int line = cursor.line;
- int column = cursor.column;
+ int line = cursor.line;
+ int column = cursor.column;
- bool prev_char = false;
- bool only_whitespace = true;
+ bool prev_char = false;
+ bool only_whitespace = true;
- while (only_whitespace && line < last_line) {
+ while (only_whitespace && line < last_line) {
- while (column < text[line].length()) {
- CharType c = text[line][column];
-
- if (c != '\t' && c != ' ') {
- only_whitespace = false;
- break;
- }
+ while (column < text[line].length()) {
+ CharType c = text[line][column];
- column++;
+ if (c != '\t' && c != ' ') {
+ only_whitespace = false;
+ break;
}
- if (only_whitespace) {
- line++;
- column = 0;
- }
+ column++;
}
- while (column < text[line].length()) {
+ if (only_whitespace) {
+ line++;
+ column = 0;
+ }
+ }
- bool ischar = _is_text_char(text[line][column]);
+ while (column < text[line].length()) {
- if (prev_char && !ischar)
- break;
- prev_char = ischar;
- column++;
- }
+ bool ischar = _is_text_char(text[line][column]);
- next_line = line;
- next_column = column;
- } else {
- next_column = cursor.column < curline_len ? (cursor.column + 1) : 0;
+ if (prev_char && !ischar)
+ break;
+ prev_char = ischar;
+ column++;
}
- _remove_text(cursor.line, cursor.column, next_line, next_column);
- update();
+ next_line = line;
+ next_column = column;
+ } else {
+ next_column = cursor.column < curline_len ? (cursor.column + 1) : 0;
+ }
- } break;
- case KEY_KP_7: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_home
+ _remove_text(cursor.line, cursor.column, next_line, next_column);
+ update();
+
+ } break;
+ case KEY_KP_7: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
+ // numlock disabled. fallthrough to key_home
+ }
#ifdef APPLE_STYLE_KEYS
- case KEY_HOME: {
+ case KEY_HOME: {
- if (k.mod.shift)
- _pre_shift_selection();
+ if (k->get_shift())
+ _pre_shift_selection();
- cursor_set_line(0);
+ cursor_set_line(0);
- if (k.mod.shift)
- _post_shift_selection();
- else if (k.mod.command || k.mod.control)
- deselect();
+ if (k->get_shift())
+ _post_shift_selection();
+ else if (k->get_command() || k->get_control())
+ deselect();
- } break;
+ } break;
#else
- case KEY_HOME: {
+ case KEY_HOME: {
- if (k.mod.shift)
- _pre_shift_selection();
-
- if (k.mod.command) {
- cursor_set_line(0);
- cursor_set_column(0);
- } else {
- // compute whitespace symbols seq length
- int current_line_whitespace_len = 0;
- while (current_line_whitespace_len < text[cursor.line].length()) {
- CharType c = text[cursor.line][current_line_whitespace_len];
- if (c != '\t' && c != ' ')
- break;
- current_line_whitespace_len++;
- }
+ if (k->get_shift())
+ _pre_shift_selection();
- if (cursor_get_column() == current_line_whitespace_len)
- cursor_set_column(0);
- else
- cursor_set_column(current_line_whitespace_len);
+ if (k->get_command()) {
+ cursor_set_line(0);
+ cursor_set_column(0);
+ } else {
+ // compute whitespace symbols seq length
+ int current_line_whitespace_len = 0;
+ while (current_line_whitespace_len < text[cursor.line].length()) {
+ CharType c = text[cursor.line][current_line_whitespace_len];
+ if (c != '\t' && c != ' ')
+ break;
+ current_line_whitespace_len++;
}
- if (k.mod.shift)
- _post_shift_selection();
- else if (k.mod.command || k.mod.control)
- deselect();
- _cancel_completion();
- completion_hint = "";
+ if (cursor_get_column() == current_line_whitespace_len)
+ cursor_set_column(0);
+ else
+ cursor_set_column(current_line_whitespace_len);
+ }
- } break;
+ if (k->get_shift())
+ _post_shift_selection();
+ else if (k->get_command() || k->get_control())
+ deselect();
+ _cancel_completion();
+ completion_hint = "";
+
+ } break;
#endif
- case KEY_KP_1: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_end
+ case KEY_KP_1: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
+ // numlock disabled. fallthrough to key_end
+ }
#ifdef APPLE_STYLE_KEYS
- case KEY_END: {
+ case KEY_END: {
- if (k.mod.shift)
- _pre_shift_selection();
+ if (k->get_shift())
+ _pre_shift_selection();
- cursor_set_line(text.size() - 1);
+ cursor_set_line(text.size() - 1);
- if (k.mod.shift)
- _post_shift_selection();
- else if (k.mod.command || k.mod.control)
- deselect();
+ if (k->get_shift())
+ _post_shift_selection();
+ else if (k->get_command() || k->get_control())
+ deselect();
- } break;
+ } break;
#else
- case KEY_END: {
+ case KEY_END: {
- if (k.mod.shift)
- _pre_shift_selection();
+ if (k->get_shift())
+ _pre_shift_selection();
- if (k.mod.command)
- cursor_set_line(text.size() - 1);
- cursor_set_column(text[cursor.line].length());
+ if (k->get_command())
+ cursor_set_line(text.size() - 1);
+ cursor_set_column(text[cursor.line].length());
- if (k.mod.shift)
- _post_shift_selection();
- else if (k.mod.command || k.mod.control)
- deselect();
+ if (k->get_shift())
+ _post_shift_selection();
+ else if (k->get_command() || k->get_control())
+ deselect();
- _cancel_completion();
- completion_hint = "";
+ _cancel_completion();
+ completion_hint = "";
- } break;
+ } break;
#endif
- case KEY_KP_9: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_pageup
+ case KEY_KP_9: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
- case KEY_PAGEUP: {
+ // numlock disabled. fallthrough to key_pageup
+ }
+ case KEY_PAGEUP: {
- if (k.mod.shift)
- _pre_shift_selection();
+ if (k->get_shift())
+ _pre_shift_selection();
- cursor_set_line(cursor_get_line() - get_visible_rows());
+ cursor_set_line(cursor_get_line() - get_visible_rows());
- if (k.mod.shift)
- _post_shift_selection();
+ if (k->get_shift())
+ _post_shift_selection();
- _cancel_completion();
- completion_hint = "";
+ _cancel_completion();
+ completion_hint = "";
- } break;
- case KEY_KP_3: {
- if (k.unicode != 0) {
- scancode_handled = false;
- break;
- }
- // numlock disabled. fallthrough to key_pageup
+ } break;
+ case KEY_KP_3: {
+ if (k->get_unicode() != 0) {
+ scancode_handled = false;
+ break;
}
- case KEY_PAGEDOWN: {
+ // numlock disabled. fallthrough to key_pageup
+ }
+ case KEY_PAGEDOWN: {
- if (k.mod.shift)
- _pre_shift_selection();
+ if (k->get_shift())
+ _pre_shift_selection();
- cursor_set_line(cursor_get_line() + get_visible_rows());
+ cursor_set_line(cursor_get_line() + get_visible_rows());
- if (k.mod.shift)
- _post_shift_selection();
+ if (k->get_shift())
+ _post_shift_selection();
- _cancel_completion();
- completion_hint = "";
+ _cancel_completion();
+ completion_hint = "";
- } break;
- case KEY_A: {
+ } break;
+ case KEY_A: {
- if (!k.mod.command || k.mod.shift || k.mod.alt) {
- scancode_handled = false;
- break;
- }
+ if (!k->get_command() || k->get_shift() || k->get_alt()) {
+ scancode_handled = false;
+ break;
+ }
- select_all();
+ select_all();
- } break;
- case KEY_X: {
- if (readonly) {
- break;
- }
- if (!k.mod.command || k.mod.shift || k.mod.alt) {
- scancode_handled = false;
- break;
- }
+ } break;
+ case KEY_X: {
+ if (readonly) {
+ break;
+ }
+ if (!k->get_command() || k->get_shift() || k->get_alt()) {
+ scancode_handled = false;
+ break;
+ }
- cut();
+ cut();
- } break;
- case KEY_C: {
+ } break;
+ case KEY_C: {
- if (!k.mod.command || k.mod.shift || k.mod.alt) {
- scancode_handled = false;
- break;
- }
+ if (!k->get_command() || k->get_shift() || k->get_alt()) {
+ scancode_handled = false;
+ break;
+ }
- copy();
+ copy();
- } break;
- case KEY_Z: {
+ } break;
+ case KEY_Z: {
- if (!k.mod.command) {
- scancode_handled = false;
- break;
- }
+ if (!k->get_command()) {
+ scancode_handled = false;
+ break;
+ }
- if (k.mod.shift)
- redo();
- else
- undo();
- } break;
- case KEY_V: {
- if (readonly) {
- break;
- }
- if (!k.mod.command || k.mod.shift || k.mod.alt) {
- scancode_handled = false;
- break;
- }
+ if (k->get_shift())
+ redo();
+ else
+ undo();
+ } break;
+ case KEY_V: {
+ if (readonly) {
+ break;
+ }
+ if (!k->get_command() || k->get_shift() || k->get_alt()) {
+ scancode_handled = false;
+ break;
+ }
- paste();
+ paste();
- } break;
- case KEY_SPACE: {
+ } break;
+ case KEY_SPACE: {
#ifdef OSX_ENABLED
- if (completion_enabled && k.mod.meta) { //cmd-space is spotlight shortcut in OSX
+ if (completion_enabled && k->get_metakey()) { //cmd-space is spotlight shortcut in OSX
#else
- if (completion_enabled && k.mod.command) {
+ if (completion_enabled && k->get_command()) {
#endif
- query_code_comple();
- scancode_handled = true;
- } else {
- scancode_handled = false;
- }
+ query_code_comple();
+ scancode_handled = true;
+ } else {
+ scancode_handled = false;
+ }
- } break;
+ } break;
- case KEY_U: {
- if (!k.mod.command || k.mod.shift) {
- scancode_handled = false;
- break;
- } else {
- if (selection.active) {
- int ini = selection.from_line;
- int end = selection.to_line;
- for (int i = ini; i <= end; i++) {
- if (text[i][0] == '#')
- _remove_text(i, 0, i, 1);
- }
- } else {
- if (text[cursor.line][0] == '#')
- _remove_text(cursor.line, 0, cursor.line, 1);
+ case KEY_U: {
+ if (!k->get_command() || k->get_shift()) {
+ scancode_handled = false;
+ break;
+ } else {
+ if (selection.active) {
+ int ini = selection.from_line;
+ int end = selection.to_line;
+ for (int i = ini; i <= end; i++) {
+ if (text[i][0] == '#')
+ _remove_text(i, 0, i, 1);
}
- update();
+ } else {
+ if (text[cursor.line][0] == '#')
+ _remove_text(cursor.line, 0, cursor.line, 1);
}
- } break;
+ update();
+ }
+ } break;
- default: {
+ default: {
- scancode_handled = false;
- } break;
- }
+ scancode_handled = false;
+ } break;
+ }
- if (scancode_handled)
- accept_event();
- /*
- if (!scancode_handled && !k.mod.command && !k.mod.alt) {
+ if (scancode_handled)
+ accept_event();
+ /*
+ if (!scancode_handled && !k->get_command() && !k->get_alt()) {
- if (k.unicode>=32) {
+ if (k->get_unicode()>=32) {
- if (readonly)
- break;
+ if (readonly)
+ break;
- accept_event();
- } else {
+ accept_event();
+ } else {
- break;
- }
- }
+ break;
+ }
+ }
*/
- if (k.scancode == KEY_INSERT) {
- set_insert_mode(!insert_mode);
- accept_event();
- return;
- }
-
- if (!scancode_handled && !k.mod.command) { //for german kbds
+ if (k->get_scancode() == KEY_INSERT) {
+ set_insert_mode(!insert_mode);
+ accept_event();
+ return;
+ }
- if (k.unicode >= 32) {
+ if (!scancode_handled && !k->get_command()) { //for german kbds
- if (readonly)
- break;
+ if (k->get_unicode() >= 32) {
- // remove the old character if in insert mode and no selection
- if (insert_mode && !had_selection) {
- begin_complex_operation();
-
- // make sure we don't try and remove empty space
- if (cursor.column < get_line(cursor.line).length()) {
- _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
- }
- }
+ if (readonly)
+ return;
- const CharType chr[2] = { (CharType)k.unicode, 0 };
+ // remove the old character if in insert mode and no selection
+ if (insert_mode && !had_selection) {
+ begin_complex_operation();
- if (completion_hint != "" && k.unicode == ')') {
- completion_hint = "";
- }
- if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
- _consume_pair_symbol(chr[0]);
- } else {
- _insert_text_at_cursor(chr);
+ // make sure we don't try and remove empty space
+ if (cursor.column < get_line(cursor.line).length()) {
+ _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
}
+ }
- if (insert_mode && !had_selection) {
- end_complex_operation();
- }
+ const CharType chr[2] = { (CharType)k->get_unicode(), 0 };
- if (selection.active != had_selection) {
- end_complex_operation();
- }
- accept_event();
+ if (completion_hint != "" && k->get_unicode() == ')') {
+ completion_hint = "";
+ }
+ if (auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
+ _consume_pair_symbol(chr[0]);
} else {
+ _insert_text_at_cursor(chr);
+ }
- break;
+ if (insert_mode && !had_selection) {
+ end_complex_operation();
+ }
+
+ if (selection.active != had_selection) {
+ end_complex_operation();
}
+ accept_event();
+ } else {
}
+ }
- return;
- } break;
+ return;
}
}
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 905ea46bd7..f8f60d2b03 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -337,7 +337,7 @@ protected:
void _insert_text(int p_line, int p_column, const String &p_text, int *r_end_line = NULL, int *r_end_char = NULL);
void _remove_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column);
void _insert_text_at_cursor(const String &p_text);
- void _gui_input(const InputEvent &p_input);
+ void _gui_input(const Ref<InputEvent> &p_input);
void _notification(int p_what);
void _consume_pair_symbol(CharType ch);
diff --git a/scene/gui/tool_button.cpp b/scene/gui/tool_button.cpp
index 7e8a426d15..5fc4b6ecf8 100644
--- a/scene/gui/tool_button.cpp
+++ b/scene/gui/tool_button.cpp
@@ -29,10 +29,6 @@
/*************************************************************************/
#include "tool_button.h"
-void ToolButton::_notification(int p_what) {
- // set_self_modulate(get_color("pressed"));
-}
-
ToolButton::ToolButton() {
set_flat(true);
}
diff --git a/scene/gui/tool_button.h b/scene/gui/tool_button.h
index 58948f798f..d243b5559f 100644
--- a/scene/gui/tool_button.h
+++ b/scene/gui/tool_button.h
@@ -37,9 +37,6 @@ class ToolButton : public Button {
public:
ToolButton();
-
-protected:
- void _notification(int p_what);
};
#endif // TOOL_BUTTON_H
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 67c97c2e52..b17192fe4f 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1410,10 +1410,12 @@ void Tree::_range_click_timeout() {
}
click_handled = false;
- InputModifierState mod = InputModifierState(); // should be irrelevant..
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
+ ;
blocked++;
- propagate_mouse_event(pos + cache.offset, 0, 0, false, root, BUTTON_LEFT, mod);
+ propagate_mouse_event(pos + cache.offset, 0, 0, false, root, BUTTON_LEFT, mb);
blocked--;
if (range_click_timer->is_one_shot()) {
@@ -1430,7 +1432,7 @@ void Tree::_range_click_timeout() {
}
}
-int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool p_doubleclick, TreeItem *p_item, int p_button, const InputModifierState &p_mod) {
+int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool p_doubleclick, TreeItem *p_item, int p_button, const Ref<InputEventWithModifiers> &p_mod) {
int item_h = compute_item_height(p_item) + cache.vseparation;
@@ -1522,7 +1524,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
return -1;
}
- if (select_mode == SELECT_MULTI && p_mod.command && c.selectable) {
+ if (select_mode == SELECT_MULTI && p_mod->get_command() && c.selectable) {
if (!c.selected || p_button == BUTTON_RIGHT) {
@@ -1544,7 +1546,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool
if (c.selectable) {
- if (select_mode == SELECT_MULTI && p_mod.shift && selected_item && selected_item != p_item) {
+ if (select_mode == SELECT_MULTI && p_mod->get_shift() && selected_item && selected_item != p_item) {
bool inrange = false;
@@ -1839,517 +1841,534 @@ void Tree::popup_select(int p_option) {
item_edited(popup_edited_item_col, popup_edited_item);
}
-void Tree::_gui_input(InputEvent p_event) {
+void Tree::_gui_input(Ref<InputEvent> p_event) {
- switch (p_event.type) {
+ Ref<InputEventKey> k = p_event;
- case InputEvent::KEY: {
+ if (k.is_valid()) {
- if (!p_event.key.pressed)
- break;
- if (p_event.key.mod.alt || p_event.key.mod.command || (p_event.key.mod.shift && p_event.key.unicode == 0) || p_event.key.mod.meta)
- break;
- if (!root)
- return;
+ if (!k->is_pressed())
+ return;
+ if (k->get_alt() || k->get_command() || (k->get_shift() && k->get_unicode() == 0) || k->get_metakey())
+ return;
+ if (!root)
+ return;
- if (hide_root && !root->get_next_visible())
- return;
+ if (hide_root && !root->get_next_visible())
+ return;
- switch (p_event.key.scancode) {
+ switch (k->get_scancode()) {
#define EXIT_BREAK \
{ \
if (!cursor_can_exit_tree) accept_event(); \
break; \
}
- case KEY_RIGHT: {
-
- //TreeItem *next = NULL;
- if (!selected_item)
- break;
- if (select_mode == SELECT_ROW)
- EXIT_BREAK;
- if (selected_col >= (columns.size() - 1))
- EXIT_BREAK;
- if (select_mode == SELECT_MULTI) {
- selected_col++;
- emit_signal("cell_selected");
- } else {
-
- selected_item->select(selected_col + 1);
- }
+ case KEY_RIGHT: {
+
+ //TreeItem *next = NULL;
+ if (!selected_item)
+ break;
+ if (select_mode == SELECT_ROW)
+ EXIT_BREAK;
+ if (selected_col >= (columns.size() - 1))
+ EXIT_BREAK;
+ if (select_mode == SELECT_MULTI) {
+ selected_col++;
+ emit_signal("cell_selected");
+ } else {
- update();
- ensure_cursor_is_visible();
- accept_event();
+ selected_item->select(selected_col + 1);
+ }
- } break;
- case KEY_LEFT: {
+ update();
+ ensure_cursor_is_visible();
+ accept_event();
- //TreeItem *next = NULL;
- if (!selected_item)
- break;
- if (select_mode == SELECT_ROW)
- EXIT_BREAK;
- if (selected_col <= 0)
- EXIT_BREAK;
- if (select_mode == SELECT_MULTI) {
- selected_col--;
- emit_signal("cell_selected");
- } else {
+ } break;
+ case KEY_LEFT: {
+
+ //TreeItem *next = NULL;
+ if (!selected_item)
+ break;
+ if (select_mode == SELECT_ROW)
+ EXIT_BREAK;
+ if (selected_col <= 0)
+ EXIT_BREAK;
+ if (select_mode == SELECT_MULTI) {
+ selected_col--;
+ emit_signal("cell_selected");
+ } else {
- selected_item->select(selected_col - 1);
- }
+ selected_item->select(selected_col - 1);
+ }
- update();
- accept_event();
+ update();
+ accept_event();
- } break;
- case KEY_DOWN: {
+ } break;
+ case KEY_DOWN: {
- TreeItem *next = NULL;
- if (!selected_item) {
+ TreeItem *next = NULL;
+ if (!selected_item) {
- next = hide_root ? root->get_next_visible() : root;
- selected_item = 0;
- } else {
+ next = hide_root ? root->get_next_visible() : root;
+ selected_item = 0;
+ } else {
- next = selected_item->get_next_visible();
+ next = selected_item->get_next_visible();
- //if (diff < uint64_t(GLOBAL_DEF("gui/incr_search_max_interval_msec",2000))) {
- if (last_keypress != 0) {
- //incr search next
- int col;
- next = _search_item_text(next, incr_search, &col, true);
- if (!next) {
- accept_event();
- return;
- }
+ //if (diff < uint64_t(GLOBAL_DEF("gui/incr_search_max_interval_msec",2000))) {
+ if (last_keypress != 0) {
+ //incr search next
+ int col;
+ next = _search_item_text(next, incr_search, &col, true);
+ if (!next) {
+ accept_event();
+ return;
}
}
+ }
- if (select_mode == SELECT_MULTI) {
+ if (select_mode == SELECT_MULTI) {
- if (!next)
- EXIT_BREAK;
+ if (!next)
+ EXIT_BREAK;
- selected_item = next;
- emit_signal("cell_selected");
- update();
- } else {
+ selected_item = next;
+ emit_signal("cell_selected");
+ update();
+ } else {
- int col = selected_col < 0 ? 0 : selected_col;
+ int col = selected_col < 0 ? 0 : selected_col;
- while (next && !next->cells[col].selectable)
- next = next->get_next_visible();
- if (!next)
- EXIT_BREAK; // do nothing..
- next->select(col);
- }
+ while (next && !next->cells[col].selectable)
+ next = next->get_next_visible();
+ if (!next)
+ EXIT_BREAK; // do nothing..
+ next->select(col);
+ }
- ensure_cursor_is_visible();
- accept_event();
+ ensure_cursor_is_visible();
+ accept_event();
- } break;
- case KEY_UP: {
+ } break;
+ case KEY_UP: {
- TreeItem *prev = NULL;
- if (!selected_item) {
- prev = get_last_item();
- selected_col = 0;
- } else {
+ TreeItem *prev = NULL;
+ if (!selected_item) {
+ prev = get_last_item();
+ selected_col = 0;
+ } else {
- prev = selected_item->get_prev_visible();
- if (last_keypress != 0) {
- //incr search next
- int col;
- prev = _search_item_text(prev, incr_search, &col, true, true);
- if (!prev) {
- accept_event();
- return;
- }
+ prev = selected_item->get_prev_visible();
+ if (last_keypress != 0) {
+ //incr search next
+ int col;
+ prev = _search_item_text(prev, incr_search, &col, true, true);
+ if (!prev) {
+ accept_event();
+ return;
}
}
+ }
- if (select_mode == SELECT_MULTI) {
+ if (select_mode == SELECT_MULTI) {
- if (!prev)
- break;
- selected_item = prev;
- emit_signal("cell_selected");
- update();
- } else {
+ if (!prev)
+ break;
+ selected_item = prev;
+ emit_signal("cell_selected");
+ update();
+ } else {
- int col = selected_col < 0 ? 0 : selected_col;
- while (prev && !prev->cells[col].selectable)
- prev = prev->get_prev_visible();
- if (!prev)
- break; // do nothing..
- prev->select(col);
- }
+ int col = selected_col < 0 ? 0 : selected_col;
+ while (prev && !prev->cells[col].selectable)
+ prev = prev->get_prev_visible();
+ if (!prev)
+ break; // do nothing..
+ prev->select(col);
+ }
- ensure_cursor_is_visible();
- accept_event();
+ ensure_cursor_is_visible();
+ accept_event();
- } break;
- case KEY_PAGEDOWN: {
+ } break;
+ case KEY_PAGEDOWN: {
- TreeItem *next = NULL;
- if (!selected_item)
- break;
- next = selected_item;
+ TreeItem *next = NULL;
+ if (!selected_item)
+ break;
+ next = selected_item;
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; i++) {
- TreeItem *_n = next->get_next_visible();
- if (_n) {
- next = _n;
- } else {
+ TreeItem *_n = next->get_next_visible();
+ if (_n) {
+ next = _n;
+ } else {
- break;
- }
- }
- if (next == selected_item)
break;
+ }
+ }
+ if (next == selected_item)
+ break;
- if (select_mode == SELECT_MULTI) {
+ if (select_mode == SELECT_MULTI) {
- selected_item = next;
- emit_signal("cell_selected");
- update();
- } else {
+ selected_item = next;
+ emit_signal("cell_selected");
+ update();
+ } else {
- while (next && !next->cells[selected_col].selectable)
- next = next->get_next_visible();
- if (!next)
- EXIT_BREAK; // do nothing..
- next->select(selected_col);
- }
+ while (next && !next->cells[selected_col].selectable)
+ next = next->get_next_visible();
+ if (!next)
+ EXIT_BREAK; // do nothing..
+ next->select(selected_col);
+ }
- ensure_cursor_is_visible();
- } break;
- case KEY_PAGEUP: {
+ ensure_cursor_is_visible();
+ } break;
+ case KEY_PAGEUP: {
- TreeItem *prev = NULL;
- if (!selected_item)
- break;
- prev = selected_item;
+ TreeItem *prev = NULL;
+ if (!selected_item)
+ break;
+ prev = selected_item;
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; i++) {
- TreeItem *_n = prev->get_prev_visible();
- if (_n) {
- prev = _n;
- } else {
+ TreeItem *_n = prev->get_prev_visible();
+ if (_n) {
+ prev = _n;
+ } else {
- break;
- }
- }
- if (prev == selected_item)
break;
+ }
+ }
+ if (prev == selected_item)
+ break;
- if (select_mode == SELECT_MULTI) {
+ if (select_mode == SELECT_MULTI) {
- selected_item = prev;
- emit_signal("cell_selected");
- update();
- } else {
+ selected_item = prev;
+ emit_signal("cell_selected");
+ update();
+ } else {
- while (prev && !prev->cells[selected_col].selectable)
- prev = prev->get_prev_visible();
- if (!prev)
- EXIT_BREAK; // do nothing..
- prev->select(selected_col);
- }
+ while (prev && !prev->cells[selected_col].selectable)
+ prev = prev->get_prev_visible();
+ if (!prev)
+ EXIT_BREAK; // do nothing..
+ prev->select(selected_col);
+ }
- ensure_cursor_is_visible();
+ ensure_cursor_is_visible();
- } break;
- case KEY_F2:
- case KEY_RETURN:
- case KEY_ENTER: {
-
- if (selected_item) {
- //bring up editor if possible
- if (!edit_selected()) {
- emit_signal("item_activated");
- incr_search.clear();
- }
+ } break;
+ case KEY_F2:
+ case KEY_RETURN:
+ case KEY_ENTER: {
+
+ if (selected_item) {
+ //bring up editor if possible
+ if (!edit_selected()) {
+ emit_signal("item_activated");
+ incr_search.clear();
}
- accept_event();
+ }
+ accept_event();
- } break;
- case KEY_SPACE: {
- if (select_mode == SELECT_MULTI) {
- if (!selected_item)
- break;
- if (selected_item->is_selected(selected_col)) {
- selected_item->deselect(selected_col);
- emit_signal("multi_selected", selected_item, selected_col, false);
- } else if (selected_item->is_selectable(selected_col)) {
- selected_item->select(selected_col);
- emit_signal("multi_selected", selected_item, selected_col, true);
- }
+ } break;
+ case KEY_SPACE: {
+ if (select_mode == SELECT_MULTI) {
+ if (!selected_item)
+ break;
+ if (selected_item->is_selected(selected_col)) {
+ selected_item->deselect(selected_col);
+ emit_signal("multi_selected", selected_item, selected_col, false);
+ } else if (selected_item->is_selectable(selected_col)) {
+ selected_item->select(selected_col);
+ emit_signal("multi_selected", selected_item, selected_col, true);
}
- accept_event();
+ }
+ accept_event();
- } break;
- default: {
+ } break;
+ default: {
- if (p_event.key.unicode > 0) {
+ if (k->get_unicode() > 0) {
- _do_incr_search(String::chr(p_event.key.unicode));
- accept_event();
+ _do_incr_search(String::chr(k->get_unicode()));
+ accept_event();
- return;
- } else {
- if (p_event.key.scancode != KEY_SHIFT)
- last_keypress = 0;
- }
- } break;
+ return;
+ } else {
+ if (k->get_scancode() != KEY_SHIFT)
+ last_keypress = 0;
+ }
+ } break;
- last_keypress = 0;
- }
+ last_keypress = 0;
+ }
+ }
- } break;
+ Ref<InputEventMouseMotion> mm = p_event;
- case InputEvent::MOUSE_MOTION: {
+ if (mm.is_valid()) {
- if (cache.font.is_null()) // avoid a strange case that may fuckup stuff
- update_cache();
- const InputEventMouseMotion &b = p_event.mouse_motion;
+ if (cache.font.is_null()) // avoid a strange case that may fuckup stuff
+ update_cache();
- Ref<StyleBox> bg = cache.bg;
+ Ref<StyleBox> bg = cache.bg;
- Point2 pos = Point2(b.x, b.y) - bg->get_offset();
+ Point2 pos = mm->get_pos() - bg->get_offset();
- Cache::ClickType old_hover = cache.hover_type;
- int old_index = cache.hover_index;
+ Cache::ClickType old_hover = cache.hover_type;
+ int old_index = cache.hover_index;
- cache.hover_type = Cache::CLICK_NONE;
- cache.hover_index = 0;
- if (show_column_titles) {
- pos.y -= _get_title_button_height();
- if (pos.y < 0) {
- pos.x += cache.offset.x;
- int len = 0;
- for (int i = 0; i < columns.size(); i++) {
-
- len += get_column_width(i);
- if (pos.x < len) {
-
- cache.hover_type = Cache::CLICK_TITLE;
- cache.hover_index = i;
- update();
- break;
- }
+ cache.hover_type = Cache::CLICK_NONE;
+ cache.hover_index = 0;
+ if (show_column_titles) {
+ pos.y -= _get_title_button_height();
+ if (pos.y < 0) {
+ pos.x += cache.offset.x;
+ int len = 0;
+ for (int i = 0; i < columns.size(); i++) {
+
+ len += get_column_width(i);
+ if (pos.x < len) {
+
+ cache.hover_type = Cache::CLICK_TITLE;
+ cache.hover_index = i;
+ update();
+ break;
}
}
}
+ }
- if (drop_mode_flags && root) {
+ if (drop_mode_flags && root) {
- Point2 mpos = Point2(b.x, b.y);
- mpos -= cache.bg->get_offset();
- mpos.y -= _get_title_button_height();
- if (mpos.y >= 0) {
+ Point2 mpos = mm->get_pos();
+ mpos -= cache.bg->get_offset();
+ mpos.y -= _get_title_button_height();
+ if (mpos.y >= 0) {
- if (h_scroll->is_visible_in_tree())
- mpos.x += h_scroll->get_value();
- if (v_scroll->is_visible_in_tree())
- mpos.y += v_scroll->get_value();
+ if (h_scroll->is_visible_in_tree())
+ mpos.x += h_scroll->get_value();
+ if (v_scroll->is_visible_in_tree())
+ mpos.y += v_scroll->get_value();
- int col, h, section;
- TreeItem *it = _find_item_at_pos(root, mpos, col, h, section);
+ int col, h, section;
+ TreeItem *it = _find_item_at_pos(root, mpos, col, h, section);
- if (it != drop_mode_over || section != drop_mode_section) {
- drop_mode_over = it;
- drop_mode_section = section;
- update();
- }
+ if (it != drop_mode_over || section != drop_mode_section) {
+ drop_mode_over = it;
+ drop_mode_section = section;
+ update();
}
}
+ }
- if (cache.hover_type != old_hover || cache.hover_index != old_index) {
- update();
- }
-
- if (pressing_for_editor && popup_edited_item && (popup_edited_item->get_cell_mode(popup_edited_item_col) == TreeItem::CELL_MODE_RANGE || popup_edited_item->get_cell_mode(popup_edited_item_col) == TreeItem::CELL_MODE_RANGE_EXPRESSION)) {
- //range drag
+ if (cache.hover_type != old_hover || cache.hover_index != old_index) {
+ update();
+ }
- if (!range_drag_enabled) {
+ if (pressing_for_editor && popup_edited_item && (popup_edited_item->get_cell_mode(popup_edited_item_col) == TreeItem::CELL_MODE_RANGE || popup_edited_item->get_cell_mode(popup_edited_item_col) == TreeItem::CELL_MODE_RANGE_EXPRESSION)) {
+ //range drag
- Vector2 cpos = Vector2(b.x, b.y);
- if (cpos.distance_to(pressing_pos) > 2) {
- range_drag_enabled = true;
- range_drag_capture_pos = cpos;
- range_drag_base = popup_edited_item->get_range(popup_edited_item_col);
- Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
- }
- } else {
+ if (!range_drag_enabled) {
- TreeItem::Cell &c = popup_edited_item->cells[popup_edited_item_col];
- float diff_y = -b.relative_y;
- diff_y = Math::pow(ABS(diff_y), 1.8f) * SGN(diff_y);
- diff_y *= 0.1;
- range_drag_base = CLAMP(range_drag_base + c.step * diff_y, c.min, c.max);
- popup_edited_item->set_range(popup_edited_item_col, range_drag_base);
- item_edited(popup_edited_item_col, popup_edited_item);
+ Vector2 cpos = mm->get_pos();
+ if (cpos.distance_to(pressing_pos) > 2) {
+ range_drag_enabled = true;
+ range_drag_capture_pos = cpos;
+ range_drag_base = popup_edited_item->get_range(popup_edited_item_col);
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED);
}
+ } else {
+
+ TreeItem::Cell &c = popup_edited_item->cells[popup_edited_item_col];
+ float diff_y = -mm->get_relative().y;
+ diff_y = Math::pow(ABS(diff_y), 1.8f) * SGN(diff_y);
+ diff_y *= 0.1;
+ range_drag_base = CLAMP(range_drag_base + c.step * diff_y, c.min, c.max);
+ popup_edited_item->set_range(popup_edited_item_col, range_drag_base);
+ item_edited(popup_edited_item_col, popup_edited_item);
}
+ }
- if (drag_touching && !drag_touching_deaccel) {
+ if (drag_touching && !drag_touching_deaccel) {
- drag_accum -= b.relative_y;
- v_scroll->set_value(drag_from + drag_accum);
- drag_speed = -b.speed_y;
- }
- } break;
- case InputEvent::MOUSE_BUTTON: {
+ drag_accum -= mm->get_relative().y;
+ v_scroll->set_value(drag_from + drag_accum);
+ drag_speed = -mm->get_speed().y;
+ }
+ }
+
+ Ref<InputEventMouseButton> b = p_event;
+
+ if (b.is_valid()) {
+ if (cache.font.is_null()) // avoid a strange case that may fuckup stuff
+ update_cache();
+
+ if (!b->is_pressed()) {
- if (cache.font.is_null()) // avoid a strange case that may fuckup stuff
- update_cache();
- const InputEventMouseButton &b = p_event.mouse_button;
+ if (b->get_button_index() == BUTTON_LEFT) {
- if (!b.pressed) {
+ Point2 pos = b->get_pos() - cache.bg->get_offset();
+ if (show_column_titles) {
+ pos.y -= _get_title_button_height();
- if (b.button_index == BUTTON_LEFT) {
+ if (pos.y < 0) {
+ pos.x += cache.offset.x;
+ int len = 0;
+ for (int i = 0; i < columns.size(); i++) {
- if (single_select_defer) {
- select_single_item(single_select_defer, root, single_select_defer_column);
- single_select_defer = NULL;
+ len += get_column_width(i);
+ if (pos.x < len) {
+ emit_signal("column_title_pressed", i);
+ break;
+ }
+ }
}
+ }
- range_click_timer->stop();
+ if (single_select_defer) {
+ select_single_item(single_select_defer, root, single_select_defer_column);
+ single_select_defer = NULL;
+ }
+
+ range_click_timer->stop();
- if (pressing_for_editor) {
+ if (pressing_for_editor) {
- if (range_drag_enabled) {
+ if (range_drag_enabled) {
- range_drag_enabled = false;
- Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
- warp_mouse(range_drag_capture_pos);
+ range_drag_enabled = false;
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+ warp_mouse(range_drag_capture_pos);
+ } else {
+ Rect2 rect = get_selected()->get_meta("__focus_rect");
+ if (rect.has_point(Point2(b->get_pos().x, b->get_pos().y))) {
+ edit_selected();
} else {
- Rect2 rect = get_selected()->get_meta("__focus_rect");
- if (rect.has_point(Point2(p_event.mouse_button.x, p_event.mouse_button.y))) {
- edit_selected();
- } else {
- emit_signal("item_double_clicked");
- }
+ emit_signal("item_double_clicked");
}
- pressing_for_editor = false;
}
+ pressing_for_editor = false;
+ }
- if (cache.click_type == Cache::CLICK_BUTTON) {
- // make sure in case of wrong reference after reconstructing whole TreeItems
- cache.click_item = get_item_at_pos(cache.click_pos);
- emit_signal("button_pressed", cache.click_item, cache.click_column, cache.click_id);
- }
- cache.click_type = Cache::CLICK_NONE;
- cache.click_index = -1;
- cache.click_id = -1;
- cache.click_item = NULL;
- cache.click_column = 0;
+ if (cache.click_type == Cache::CLICK_BUTTON) {
+ // make sure in case of wrong reference after reconstructing whole TreeItems
+ cache.click_item = get_item_at_pos(cache.click_pos);
+ emit_signal("button_pressed", cache.click_item, cache.click_column, cache.click_id);
+ }
+ cache.click_type = Cache::CLICK_NONE;
+ cache.click_index = -1;
+ cache.click_id = -1;
+ cache.click_item = NULL;
+ cache.click_column = 0;
- if (drag_touching) {
+ if (drag_touching) {
- if (drag_speed == 0) {
- drag_touching_deaccel = false;
- drag_touching = false;
- set_fixed_process(false);
- } else {
+ if (drag_speed == 0) {
+ drag_touching_deaccel = false;
+ drag_touching = false;
+ set_fixed_process(false);
+ } else {
- drag_touching_deaccel = true;
- }
+ drag_touching_deaccel = true;
}
- update();
}
- break;
+ update();
}
+ return;
+ }
- if (range_drag_enabled)
- break;
-
- switch (b.button_index) {
- case BUTTON_RIGHT:
- case BUTTON_LEFT: {
- Ref<StyleBox> bg = cache.bg;
+ if (range_drag_enabled)
+ return;
- Point2 pos = Point2(b.x, b.y) - bg->get_offset();
- cache.click_type = Cache::CLICK_NONE;
- if (show_column_titles && b.button_index == BUTTON_LEFT) {
- pos.y -= _get_title_button_height();
-
- if (pos.y < 0) {
- pos.x += cache.offset.x;
- int len = 0;
- for (int i = 0; i < columns.size(); i++) {
-
- len += get_column_width(i);
- if (pos.x < len) {
-
- cache.click_type = Cache::CLICK_TITLE;
- cache.click_index = i;
- //cache.click_id=;
- update();
- break;
- }
+ switch (b->get_button_index()) {
+ case BUTTON_RIGHT:
+ case BUTTON_LEFT: {
+ Ref<StyleBox> bg = cache.bg;
+
+ Point2 pos = b->get_pos() - bg->get_offset();
+ cache.click_type = Cache::CLICK_NONE;
+ if (show_column_titles && b->get_button_index() == BUTTON_LEFT) {
+ pos.y -= _get_title_button_height();
+
+ if (pos.y < 0) {
+ pos.x += cache.offset.x;
+ int len = 0;
+ for (int i = 0; i < columns.size(); i++) {
+
+ len += get_column_width(i);
+ if (pos.x < len) {
+
+ cache.click_type = Cache::CLICK_TITLE;
+ cache.click_index = i;
+ //cache.click_id=;
+ update();
+ break;
}
- break;
- }
- }
- if (!root || (!root->get_children() && hide_root)) {
- if (b.button_index == BUTTON_RIGHT && allow_rmb_select) {
- emit_signal("empty_tree_rmb_selected", get_local_mouse_pos());
}
break;
}
+ }
+ if (!root || (!root->get_children() && hide_root)) {
+ if (b->get_button_index() == BUTTON_RIGHT && allow_rmb_select) {
+ emit_signal("empty_tree_rmb_selected", get_local_mouse_pos());
+ }
+ break;
+ }
- click_handled = false;
- pressing_for_editor = false;
+ click_handled = false;
+ pressing_for_editor = false;
- blocked++;
- bool handled = propagate_mouse_event(pos + cache.offset, 0, 0, b.doubleclick, root, b.button_index, b.mod);
- blocked--;
+ blocked++;
+ bool handled = propagate_mouse_event(pos + cache.offset, 0, 0, b->is_doubleclick(), root, b->get_button_index(), b);
+ blocked--;
- if (pressing_for_editor) {
- pressing_pos = Point2(b.x, b.y);
- }
+ if (pressing_for_editor) {
+ pressing_pos = b->get_pos();
+ }
- if (b.button_index == BUTTON_RIGHT)
- break;
+ if (b->get_button_index() == BUTTON_RIGHT)
+ break;
- if (drag_touching) {
- set_fixed_process(false);
- drag_touching_deaccel = false;
- drag_touching = false;
- drag_speed = 0;
- drag_from = 0;
- }
+ if (drag_touching) {
+ set_fixed_process(false);
+ drag_touching_deaccel = false;
+ drag_touching = false;
+ drag_speed = 0;
+ drag_from = 0;
+ }
- if (!click_handled) {
- drag_speed = 0;
- drag_accum = 0;
- //last_drag_accum=0;
- drag_from = v_scroll->get_value();
- drag_touching = OS::get_singleton()->has_touchscreen_ui_hint();
- drag_touching_deaccel = false;
- if (drag_touching) {
- set_fixed_process(true);
- }
+ if (!click_handled) {
+ drag_speed = 0;
+ drag_accum = 0;
+ //last_drag_accum=0;
+ drag_from = v_scroll->get_value();
+ drag_touching = OS::get_singleton()->has_touchscreen_ui_hint();
+ drag_touching_deaccel = false;
+ if (drag_touching) {
+ set_fixed_process(true);
}
+ }
- } break;
- case BUTTON_WHEEL_UP: {
-
- v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * b.factor / 8);
- } break;
- case BUTTON_WHEEL_DOWN: {
+ } break;
+ case BUTTON_WHEEL_UP: {
- v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * b.factor / 8);
- } break;
- }
+ v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() * b->get_factor() / 8);
+ } break;
+ case BUTTON_WHEEL_DOWN: {
- } break;
+ v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * b->get_factor() / 8);
+ } break;
+ }
}
}
@@ -3013,7 +3032,7 @@ void Tree::ensure_cursor_is_visible() {
int screenh = get_size().height - h_scroll->get_combined_minimum_size().height;
if (ofs + h > v_scroll->get_value() + screenh)
- v_scroll->call_deferred("set_val", ofs - screenh + h);
+ v_scroll->call_deferred("set_value", ofs - screenh + h);
else if (ofs < v_scroll->get_value())
v_scroll->set_value(ofs);
}
@@ -3456,6 +3475,7 @@ void Tree::_bind_methods() {
ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::OBJECT, "item"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::INT, "id")));
ADD_SIGNAL(MethodInfo("custom_popup_edited", PropertyInfo(Variant::BOOL, "arrow_clicked")));
ADD_SIGNAL(MethodInfo("item_activated"));
+ ADD_SIGNAL(MethodInfo("column_title_pressed", PropertyInfo(Variant::INT, "column")));
BIND_CONSTANT(SELECT_SINGLE);
BIND_CONSTANT(SELECT_ROW);
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 4bee1adc4b..0c07109e7d 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -337,14 +337,14 @@ private:
void draw_item_rect(const TreeItem::Cell &p_cell, const Rect2i &p_rect, const Color &p_color);
int draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 &p_draw_size, TreeItem *p_item);
void select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_col, TreeItem *p_prev = NULL, bool *r_in_range = NULL, bool p_force_deselect = false);
- int propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool p_doubleclick, TreeItem *p_item, int p_button, const InputModifierState &p_mod);
+ int propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, bool p_doubleclick, TreeItem *p_item, int p_button, const Ref<InputEventWithModifiers> &p_mod);
void text_editor_enter(String p_text);
void _text_editor_modal_close();
void value_editor_changed(double p_value);
void popup_select(int p_option);
- void _gui_input(InputEvent p_event);
+ void _gui_input(Ref<InputEvent> p_event);
void _notification(int p_what);
Size2 get_minimum_size() const;
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index c3a839c514..1d70718a6a 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -59,7 +59,7 @@ class VideoPlayer : public Control {
RID stream_rid;
Ref<ImageTexture> texture;
- Image last_frame;
+ Ref<Image> last_frame;
AudioRBResampler resampler;
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index bf91b109ad..0c65c44392 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2938,9 +2938,9 @@ void Node::_bind_methods() {
BIND_VMETHOD(MethodInfo("_enter_tree"));
BIND_VMETHOD(MethodInfo("_exit_tree"));
BIND_VMETHOD(MethodInfo("_ready"));
- BIND_VMETHOD(MethodInfo("_input", PropertyInfo(Variant::INPUT_EVENT, "event")));
- BIND_VMETHOD(MethodInfo("_unhandled_input", PropertyInfo(Variant::INPUT_EVENT, "event")));
- BIND_VMETHOD(MethodInfo("_unhandled_key_input", PropertyInfo(Variant::INPUT_EVENT, "key_event")));
+ BIND_VMETHOD(MethodInfo("_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
+ BIND_VMETHOD(MethodInfo("_unhandled_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
+ BIND_VMETHOD(MethodInfo("_unhandled_key_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEventKey")));
//ClassDB::bind_method(D_METHOD("get_child",&Node::get_child,PH("index")));
//ClassDB::bind_method(D_METHOD("get_node",&Node::get_node,PH("path")));
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index a43938c661..b55a925f55 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -379,9 +379,9 @@ bool SceneTree::is_input_handled() {
return input_handled;
}
-void SceneTree::input_event(const InputEvent &p_event) {
+void SceneTree::input_event(const Ref<InputEvent> &p_event) {
- if (is_editor_hint() && (p_event.type == InputEvent::JOYPAD_MOTION || p_event.type == InputEvent::JOYPAD_BUTTON))
+ if (is_editor_hint() && (p_event->cast_to<InputEventJoypadButton>() || p_event->cast_to<InputEventJoypadMotion>()))
return; //avoid joy input on editor
root_lock++;
@@ -389,8 +389,8 @@ void SceneTree::input_event(const InputEvent &p_event) {
input_handled = false;
- InputEvent ev = p_event;
- ev.ID = ++last_id; //this should work better
+ Ref<InputEvent> ev = p_event;
+ ev->set_id(++last_id); //this should work better
#if 0
switch(ev.type) {
@@ -398,9 +398,9 @@ void SceneTree::input_event(const InputEvent &p_event) {
Matrix32 ai = root->get_final_transform().affine_inverse();
Vector2 g = ai.xform(Vector2(ev.mouse_button.global_x,ev.mouse_button.global_y));
- Vector2 l = ai.xform(Vector2(ev.mouse_button.x,ev.mouse_button.y));
- ev.mouse_button.x=l.x;
- ev.mouse_button.y=l.y;
+ Vector2 l = ai.xform(Vector2(ev->get_pos().x,ev->get_pos().y));
+ ev->get_pos().x=l.x;
+ ev->get_pos().y=l.y;
ev.mouse_button.global_x=g.x;
ev.mouse_button.global_y=g.y;
@@ -410,13 +410,13 @@ void SceneTree::input_event(const InputEvent &p_event) {
Matrix32 ai = root->get_final_transform().affine_inverse();
Vector2 g = ai.xform(Vector2(ev.mouse_motion.global_x,ev.mouse_motion.global_y));
Vector2 l = ai.xform(Vector2(ev.mouse_motion.x,ev.mouse_motion.y));
- Vector2 r = ai.xform(Vector2(ev.mouse_motion.relative_x,ev.mouse_motion.relative_y));
+ Vector2 r = ai.xform(Vector2(ev->get_relative().x,ev->get_relative().y));
ev.mouse_motion.x=l.x;
ev.mouse_motion.y=l.y;
ev.mouse_motion.global_x=g.x;
ev.mouse_motion.global_y=g.y;
- ev.mouse_motion.relative_x=r.x;
- ev.mouse_motion.relative_y=r.y;
+ ev->get_relative().x=r.x;
+ ev->get_relative().y=r.y;
} break;
case InputEvent::SCREEN_TOUCH: {
@@ -453,12 +453,12 @@ void SceneTree::input_event(const InputEvent &p_event) {
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"input","_input",ev);
/*
- if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F12) {
+ if (ev.type==InputEvent::KEY && ev->is_pressed() && !ev->is_echo() && ev->get_scancode()==KEY_F12) {
print_line("RAM: "+itos(Memory::get_static_mem_usage()));
print_line("DRAM: "+itos(Memory::get_dynamic_mem_usage()));
}
- if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F11) {
+ if (ev.type==InputEvent::KEY && ev->is_pressed() && !ev->is_echo() && ev->get_scancode()==KEY_F11) {
Memory::dump_static_mem_to_file("memdump.txt");
}
@@ -470,9 +470,13 @@ void SceneTree::input_event(const InputEvent &p_event) {
call_group_flags(GROUP_CALL_REALTIME, "_viewports", "_vp_input", ev); //special one for GUI, as controls use their own process check
#endif
- if (ScriptDebugger::get_singleton() && ScriptDebugger::get_singleton()->is_remote() && ev.type == InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode == KEY_F8) {
- ScriptDebugger::get_singleton()->request_quit();
+ if (ScriptDebugger::get_singleton() && ScriptDebugger::get_singleton()->is_remote()) {
+ //quit from game window using F8
+ Ref<InputEventKey> k = ev;
+ if (k.is_valid() && k->is_pressed() && !k->is_echo() && k->get_scancode() == KEY_F8) {
+ ScriptDebugger::get_singleton()->request_quit();
+ }
}
_flush_ugc();
@@ -878,7 +882,7 @@ bool SceneTree::is_paused() const {
return pause;
}
-void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p_method, const InputEvent &p_input) {
+void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input) {
Map<StringName, Group>::Element *E = group_map.find(p_group);
if (!E)
diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h
index 52d5f5c88c..5d42c66652 100644
--- a/scene/main/scene_main_loop.h
+++ b/scene/main/scene_main_loop.h
@@ -237,7 +237,7 @@ private:
void remove_from_group(const StringName &p_group, Node *p_node);
void _notify_group_pause(const StringName &p_group, int p_notification);
- void _call_input_pause(const StringName &p_group, const StringName &p_method, const InputEvent &p_input);
+ void _call_input_pause(const StringName &p_group, const StringName &p_method, const Ref<InputEvent> &p_input);
Variant _call_group_flags(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
Variant _call_group(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
@@ -341,7 +341,7 @@ public:
void set_group(const StringName &p_group, const String &p_name, const Variant &p_value);
virtual void input_text(const String &p_text);
- virtual void input_event(const InputEvent &p_event);
+ virtual void input_event(const Ref<InputEvent> &p_event);
virtual void init();
virtual bool iteration(float p_time);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 406640275c..f62cebe042 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -503,30 +503,36 @@ void Viewport::_notification(int p_what) {
while (physics_picking_events.size()) {
- InputEvent ev = physics_picking_events.front()->get();
+ Ref<InputEvent> ev = physics_picking_events.front()->get();
physics_picking_events.pop_front();
Vector2 pos;
- switch (ev.type) {
- case InputEvent::MOUSE_MOTION: {
- pos.x = ev.mouse_motion.x;
- pos.y = ev.mouse_motion.y;
- motion_tested = true;
- physics_last_mousepos = pos;
- } break;
- case InputEvent::MOUSE_BUTTON: {
- pos.x = ev.mouse_button.x;
- pos.y = ev.mouse_button.y;
-
- } break;
- case InputEvent::SCREEN_DRAG: {
- pos.x = ev.screen_drag.x;
- pos.y = ev.screen_drag.y;
- } break;
- case InputEvent::SCREEN_TOUCH: {
- pos.x = ev.screen_touch.x;
- pos.y = ev.screen_touch.y;
- } break;
+
+ Ref<InputEventMouseMotion> mm = ev;
+
+ if (mm.is_valid()) {
+
+ pos = mm->get_pos();
+ motion_tested = true;
+ physics_last_mousepos = pos;
+ }
+
+ Ref<InputEventMouseButton> mb = ev;
+
+ if (mb.is_valid()) {
+ pos = mb->get_pos();
+ }
+
+ Ref<InputEventScreenDrag> sd = ev;
+
+ if (sd.is_valid()) {
+ pos = sd->get_pos();
+ }
+
+ Ref<InputEventScreenTouch> st = ev;
+
+ if (st.is_valid()) {
+ pos = st->get_pos();
}
if (ss2d) {
@@ -589,7 +595,7 @@ void Viewport::_notification(int p_what) {
if (co) {
co->_input_event(camera, ev, Vector3(), Vector3(), 0);
captured = true;
- if (ev.type == InputEvent::MOUSE_BUTTON && ev.mouse_button.button_index == 1 && !ev.mouse_button.pressed) {
+ if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
physics_object_capture = 0;
}
@@ -609,7 +615,7 @@ void Viewport::_notification(int p_what) {
if (ObjectDB::get_instance(last_id)) {
//good, exists
last_object->_input_event(camera, ev, result.position, result.normal, result.shape);
- if (last_object->get_capture_input_on_drag() && ev.type == InputEvent::MOUSE_BUTTON && ev.mouse_button.button_index == 1 && ev.mouse_button.pressed) {
+ if (last_object->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
physics_object_capture = last_id;
}
}
@@ -637,14 +643,14 @@ void Viewport::_notification(int p_what) {
last_object = co;
last_id = result.collider_id;
new_collider = last_id;
- if (co->get_capture_input_on_drag() && ev.type == InputEvent::MOUSE_BUTTON && ev.mouse_button.button_index == 1 && ev.mouse_button.pressed) {
+ if (co->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
physics_object_capture = last_id;
}
}
}
}
- if (ev.type == InputEvent::MOUSE_MOTION) {
+ if (mm.is_valid()) {
_test_new_mouseover(new_collider);
}
}
@@ -1226,10 +1232,10 @@ void Viewport::queue_screen_capture() {
//VS::get_singleton()->viewport_queue_screen_capture(viewport);
}
-Image Viewport::get_screen_capture() const {
+Ref<Image> Viewport::get_screen_capture() const {
//return VS::get_singleton()->viewport_get_screen_capture(viewport);
- return Image();
+ return Ref<Image>();
}
Ref<ViewportTexture> Viewport::get_texture() const {
@@ -1322,71 +1328,12 @@ Vector2 Viewport::_get_window_offset() const {
return Vector2();
}
-void Viewport::_make_input_local(InputEvent &ev) {
+Ref<InputEvent> Viewport::_make_input_local(const Ref<InputEvent> &ev) {
- switch (ev.type) {
-
- case InputEvent::MOUSE_BUTTON: {
-
- Vector2 vp_ofs = _get_window_offset();
-
- Transform2D ai = get_final_transform().affine_inverse() * _get_input_pre_xform();
- Vector2 g = ai.xform(Vector2(ev.mouse_button.global_x, ev.mouse_button.global_y));
- Vector2 l = ai.xform(Vector2(ev.mouse_button.x, ev.mouse_button.y) - vp_ofs);
-
- ev.mouse_button.x = l.x;
- ev.mouse_button.y = l.y;
- ev.mouse_button.global_x = g.x;
- ev.mouse_button.global_y = g.y;
-
- } break;
- case InputEvent::MOUSE_MOTION: {
-
- Vector2 vp_ofs = _get_window_offset();
-
- Transform2D ai = get_final_transform().affine_inverse() * _get_input_pre_xform();
- Vector2 g = ai.xform(Vector2(ev.mouse_motion.global_x, ev.mouse_motion.global_y));
- Vector2 l = ai.xform(Vector2(ev.mouse_motion.x, ev.mouse_motion.y) - vp_ofs);
- Vector2 r = ai.basis_xform(Vector2(ev.mouse_motion.relative_x, ev.mouse_motion.relative_y));
- Vector2 s = ai.basis_xform(Vector2(ev.mouse_motion.speed_x, ev.mouse_motion.speed_y));
-
- ev.mouse_motion.x = l.x;
- ev.mouse_motion.y = l.y;
- ev.mouse_motion.global_x = g.x;
- ev.mouse_motion.global_y = g.y;
- ev.mouse_motion.relative_x = r.x;
- ev.mouse_motion.relative_y = r.y;
- ev.mouse_motion.speed_x = s.x;
- ev.mouse_motion.speed_y = s.y;
-
- } break;
- case InputEvent::SCREEN_TOUCH: {
+ Vector2 vp_ofs = _get_window_offset();
+ Transform2D ai = get_final_transform().affine_inverse() * _get_input_pre_xform();
- Vector2 vp_ofs = _get_window_offset();
-
- Transform2D ai = get_final_transform().affine_inverse() * _get_input_pre_xform();
- Vector2 t = ai.xform(Vector2(ev.screen_touch.x, ev.screen_touch.y) - vp_ofs);
-
- ev.screen_touch.x = t.x;
- ev.screen_touch.y = t.y;
-
- } break;
- case InputEvent::SCREEN_DRAG: {
-
- Vector2 vp_ofs = _get_window_offset();
-
- Transform2D ai = get_final_transform().affine_inverse() * _get_input_pre_xform();
- Vector2 t = ai.xform(Vector2(ev.screen_drag.x, ev.screen_drag.y) - vp_ofs);
- Vector2 r = ai.basis_xform(Vector2(ev.screen_drag.relative_x, ev.screen_drag.relative_y));
- Vector2 s = ai.basis_xform(Vector2(ev.screen_drag.speed_x, ev.screen_drag.speed_y));
- ev.screen_drag.x = t.x;
- ev.screen_drag.y = t.y;
- ev.screen_drag.relative_x = r.x;
- ev.screen_drag.relative_y = r.y;
- ev.screen_drag.speed_x = s.x;
- ev.screen_drag.speed_y = s.y;
- } break;
- }
+ return ev->xformed_by(ai, -vp_ofs);
}
void Viewport::_vp_input_text(const String &p_text) {
@@ -1396,7 +1343,7 @@ void Viewport::_vp_input_text(const String &p_text) {
}
}
-void Viewport::_vp_input(const InputEvent &p_ev) {
+void Viewport::_vp_input(const Ref<InputEvent> &p_ev) {
if (disable_input)
return;
@@ -1413,12 +1360,11 @@ void Viewport::_vp_input(const InputEvent &p_ev) {
//this one handles system input, p_ev are in system coordinates
//they are converted to viewport coordinates
- InputEvent ev = p_ev;
- _make_input_local(ev);
+ Ref<InputEvent> ev = _make_input_local(p_ev);
input(ev);
}
-void Viewport::_vp_unhandled_input(const InputEvent &p_ev) {
+void Viewport::_vp_unhandled_input(const Ref<InputEvent> &p_ev) {
if (disable_input)
return;
@@ -1439,8 +1385,7 @@ void Viewport::_vp_unhandled_input(const InputEvent &p_ev) {
//this one handles system input, p_ev are in system coordinates
//they are converted to viewport coordinates
- InputEvent ev = p_ev;
- _make_input_local(ev);
+ Ref<InputEvent> ev = _make_input_local(p_ev);
unhandled_input(ev);
}
@@ -1545,18 +1490,22 @@ void Viewport::_gui_show_tooltip() {
gui.tooltip_popup->show();
}
-void Viewport::_gui_call_input(Control *p_control, const InputEvent &p_input) {
+void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_input) {
//_block();
- InputEvent ev = p_input;
+ Ref<InputEvent> ev = p_input;
//mouse wheel events can't be stopped
- bool cant_stop_me_now = (ev.type == InputEvent::MOUSE_BUTTON &&
- (ev.mouse_button.button_index == BUTTON_WHEEL_DOWN ||
- ev.mouse_button.button_index == BUTTON_WHEEL_UP ||
- ev.mouse_button.button_index == BUTTON_WHEEL_LEFT ||
- ev.mouse_button.button_index == BUTTON_WHEEL_RIGHT));
+ Ref<InputEventMouseButton> mb = p_input;
+
+ bool cant_stop_me_now = (mb.is_valid() &&
+ (mb->get_button_index() == BUTTON_WHEEL_DOWN ||
+ mb->get_button_index() == BUTTON_WHEEL_UP ||
+ mb->get_button_index() == BUTTON_WHEEL_LEFT ||
+ mb->get_button_index() == BUTTON_WHEEL_RIGHT));
+
+ bool ismouse = ev.is_valid() || p_input->cast_to<InputEventMouseMotion>() != NULL;
CanvasItem *ci = p_control;
while (ci) {
@@ -1573,14 +1522,14 @@ void Viewport::_gui_call_input(Control *p_control, const InputEvent &p_input) {
break;
if (gui.key_event_accepted)
break;
- if (!cant_stop_me_now && control->data.mouse_filter == Control::MOUSE_FILTER_STOP && (ev.type == InputEvent::MOUSE_BUTTON || ev.type == InputEvent::MOUSE_MOTION))
+ if (!cant_stop_me_now && control->data.mouse_filter == Control::MOUSE_FILTER_STOP && ismouse)
break;
}
if (ci->is_set_as_toplevel())
break;
- ev = ev.xform_by(ci->get_transform()); //transform event upwards
+ ev = ev->xformed_by(ci->get_transform()); //transform event upwards
ci = ci->get_parent_item();
}
@@ -1718,9 +1667,9 @@ bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_che
return false;
}
-void Viewport::_gui_input_event(InputEvent p_event) {
+void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
- if (p_event.ID == gui.cancelled_input_ID) {
+ if (p_event->get_id() == gui.cancelled_input_ID) {
return;
}
//?
@@ -1730,430 +1679,427 @@ void Viewport::_gui_input_event(InputEvent p_event) {
}
*/
- switch (p_event.type) {
+ Ref<InputEventMouseButton> mb = p_event;
- case InputEvent::MOUSE_BUTTON: {
+ if (mb.is_valid()) {
- gui.key_event_accepted = false;
+ gui.key_event_accepted = false;
- Point2 mpos = Point2(p_event.mouse_button.x, p_event.mouse_button.y);
- if (p_event.mouse_button.pressed) {
+ Point2 mpos = mb->get_pos();
+ if (mb->is_pressed()) {
- Size2 pos = mpos;
- if (gui.mouse_focus && p_event.mouse_button.button_index != gui.mouse_focus_button) {
+ Size2 pos = mpos;
+ if (gui.mouse_focus && mb->get_button_index() != gui.mouse_focus_button) {
- //do not steal mouse focus and stuff
+ //do not steal mouse focus and stuff
- } else {
-
- _gui_sort_modal_stack();
- while (!gui.modal_stack.empty()) {
+ } else {
- Control *top = gui.modal_stack.back()->get();
- Vector2 pos = top->get_global_transform_with_canvas().affine_inverse().xform(mpos);
- if (!top->has_point(pos)) {
+ _gui_sort_modal_stack();
+ while (!gui.modal_stack.empty()) {
- if (top->data.modal_exclusive || top->data.modal_frame == Engine::get_singleton()->get_frames_drawn()) {
- //cancel event, sorry, modal exclusive EATS UP ALL
- //alternative, you can't pop out a window the same frame it was made modal (fixes many issues)
- get_tree()->set_input_as_handled();
- return; // no one gets the event if exclusive NO ONE
- }
+ Control *top = gui.modal_stack.back()->get();
+ Vector2 pos = top->get_global_transform_with_canvas().affine_inverse().xform(mpos);
+ if (!top->has_point(pos)) {
- top->notification(Control::NOTIFICATION_MODAL_CLOSE);
- top->_modal_stack_remove();
- top->hide();
- } else {
- break;
+ if (top->data.modal_exclusive || top->data.modal_frame == Engine::get_singleton()->get_frames_drawn()) {
+ //cancel event, sorry, modal exclusive EATS UP ALL
+ //alternative, you can't pop out a window the same frame it was made modal (fixes many issues)
+ get_tree()->set_input_as_handled();
+ return; // no one gets the event if exclusive NO ONE
}
+
+ top->notification(Control::NOTIFICATION_MODAL_CLOSE);
+ top->_modal_stack_remove();
+ top->hide();
+ } else {
+ break;
}
+ }
- //Matrix32 parent_xform;
+ //Matrix32 parent_xform;
- /*
- if (data.parent_canvas_item)
- parent_xform=data.parent_canvas_item->get_global_transform();
- */
+ /*
+ if (data.parent_canvas_item)
+ parent_xform=data.parent_canvas_item->get_global_transform();
+ */
- gui.mouse_focus = _gui_find_control(pos);
- //print_line("has mf "+itos(gui.mouse_focus!=NULL));
- gui.mouse_focus_button = p_event.mouse_button.button_index;
+ gui.mouse_focus = _gui_find_control(pos);
+ //print_line("has mf "+itos(gui.mouse_focus!=NULL));
+ gui.mouse_focus_button = mb->get_button_index();
- if (!gui.mouse_focus) {
- break;
- }
+ if (!gui.mouse_focus) {
+ return;
+ }
- if (p_event.mouse_button.button_index == BUTTON_LEFT) {
- gui.drag_accum = Vector2();
- gui.drag_attempted = false;
- }
+ if (mb->get_button_index() == BUTTON_LEFT) {
+ gui.drag_accum = Vector2();
+ gui.drag_attempted = false;
}
+ }
+
+ mb = mb->xformed_by(Transform2D()); // make a copy of the event
+
+ mb->set_global_pos(pos);
- p_event.mouse_button.global_x = pos.x;
- p_event.mouse_button.global_y = pos.y;
+ pos = gui.focus_inv_xform.xform(pos);
- pos = gui.focus_inv_xform.xform(pos);
- p_event.mouse_button.x = pos.x;
- p_event.mouse_button.y = pos.y;
+ mb->set_pos(pos);
#ifdef DEBUG_ENABLED
- if (ScriptDebugger::get_singleton()) {
+ if (ScriptDebugger::get_singleton()) {
- Array arr;
- arr.push_back(gui.mouse_focus->get_path());
- arr.push_back(gui.mouse_focus->get_class());
- ScriptDebugger::get_singleton()->send_message("click_ctrl", arr);
- }
+ Array arr;
+ arr.push_back(gui.mouse_focus->get_path());
+ arr.push_back(gui.mouse_focus->get_class());
+ ScriptDebugger::get_singleton()->send_message("click_ctrl", arr);
+ }
/*if (bool(GLOBAL_DEF("debug/print_clicked_control",false))) {
- print_line(String(gui.mouse_focus->get_path())+" - "+pos);
- }*/
+ print_line(String(gui.mouse_focus->get_path())+" - "+pos);
+ }*/
#endif
- if (p_event.mouse_button.button_index == BUTTON_LEFT) { //assign focus
- CanvasItem *ci = gui.mouse_focus;
- while (ci) {
+ if (mb->get_button_index() == BUTTON_LEFT) { //assign focus
+ CanvasItem *ci = gui.mouse_focus;
+ while (ci) {
- Control *control = ci->cast_to<Control>();
- if (control) {
- if (control->get_focus_mode() != Control::FOCUS_NONE) {
- if (control != gui.key_focus) {
- control->grab_focus();
- }
- break;
+ Control *control = ci->cast_to<Control>();
+ if (control) {
+ if (control->get_focus_mode() != Control::FOCUS_NONE) {
+ if (control != gui.key_focus) {
+ control->grab_focus();
}
-
- if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP)
- break;
+ break;
}
- if (ci->is_set_as_toplevel())
+ if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP)
break;
-
- ci = ci->get_parent_item();
}
- }
- if (gui.mouse_focus->can_process()) {
- _gui_call_input(gui.mouse_focus, p_event);
- }
+ if (ci->is_set_as_toplevel())
+ break;
- get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "windows", "_cancel_input_ID", p_event.ID);
- get_tree()->set_input_as_handled();
+ ci = ci->get_parent_item();
+ }
+ }
- if (gui.drag_data.get_type() != Variant::NIL && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ if (gui.mouse_focus->can_process()) {
+ _gui_call_input(gui.mouse_focus, mb);
+ }
- //alternate drop use (when using force_drag(), as proposed by #5342
- if (gui.mouse_focus) {
- _gui_drop(gui.mouse_focus, pos, false);
- }
+ get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "windows", "_cancel_input_ID", mb->get_id());
+ get_tree()->set_input_as_handled();
- gui.drag_data = Variant();
+ if (gui.drag_data.get_type() != Variant::NIL && mb->get_button_index() == BUTTON_LEFT) {
- if (gui.drag_preview) {
- memdelete(gui.drag_preview);
- gui.drag_preview = NULL;
- }
- _propagate_viewport_notification(this, NOTIFICATION_DRAG_END);
- //change mouse accordingly
+ //alternate drop use (when using force_drag(), as proposed by #5342
+ if (gui.mouse_focus) {
+ _gui_drop(gui.mouse_focus, pos, false);
}
- _gui_cancel_tooltip();
- //gui.tooltip_popup->hide();
+ gui.drag_data = Variant();
- } else {
+ if (gui.drag_preview) {
+ memdelete(gui.drag_preview);
+ gui.drag_preview = NULL;
+ }
+ _propagate_viewport_notification(this, NOTIFICATION_DRAG_END);
+ //change mouse accordingly
+ }
- if (gui.drag_data.get_type() != Variant::NIL && p_event.mouse_button.button_index == BUTTON_LEFT) {
+ _gui_cancel_tooltip();
+ //gui.tooltip_popup->hide();
- if (gui.mouse_over) {
- Size2 pos = mpos;
- pos = gui.focus_inv_xform.xform(pos);
+ } else {
- _gui_drop(gui.mouse_over, pos, false);
- }
+ if (gui.drag_data.get_type() != Variant::NIL && mb->get_button_index() == BUTTON_LEFT) {
- if (gui.drag_preview && p_event.mouse_button.button_index == BUTTON_LEFT) {
- memdelete(gui.drag_preview);
- gui.drag_preview = NULL;
- }
+ if (gui.mouse_over) {
+ Size2 pos = mpos;
+ pos = gui.focus_inv_xform.xform(pos);
- gui.drag_data = Variant();
- _propagate_viewport_notification(this, NOTIFICATION_DRAG_END);
- //change mouse accordingly
+ _gui_drop(gui.mouse_over, pos, false);
}
- if (!gui.mouse_focus) {
- //release event is only sent if a mouse focus (previously pressed button) exists
- break;
+ if (gui.drag_preview && mb->get_button_index() == BUTTON_LEFT) {
+ memdelete(gui.drag_preview);
+ gui.drag_preview = NULL;
}
- Size2 pos = mpos;
- p_event.mouse_button.global_x = pos.x;
- p_event.mouse_button.global_y = pos.y;
- pos = gui.focus_inv_xform.xform(pos);
- p_event.mouse_button.x = pos.x;
- p_event.mouse_button.y = pos.y;
+ gui.drag_data = Variant();
+ _propagate_viewport_notification(this, NOTIFICATION_DRAG_END);
+ //change mouse accordingly
+ }
- if (gui.mouse_focus->can_process()) {
- _gui_call_input(gui.mouse_focus, p_event);
- }
+ if (!gui.mouse_focus) {
+ //release event is only sent if a mouse focus (previously pressed button) exists
+ return;
+ }
- if (p_event.mouse_button.button_index == gui.mouse_focus_button) {
- gui.mouse_focus = NULL;
- gui.mouse_focus_button = -1;
- }
+ Size2 pos = mpos;
- /*if (gui.drag_data.get_type()!=Variant::NIL && p_event.mouse_button.button_index==BUTTON_LEFT) {
- _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
- gui.drag_data=Variant(); //always clear
- }*/
+ mb = mb->xformed_by(Transform2D()); //make a copy
+ mb->set_global_pos(pos);
+ pos = gui.focus_inv_xform.xform(pos);
+ mb->set_pos(pos);
- get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "windows", "_cancel_input_ID", p_event.ID);
- get_tree()->set_input_as_handled();
+ if (gui.mouse_focus->can_process()) {
+ _gui_call_input(gui.mouse_focus, mb);
}
- } break;
- case InputEvent::MOUSE_MOTION: {
- gui.key_event_accepted = false;
- Point2 mpos = Point2(p_event.mouse_motion.x, p_event.mouse_motion.y);
+ if (mb->get_button_index() == gui.mouse_focus_button) {
+ gui.mouse_focus = NULL;
+ gui.mouse_focus_button = -1;
+ }
- gui.last_mouse_pos = mpos;
+ /*if (gui.drag_data.get_type()!=Variant::NIL && mb->get_button_index()==BUTTON_LEFT) {
+ _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
+ gui.drag_data=Variant(); //always clear
+ }*/
- Control *over = NULL;
+ get_tree()->call_group_flags(SceneTree::GROUP_CALL_REALTIME, "windows", "_cancel_input_ID", mb->get_id());
+ get_tree()->set_input_as_handled();
+ }
+ }
- // D&D
- if (!gui.drag_attempted && gui.mouse_focus && p_event.mouse_motion.button_mask & BUTTON_MASK_LEFT) {
+ Ref<InputEventMouseMotion> mm = p_event;
- gui.drag_accum += Point2(p_event.mouse_motion.relative_x, p_event.mouse_motion.relative_y);
- float len = gui.drag_accum.length();
- if (len > 10) {
+ if (mm.is_valid()) {
- { //attempt grab, try parent controls too
- CanvasItem *ci = gui.mouse_focus;
- while (ci) {
+ gui.key_event_accepted = false;
+ Point2 mpos = mm->get_pos();
- Control *control = ci->cast_to<Control>();
- if (control) {
+ gui.last_mouse_pos = mpos;
- gui.drag_data = control->get_drag_data(control->get_global_transform_with_canvas().affine_inverse().xform(mpos) - gui.drag_accum);
- if (gui.drag_data.get_type() != Variant::NIL) {
+ Control *over = NULL;
- gui.mouse_focus = NULL;
- }
+ // D&D
+ if (!gui.drag_attempted && gui.mouse_focus && mm->get_button_mask() & BUTTON_MASK_LEFT) {
+
+ gui.drag_accum += mm->get_relative();
+ float len = gui.drag_accum.length();
+ if (len > 10) {
- if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP)
- break;
+ { //attempt grab, try parent controls too
+ CanvasItem *ci = gui.mouse_focus;
+ while (ci) {
+
+ Control *control = ci->cast_to<Control>();
+ if (control) {
+
+ gui.drag_data = control->get_drag_data(control->get_global_transform_with_canvas().affine_inverse().xform(mpos) - gui.drag_accum);
+ if (gui.drag_data.get_type() != Variant::NIL) {
+
+ gui.mouse_focus = NULL;
}
- if (ci->is_set_as_toplevel())
+ if (control->data.mouse_filter == Control::MOUSE_FILTER_STOP)
break;
-
- ci = ci->get_parent_item();
}
- }
- gui.drag_attempted = true;
- if (gui.drag_data.get_type() != Variant::NIL) {
+ if (ci->is_set_as_toplevel())
+ break;
- _propagate_viewport_notification(this, NOTIFICATION_DRAG_BEGIN);
+ ci = ci->get_parent_item();
}
}
+
+ gui.drag_attempted = true;
+ if (gui.drag_data.get_type() != Variant::NIL) {
+
+ _propagate_viewport_notification(this, NOTIFICATION_DRAG_BEGIN);
+ }
}
+ }
- if (gui.mouse_focus) {
- over = gui.mouse_focus;
- //recompute focus_inv_xform again here
+ if (gui.mouse_focus) {
+ over = gui.mouse_focus;
+ //recompute focus_inv_xform again here
- } else {
+ } else {
- over = _gui_find_control(mpos);
- }
+ over = _gui_find_control(mpos);
+ }
- if (gui.drag_data.get_type() == Variant::NIL && over && !gui.modal_stack.empty()) {
+ if (gui.drag_data.get_type() == Variant::NIL && over && !gui.modal_stack.empty()) {
- Control *top = gui.modal_stack.back()->get();
- if (over != top && !top->is_a_parent_of(over)) {
+ Control *top = gui.modal_stack.back()->get();
+ if (over != top && !top->is_a_parent_of(over)) {
- break; // don't send motion event to anything below modal stack top
- }
+ return; // don't send motion event to anything below modal stack top
}
+ }
- if (over != gui.mouse_over) {
+ if (over != gui.mouse_over) {
- if (gui.mouse_over)
- gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_EXIT);
+ if (gui.mouse_over)
+ gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_EXIT);
- _gui_cancel_tooltip();
+ _gui_cancel_tooltip();
- if (over)
- over->notification(Control::NOTIFICATION_MOUSE_ENTER);
- }
+ if (over)
+ over->notification(Control::NOTIFICATION_MOUSE_ENTER);
+ }
- gui.mouse_over = over;
+ gui.mouse_over = over;
- if (gui.drag_preview) {
- gui.drag_preview->set_position(mpos);
- }
+ if (gui.drag_preview) {
+ gui.drag_preview->set_position(mpos);
+ }
- if (!over) {
- OS::get_singleton()->set_cursor_shape(OS::CURSOR_ARROW);
- break;
- }
+ if (!over) {
+ OS::get_singleton()->set_cursor_shape(OS::CURSOR_ARROW);
+ return;
+ }
- Transform2D localizer = over->get_global_transform_with_canvas().affine_inverse();
- Size2 pos = localizer.xform(mpos);
- Vector2 speed = localizer.basis_xform(Point2(p_event.mouse_motion.speed_x, p_event.mouse_motion.speed_y));
- Vector2 rel = localizer.basis_xform(Point2(p_event.mouse_motion.relative_x, p_event.mouse_motion.relative_y));
+ Transform2D localizer = over->get_global_transform_with_canvas().affine_inverse();
+ Size2 pos = localizer.xform(mpos);
+ Vector2 speed = localizer.basis_xform(mm->get_speed());
+ Vector2 rel = localizer.basis_xform(mm->get_relative());
- p_event.mouse_motion.global_x = mpos.x;
- p_event.mouse_motion.global_y = mpos.y;
- p_event.mouse_motion.speed_x = speed.x;
- p_event.mouse_motion.speed_y = speed.y;
- p_event.mouse_motion.relative_x = rel.x;
- p_event.mouse_motion.relative_y = rel.y;
+ mm = mm->xformed_by(Transform2D()); //make a copy
- if (p_event.mouse_motion.button_mask == 0) {
- //nothing pressed
+ mm->set_global_pos(mpos);
+ mm->set_speed(speed);
+ mm->set_relative(rel);
- bool can_tooltip = true;
+ if (mm->get_button_mask() == 0) {
+ //nothing pressed
- if (!gui.modal_stack.empty()) {
- if (gui.modal_stack.back()->get() != over && !gui.modal_stack.back()->get()->is_a_parent_of(over))
- can_tooltip = false;
- }
+ bool can_tooltip = true;
- bool is_tooltip_shown = false;
+ if (!gui.modal_stack.empty()) {
+ if (gui.modal_stack.back()->get() != over && !gui.modal_stack.back()->get()->is_a_parent_of(over))
+ can_tooltip = false;
+ }
- if (gui.tooltip_popup) {
- if (can_tooltip) {
- String tooltip = over->get_tooltip(gui.tooltip->get_global_transform().xform_inv(mpos));
+ bool is_tooltip_shown = false;
- if (tooltip.length() == 0)
- _gui_cancel_tooltip();
- else if (tooltip == gui.tooltip_label->get_text())
- is_tooltip_shown = true;
- } else
+ if (gui.tooltip_popup) {
+ if (can_tooltip) {
+ String tooltip = over->get_tooltip(gui.tooltip->get_global_transform().xform_inv(mpos));
+
+ if (tooltip.length() == 0)
_gui_cancel_tooltip();
- }
+ else if (tooltip == gui.tooltip_label->get_text())
+ is_tooltip_shown = true;
+ } else
+ _gui_cancel_tooltip();
+ }
- if (can_tooltip && !is_tooltip_shown) {
+ if (can_tooltip && !is_tooltip_shown) {
- gui.tooltip = over;
- gui.tooltip_pos = mpos; //(parent_xform * get_transform()).affine_inverse().xform(pos);
- gui.tooltip_timer = gui.tooltip_delay;
- }
+ gui.tooltip = over;
+ gui.tooltip_pos = mpos; //(parent_xform * get_transform()).affine_inverse().xform(pos);
+ gui.tooltip_timer = gui.tooltip_delay;
}
+ }
- //pos = gui.focus_inv_xform.xform(pos);
+ //pos = gui.focus_inv_xform.xform(pos);
- p_event.mouse_motion.x = pos.x;
- p_event.mouse_motion.y = pos.y;
+ mm->set_pos(pos);
- Control::CursorShape cursor_shape = over->get_cursor_shape(pos);
- OS::get_singleton()->set_cursor_shape((OS::CursorShape)cursor_shape);
+ Control::CursorShape cursor_shape = over->get_cursor_shape(pos);
+ OS::get_singleton()->set_cursor_shape((OS::CursorShape)cursor_shape);
- if (over->can_process()) {
- _gui_call_input(over, p_event);
- }
+ if (over->can_process()) {
+ _gui_call_input(over, mm);
+ }
- get_tree()->set_input_as_handled();
+ get_tree()->set_input_as_handled();
- if (gui.drag_data.get_type() != Variant::NIL && p_event.mouse_motion.button_mask & BUTTON_MASK_LEFT) {
+ if (gui.drag_data.get_type() != Variant::NIL && mm->get_button_mask() & BUTTON_MASK_LEFT) {
- bool can_drop = _gui_drop(over, pos, true);
+ bool can_drop = _gui_drop(over, pos, true);
- if (!can_drop) {
- OS::get_singleton()->set_cursor_shape(OS::CURSOR_FORBIDDEN);
- } else {
- OS::get_singleton()->set_cursor_shape(OS::CURSOR_CAN_DROP);
- }
- //change mouse accordingly i guess
+ if (!can_drop) {
+ OS::get_singleton()->set_cursor_shape(OS::CURSOR_FORBIDDEN);
+ } else {
+ OS::get_singleton()->set_cursor_shape(OS::CURSOR_CAN_DROP);
}
+ //change mouse accordingly i guess
+ }
+ }
- } break;
- case InputEvent::ACTION:
- case InputEvent::JOYPAD_BUTTON:
- case InputEvent::JOYPAD_MOTION:
- case InputEvent::KEY: {
+ if (mm.is_null() && mb.is_null() && p_event->is_action_type()) {
- if (gui.key_focus && !gui.key_focus->is_visible_in_tree()) {
- gui.key_focus->release_focus();
- }
+ if (gui.key_focus && !gui.key_focus->is_visible_in_tree()) {
+ gui.key_focus->release_focus();
+ }
- if (gui.key_focus) {
+ if (gui.key_focus) {
- gui.key_event_accepted = false;
- if (gui.key_focus->can_process()) {
- gui.key_focus->call_multilevel(SceneStringNames::get_singleton()->_gui_input, p_event);
- if (gui.key_focus) //maybe lost it
- gui.key_focus->emit_signal(SceneStringNames::get_singleton()->gui_input, p_event);
- }
+ gui.key_event_accepted = false;
+ if (gui.key_focus->can_process()) {
+ gui.key_focus->call_multilevel(SceneStringNames::get_singleton()->_gui_input, p_event);
+ if (gui.key_focus) //maybe lost it
+ gui.key_focus->emit_signal(SceneStringNames::get_singleton()->gui_input, p_event);
+ }
- if (gui.key_event_accepted) {
+ if (gui.key_event_accepted) {
- get_tree()->set_input_as_handled();
- break;
- }
+ get_tree()->set_input_as_handled();
+ return;
}
+ }
- if (p_event.is_pressed() && p_event.is_action("ui_cancel") && !gui.modal_stack.empty()) {
+ if (p_event->is_pressed() && p_event->is_action("ui_cancel") && !gui.modal_stack.empty()) {
- _gui_sort_modal_stack();
- Control *top = gui.modal_stack.back()->get();
- if (!top->data.modal_exclusive) {
+ _gui_sort_modal_stack();
+ Control *top = gui.modal_stack.back()->get();
+ if (!top->data.modal_exclusive) {
- top->notification(Control::NOTIFICATION_MODAL_CLOSE);
- top->_modal_stack_remove();
- top->hide();
- }
+ top->notification(Control::NOTIFICATION_MODAL_CLOSE);
+ top->_modal_stack_remove();
+ top->hide();
}
+ }
- Control *from = gui.key_focus ? gui.key_focus : NULL; //hmm
+ Control *from = gui.key_focus ? gui.key_focus : NULL; //hmm
- //keyboard focus
- //if (from && p_event.key.pressed && !p_event.key.mod.alt && !p_event.key.mod.meta && !p_event.key.mod.command) {
+ //keyboard focus
+ //if (from && p_event->is_pressed() && !p_event->get_alt() && !p_event->get_metakey() && !p_event->key->get_command()) {
- if (from && p_event.is_pressed()) {
- Control *next = NULL;
+ if (from && p_event->is_pressed()) {
+ Control *next = NULL;
- if (p_event.is_action("ui_focus_next")) {
+ if (p_event->is_action("ui_focus_next")) {
- next = from->find_next_valid_focus();
- }
-
- if (p_event.is_action("ui_focus_prev")) {
+ next = from->find_next_valid_focus();
+ }
- next = from->find_prev_valid_focus();
- }
+ if (p_event->is_action("ui_focus_prev")) {
- if (p_event.is_action("ui_up")) {
+ next = from->find_prev_valid_focus();
+ }
- next = from->_get_focus_neighbour(MARGIN_TOP);
- }
+ if (p_event->is_action("ui_up")) {
- if (p_event.is_action("ui_left")) {
+ next = from->_get_focus_neighbour(MARGIN_TOP);
+ }
- next = from->_get_focus_neighbour(MARGIN_LEFT);
- }
+ if (p_event->is_action("ui_left")) {
- if (p_event.is_action("ui_right")) {
+ next = from->_get_focus_neighbour(MARGIN_LEFT);
+ }
- next = from->_get_focus_neighbour(MARGIN_RIGHT);
- }
+ if (p_event->is_action("ui_right")) {
- if (p_event.is_action("ui_down")) {
+ next = from->_get_focus_neighbour(MARGIN_RIGHT);
+ }
- next = from->_get_focus_neighbour(MARGIN_BOTTOM);
- }
+ if (p_event->is_action("ui_down")) {
- if (next) {
- next->grab_focus();
- get_tree()->set_input_as_handled();
- }
+ next = from->_get_focus_neighbour(MARGIN_BOTTOM);
}
- } break;
+ if (next) {
+ next->grab_focus();
+ get_tree()->set_input_as_handled();
+ }
+ }
}
}
@@ -2366,33 +2312,30 @@ void Viewport::_gui_grab_click_focus(Control *p_control) {
if (gui.mouse_focus == p_control)
return;
- InputEvent ie;
- ie.type = InputEvent::MOUSE_BUTTON;
- InputEventMouseButton &mb = ie.mouse_button;
+ Ref<InputEventMouseButton> mb;
+ mb.instance();
//send unclic
Point2 click = gui.mouse_focus->get_global_transform_with_canvas().affine_inverse().xform(gui.last_mouse_pos);
- mb.x = click.x;
- mb.y = click.y;
- mb.button_index = gui.mouse_focus_button;
- mb.pressed = false;
- gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, ie);
+ mb->set_pos(click);
+ mb->set_button_index(gui.mouse_focus_button);
+ mb->set_pressed(false);
+ gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, mb);
gui.mouse_focus = p_control;
gui.focus_inv_xform = gui.mouse_focus->get_global_transform_with_canvas().affine_inverse();
click = gui.mouse_focus->get_global_transform_with_canvas().affine_inverse().xform(gui.last_mouse_pos);
- mb.x = click.x;
- mb.y = click.y;
- mb.button_index = gui.mouse_focus_button;
- mb.pressed = true;
- gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, ie);
+ mb->set_pos(click);
+ mb->set_button_index(gui.mouse_focus_button);
+ mb->set_pressed(true);
+ gui.mouse_focus->call_deferred(SceneStringNames::get_singleton()->_gui_input, mb);
}
}
///////////////////////////////
-void Viewport::input(const InputEvent &p_event) {
+void Viewport::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(!is_inside_tree());
@@ -2401,20 +2344,20 @@ void Viewport::input(const InputEvent &p_event) {
//get_tree()->call_group(SceneTree::GROUP_CALL_REVERSE|SceneTree::GROUP_CALL_REALTIME|SceneTree::GROUP_CALL_MULIILEVEL,gui_input_group,"_gui_input",p_event); //special one for GUI, as controls use their own process check
}
-void Viewport::unhandled_input(const InputEvent &p_event) {
+void Viewport::unhandled_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(!is_inside_tree());
get_tree()->_call_input_pause(unhandled_input_group, "_unhandled_input", p_event);
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_input","_unhandled_input",ev);
- if (!get_tree()->input_handled && p_event.type == InputEvent::KEY) {
+ if (!get_tree()->input_handled && p_event->cast_to<InputEventKey>() != NULL) {
get_tree()->_call_input_pause(unhandled_key_input_group, "_unhandled_key_input", p_event);
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_key_input","_unhandled_key_input",ev);
}
if (physics_object_picking && !get_tree()->input_handled) {
- if (p_event.type == InputEvent::MOUSE_BUTTON || p_event.type == InputEvent::MOUSE_MOTION || p_event.type == InputEvent::SCREEN_DRAG || p_event.type == InputEvent::SCREEN_TOUCH) {
+ if (p_event->cast_to<InputEventMouseButton>() || p_event->cast_to<InputEventMouseMotion>() || p_event->cast_to<InputEventScreenDrag>() || p_event->cast_to<InputEventScreenTouch>()) {
physics_picking_events.push_back(p_event);
}
}
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index d784fc8ee9..7470cefb49 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -158,7 +158,7 @@ private:
bool gen_mipmaps;
bool physics_object_picking;
- List<InputEvent> physics_picking_events;
+ List<Ref<InputEvent> > physics_picking_events;
ObjectID physics_object_capture;
ObjectID physics_object_over;
Vector2 physics_last_mousepos;
@@ -237,14 +237,14 @@ private:
bool disable_input;
- void _gui_call_input(Control *p_control, const InputEvent &p_input);
+ void _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input);
void _gui_sort_subwindows();
void _gui_sort_roots();
void _gui_sort_modal_stack();
Control *_gui_find_control(const Point2 &p_global);
Control *_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_global, const Transform2D &p_xform, Transform2D &r_inv_xform);
- void _gui_input_event(InputEvent p_event);
+ void _gui_input_event(Ref<InputEvent> p_event);
void update_worlds();
@@ -253,10 +253,10 @@ private:
void _vp_enter_tree();
void _vp_exit_tree();
- void _vp_input(const InputEvent &p_ev);
+ void _vp_input(const Ref<InputEvent> &p_ev);
void _vp_input_text(const String &p_text);
- void _vp_unhandled_input(const InputEvent &p_ev);
- void _make_input_local(InputEvent &ev);
+ void _vp_unhandled_input(const Ref<InputEvent> &p_ev);
+ Ref<InputEvent> _make_input_local(const Ref<InputEvent> &ev);
friend class Control;
@@ -383,13 +383,13 @@ public:
Vector2 get_camera_rect_size() const;
void queue_screen_capture();
- Image get_screen_capture() const;
+ Ref<Image> get_screen_capture() const;
void set_use_own_world(bool p_world);
bool is_using_own_world() const;
- void input(const InputEvent &p_event);
- void unhandled_input(const InputEvent &p_event);
+ void input(const Ref<InputEvent> &p_event);
+ void unhandled_input(const Ref<InputEvent> &p_event);
void set_disable_input(bool p_disable);
bool is_input_disabled() const;
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 513aa8153d..4c359f73ab 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -212,7 +212,7 @@
#include "scene/resources/environment.h"
#include "scene/3d/area.h"
-#include "scene/3d/baked_light_instance.h"
+
#include "scene/3d/body_shape.h"
#include "scene/3d/immediate_geometry.h"
#include "scene/3d/multimesh_instance.h"
@@ -452,7 +452,7 @@ void register_scene_types() {
ClassDB::register_class<PathFollow>();
ClassDB::register_class<VisibilityNotifier>();
ClassDB::register_class<VisibilityEnabler>();
- ClassDB::register_class<BakedLight>();
+ // ClassDB::register_class<BakedLight>();
//ClassDB::register_type<BakedLightSampler>();
ClassDB::register_class<WorldEnvironment>();
ClassDB::register_class<RemoteTransform>();
@@ -561,8 +561,8 @@ void register_scene_types() {
ClassDB::register_class<Environment>();
ClassDB::register_class<World2D>();
ClassDB::register_virtual_class<Texture>();
- ClassDB::register_virtual_class<SkyBox>();
- ClassDB::register_class<ImageSkyBox>();
+ ClassDB::register_virtual_class<Sky>();
+ ClassDB::register_class<PanoramaSky>();
ClassDB::register_class<StreamTexture>();
ClassDB::register_class<ImageTexture>();
ClassDB::register_class<AtlasTexture>();
diff --git a/scene/resources/baked_light.cpp b/scene/resources/baked_light.cpp
deleted file mode 100644
index 1d896e640a..0000000000
--- a/scene/resources/baked_light.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*************************************************************************/
-/* baked_light.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 "baked_light.h"
-#include "servers/visual_server.h"
diff --git a/scene/resources/baked_light.h b/scene/resources/baked_light.h
deleted file mode 100644
index 8d25c9caa2..0000000000
--- a/scene/resources/baked_light.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************/
-/* baked_light.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 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 BAKED_LIGHT_H
-#define BAKED_LIGHT_H
-
-#include "resource.h"
-#include "scene/resources/texture.h"
-
-#endif // BAKED_LIGHT_H
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index b8a9ea3361..e512f8a968 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -41,16 +41,16 @@ void BitMap::create(const Size2 &p_size) {
zeromem(bitmask.ptr(), bitmask.size());
}
-void BitMap::create_from_image_alpha(const Image &p_image) {
+void BitMap::create_from_image_alpha(const Ref<Image> &p_image) {
- ERR_FAIL_COND(p_image.empty());
- Image img = p_image;
- img.convert(Image::FORMAT_LA8);
- ERR_FAIL_COND(img.get_format() != Image::FORMAT_LA8);
+ ERR_FAIL_COND(p_image.is_null() || p_image->empty());
+ Ref<Image> img = p_image->duplicate();
+ img->convert(Image::FORMAT_LA8);
+ ERR_FAIL_COND(img->get_format() != Image::FORMAT_LA8);
- create(Size2(img.get_width(), img.get_height()));
+ create(Size2(img->get_width(), img->get_height()));
- PoolVector<uint8_t>::Read r = img.get_data().read();
+ PoolVector<uint8_t>::Read r = img->get_data().read();
uint8_t *w = bitmask.ptr();
for (int i = 0; i < width * height; i++) {
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_mask.h
index 78da6ce0d8..5ab7a3134d 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_mask.h
@@ -30,6 +30,7 @@
#ifndef BIT_MASK_H
#define BIT_MASK_H
+#include "image.h"
#include "io/resource_loader.h"
#include "resource.h"
@@ -51,7 +52,7 @@ protected:
public:
void create(const Size2 &p_size);
- void create_from_image_alpha(const Image &p_image);
+ void create_from_image_alpha(const Ref<Image> &p_image);
void set_bit(const Point2 &p_pos, bool p_value);
bool get_bit(const Point2 &p_pos) const;
diff --git a/scene/resources/default_theme/arrow_down.png b/scene/resources/default_theme/arrow_down.png
index 4ef7b41de6..fc837d120a 100644
--- a/scene/resources/default_theme/arrow_down.png
+++ b/scene/resources/default_theme/arrow_down.png
Binary files differ
diff --git a/scene/resources/default_theme/arrow_right.png b/scene/resources/default_theme/arrow_right.png
index 13a42f730d..ebe6e26ace 100644
--- a/scene/resources/default_theme/arrow_right.png
+++ b/scene/resources/default_theme/arrow_right.png
Binary files differ
diff --git a/scene/resources/default_theme/button_disabled.png b/scene/resources/default_theme/button_disabled.png
index 1ee7be0674..d75e76989d 100644
--- a/scene/resources/default_theme/button_disabled.png
+++ b/scene/resources/default_theme/button_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/button_hover.png b/scene/resources/default_theme/button_hover.png
index 5c6c434042..6e609f435f 100644
--- a/scene/resources/default_theme/button_hover.png
+++ b/scene/resources/default_theme/button_hover.png
Binary files differ
diff --git a/scene/resources/default_theme/button_normal.png b/scene/resources/default_theme/button_normal.png
index 3e6c509f5b..92482aaf28 100644
--- a/scene/resources/default_theme/button_normal.png
+++ b/scene/resources/default_theme/button_normal.png
Binary files differ
diff --git a/scene/resources/default_theme/button_pressed.png b/scene/resources/default_theme/button_pressed.png
index 9559126eba..19a7e237aa 100644
--- a/scene/resources/default_theme/button_pressed.png
+++ b/scene/resources/default_theme/button_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/checked.png b/scene/resources/default_theme/checked.png
index aa5e7f6bdb..93e291a29e 100644
--- a/scene/resources/default_theme/checked.png
+++ b/scene/resources/default_theme/checked.png
Binary files differ
diff --git a/scene/resources/default_theme/close.png b/scene/resources/default_theme/close.png
index b6973740e7..5ac6357dcd 100644
--- a/scene/resources/default_theme/close.png
+++ b/scene/resources/default_theme/close.png
Binary files differ
diff --git a/scene/resources/default_theme/close_hl.png b/scene/resources/default_theme/close_hl.png
index b6973740e7..5ac6357dcd 100644
--- a/scene/resources/default_theme/close_hl.png
+++ b/scene/resources/default_theme/close_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 7d134a2c20..7e5065a03b 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -53,20 +53,20 @@ static Ref<StyleBoxTexture> make_stylebox(T p_src, float p_left, float p_top, fl
} else {
texture = Ref<ImageTexture>(memnew(ImageTexture));
- Image img(p_src);
+ Ref<Image> img = memnew(Image(p_src));
if (scale > 1) {
- Size2 orig_size = Size2(img.get_width(), img.get_height());
+ Size2 orig_size = Size2(img->get_width(), img->get_height());
- img.convert(Image::FORMAT_RGBA8);
- img.expand_x2_hq2x();
+ img->convert(Image::FORMAT_RGBA8);
+ img->expand_x2_hq2x();
if (scale != 2.0) {
- img.resize(orig_size.x * scale, orig_size.y * scale);
+ img->resize(orig_size.x * scale, orig_size.y * scale);
}
} else if (scale < 1) {
- Size2 orig_size = Size2(img.get_width(), img.get_height());
- img.convert(Image::FORMAT_RGBA8);
- img.resize(orig_size.x * scale, orig_size.y * scale);
+ Size2 orig_size = Size2(img->get_width(), img->get_height());
+ img->convert(Image::FORMAT_RGBA8);
+ img->resize(orig_size.x * scale, orig_size.y * scale);
}
texture->create_from_image(img, ImageTexture::FLAG_FILTER);
@@ -97,27 +97,23 @@ static Ref<StyleBoxTexture> sb_expand(Ref<StyleBoxTexture> p_sbox, float p_left,
return p_sbox;
}
-static Ref<StyleBoxTexture> sb_expand_default(Ref<StyleBoxTexture> p_sbox) {
- return sb_expand(p_sbox, 0, 0, 0, 0);
-}
-
template <class T>
static Ref<Texture> make_icon(T p_src) {
Ref<ImageTexture> texture(memnew(ImageTexture));
- Image img = Image(p_src);
+ Ref<Image> img = memnew(Image(p_src));
if (scale > 1) {
- Size2 orig_size = Size2(img.get_width(), img.get_height());
+ Size2 orig_size = Size2(img->get_width(), img->get_height());
- img.convert(Image::FORMAT_RGBA8);
- img.expand_x2_hq2x();
+ img->convert(Image::FORMAT_RGBA8);
+ img->expand_x2_hq2x();
if (scale != 2.0) {
- img.resize(orig_size.x * scale, orig_size.y * scale);
+ img->resize(orig_size.x * scale, orig_size.y * scale);
}
} else if (scale < 1) {
- Size2 orig_size = Size2(img.get_width(), img.get_height());
- img.convert(Image::FORMAT_RGBA8);
- img.resize(orig_size.x * scale, orig_size.y * scale);
+ Size2 orig_size = Size2(img->get_width(), img->get_height());
+ img->convert(Image::FORMAT_RGBA8);
+ img->resize(orig_size.x * scale, orig_size.y * scale);
}
texture->create_from_image(img, ImageTexture::FLAG_FILTER);
@@ -162,7 +158,7 @@ static Ref<BitmapFont> make_font2(int p_height, int p_ascent, int p_charcount, c
Ref<BitmapFont> font(memnew(BitmapFont));
- Image image(p_img);
+ Ref<Image> image = memnew(Image(p_img));
Ref<ImageTexture> tex = memnew(ImageTexture);
tex->create_from_image(image);
@@ -217,16 +213,14 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// Font Colors
- Color control_font_color = Color(1, 1, 1, 0.8);
- Color control_font_color_lower = Color(1, 1, 1, 0.32);
- Color control_font_color_low = Color(1, 1, 1, 0.58);
+ Color control_font_color = Color::html("e0e0e0");
+ Color control_font_color_lower = Color::html("a0a0a0");
+ Color control_font_color_low = Color::html("b0b0b0");
Color control_font_color_hover = Color::html("f0f0f0");
- Color control_font_color_disabled = Color::html("425468");
+ Color control_font_color_disabled = Color(0.9, 0.9, 0.9, 0.2);
Color control_font_color_pressed = Color::html("ffffff");
Color font_color_selection = Color::html("7d7d7d");
- Color accent_color = Color::html("7eff8a");
-
// Panel
t->set_stylebox("panel", "Panel", make_stylebox(panel_bg_png, 0, 0, 0, 0));
@@ -240,15 +234,11 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// Button
- Color button_font_color = Color::html("9fb4ca");
- Color button_font_color_hover = Color::html("70b1ff");
- Color button_font_color_disabled = Color::html("425468");
-
- Ref<StyleBox> sb_button_normal = sb_expand_default(make_stylebox(button_normal_png, 6, 6, 6, 6, 6, 4, 6, 4));
- Ref<StyleBox> sb_button_pressed = sb_expand_default(make_stylebox(button_pressed_png, 6, 6, 6, 6, 6, 4, 6, 4));
- Ref<StyleBox> sb_button_hover = sb_expand_default(make_stylebox(button_hover_png, 6, 6, 6, 6, 6, 4, 6, 4));
- Ref<StyleBox> sb_button_disabled = sb_expand_default(make_stylebox(button_disabled_png, 6, 6, 6, 6, 6, 4, 6, 4));
- Ref<StyleBox> sb_button_focus = make_stylebox(focus_png, 6, 6, 6, 6, 6, 2, 6, 2);
+ 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);
t->set_stylebox("normal", "Button", sb_button_normal);
t->set_stylebox("pressed", "Button", sb_button_pressed);
@@ -258,14 +248,12 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_font("font", "Button", default_font);
- t->set_color("font_color", "Button", button_font_color);
- t->set_color("font_color_pressed", "Button", accent_color);
- t->set_color("font_color_hover", "Button", button_font_color_hover);
- t->set_color("font_color_disabled", "Button", button_font_color_disabled);
+ t->set_color("font_color", "Button", control_font_color);
+ t->set_color("font_color_pressed", "Button", control_font_color_pressed);
+ t->set_color("font_color_hover", "Button", control_font_color_hover);
+ t->set_color("font_color_disabled", "Button", control_font_color_disabled);
- t->set_constant("side_margin", "Button", 4 * scale);
- t->set_constant("bottom_margin", "Button", 4 * scale);
- t->set_constant("hseparation", "Button", 4 * scale);
+ t->set_constant("hseparation", "Button", 2 * scale);
// LinkButton
@@ -296,73 +284,66 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// ToolButton
- Ref<StyleBox> tb_empty = memnew(StyleBoxEmpty);
- tb_empty->set_default_margin(MARGIN_LEFT, 6 * scale);
- tb_empty->set_default_margin(MARGIN_RIGHT, 6 * scale);
- tb_empty->set_default_margin(MARGIN_TOP, 4 * scale);
- tb_empty->set_default_margin(MARGIN_BOTTOM, 4 * scale);
-
- t->set_stylebox("normal", "ToolButton", tb_empty);
- t->set_stylebox("pressed", "ToolButton", tb_empty);
- t->set_stylebox("hover", "ToolButton", tb_empty);
- t->set_stylebox("disabled", "ToolButton", tb_empty);
- t->set_stylebox("focus", "ToolButton", tb_empty);
+ t->set_stylebox("normal", "ToolButton", make_empty_stylebox(6, 4, 6, 4));
+ t->set_stylebox("pressed", "ToolButton", make_stylebox(button_pressed_png, 4, 4, 4, 4, 6, 4, 6, 4));
+ t->set_stylebox("hover", "ToolButton", make_stylebox(button_normal_png, 4, 4, 4, 4, 6, 4, 6, 4));
+ t->set_stylebox("disabled", "ToolButton", make_empty_stylebox(6, 4, 6, 4));
+ t->set_stylebox("focus", "ToolButton", focus);
t->set_font("font", "ToolButton", default_font);
t->set_color("font_color", "ToolButton", control_font_color);
- t->set_color("font_color_pressed", "ToolButton", accent_color);
+ t->set_color("font_color_pressed", "ToolButton", control_font_color_pressed);
t->set_color("font_color_hover", "ToolButton", control_font_color_hover);
- t->set_color("font_color_disabled", "ToolButton", button_font_color_disabled);
+ t->set_color("font_color_disabled", "ToolButton", Color(0.9, 0.95, 1, 0.3));
t->set_constant("hseparation", "ToolButton", 3);
// OptionButton
- Ref<StyleBox> sb_optbutton_normal = sb_expand_default(make_stylebox(button_normal_png, 6, 6, 6, 6, 6, 4, 16, 4));
- Ref<StyleBox> sb_optbutton_pressed = sb_expand_default(make_stylebox(button_pressed_png, 6, 6, 6, 6, 6, 4, 16, 4));
- Ref<StyleBox> sb_optbutton_hover = sb_expand_default(make_stylebox(button_hover_png, 6, 6, 6, 6, 6, 4, 16, 4));
- Ref<StyleBox> sb_optbutton_disabled = sb_expand_default(make_stylebox(button_disabled_png, 6, 6, 6, 6, 6, 4, 16, 4));
- Ref<StyleBox> sb_optbutton_focus = focus;
+ Ref<StyleBox> sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 21, 3), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_pressed = sb_expand(make_stylebox(option_button_pressed_png, 4, 4, 21, 4, 6, 3, 21, 3), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_hover = sb_expand(make_stylebox(option_button_hover_png, 4, 4, 21, 4, 6, 2, 21, 2), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_disabled = sb_expand(make_stylebox(option_button_disabled_png, 4, 4, 21, 4, 6, 2, 21, 2), 2, 2, 2, 2);
+ Ref<StyleBox> sb_optbutton_focus = sb_expand(make_stylebox(button_focus_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2);
t->set_stylebox("normal", "OptionButton", sb_optbutton_normal);
t->set_stylebox("pressed", "OptionButton", sb_optbutton_pressed);
t->set_stylebox("hover", "OptionButton", sb_optbutton_hover);
t->set_stylebox("disabled", "OptionButton", sb_optbutton_disabled);
- t->set_stylebox("focus", "OptionButton", sb_optbutton_focus);
+ t->set_stylebox("focus", "OptionButton", sb_button_focus);
t->set_icon("arrow", "OptionButton", make_icon(option_arrow_png));
t->set_font("font", "OptionButton", default_font);
- t->set_color("font_color", "OptionButton", button_font_color);
- t->set_color("font_color_pressed", "OptionButton", accent_color);
- t->set_color("font_color_hover", "OptionButton", button_font_color_hover);
- t->set_color("font_color_disabled", "OptionButton", button_font_color_disabled);
+ t->set_color("font_color", "OptionButton", control_font_color);
+ t->set_color("font_color_pressed", "OptionButton", control_font_color_pressed);
+ t->set_color("font_color_hover", "OptionButton", control_font_color_hover);
+ t->set_color("font_color_disabled", "OptionButton", control_font_color_disabled);
t->set_constant("hseparation", "OptionButton", 2 * scale);
- t->set_constant("arrow_margin", "OptionButton", 8 * scale);
+ t->set_constant("arrow_margin", "OptionButton", 2 * scale);
// MenuButton
- t->set_stylebox("normal", "MenuButton", tb_empty);
- t->set_stylebox("pressed", "MenuButton", tb_empty);
- t->set_stylebox("hover", "MenuButton", tb_empty);
+ t->set_stylebox("normal", "MenuButton", sb_button_normal);
+ t->set_stylebox("pressed", "MenuButton", sb_button_pressed);
+ t->set_stylebox("hover", "MenuButton", sb_button_pressed);
t->set_stylebox("disabled", "MenuButton", make_empty_stylebox(0, 0, 0, 0));
- t->set_stylebox("focus", "MenuButton", tb_empty);
+ t->set_stylebox("focus", "MenuButton", sb_button_focus);
t->set_font("font", "MenuButton", default_font);
t->set_color("font_color", "MenuButton", control_font_color);
- t->set_color("font_color_pressed", "MenuButton", accent_color);
+ t->set_color("font_color_pressed", "MenuButton", control_font_color_pressed);
t->set_color("font_color_hover", "MenuButton", control_font_color_hover);
- t->set_color("font_color_disabled", "MenuButton", button_font_color_disabled);
- t->set_color("font_color_focus", "MenuButton", accent_color);
+ t->set_color("font_color_disabled", "MenuButton", Color(1, 1, 1, 0.3));
t->set_constant("hseparation", "MenuButton", 3 * scale);
// ButtonGroup
- t->set_stylebox("panel", "ButtonGroup", make_stylebox(button_group_png, 16, 16, 16, 16, 8, 4, 8, 4));
+ t->set_stylebox("panel", "ButtonGroup", memnew(StyleBoxEmpty));
// CheckBox
@@ -429,7 +410,7 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_font("font", "Label", default_font);
- t->set_color("font_color", "Label", control_font_color_low);
+ t->set_color("font_color", "Label", Color(1, 1, 1));
t->set_color("font_color_shadow", "Label", Color(0, 0, 0, 0));
t->set_constant("shadow_offset_x", "Label", 1 * scale);
@@ -439,21 +420,15 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// LineEdit
- Ref<StyleBoxTexture> sb_line_edit = sb_expand_default(make_stylebox(line_edit_png, 6, 6, 6, 6, 6, 4, 6, 4));
- t->set_stylebox("normal", "LineEdit", sb_line_edit);
- Ref<StyleBoxTexture> sb_line_edit_active = sb_expand_default(make_stylebox(line_edit_active_png, 6, 6, 6, 6, 6, 4, 6, 4));
- t->set_stylebox("active", "LineEdit", sb_line_edit_active);
+ t->set_stylebox("normal", "LineEdit", make_stylebox(line_edit_png, 5, 5, 5, 5));
t->set_stylebox("focus", "LineEdit", focus);
- Ref<StyleBoxTexture> sb_line_edit_disabled = sb_expand_default(make_stylebox(line_edit_disabled_png, 6, 6, 6, 6, 6, 4, 6, 4));
- t->set_stylebox("read_only", "LineEdit", sb_line_edit_disabled);
+ t->set_stylebox("read_only", "LineEdit", make_stylebox(line_edit_disabled_png, 6, 6, 6, 6));
t->set_font("font", "LineEdit", default_font);
- t->set_color("font_color", "LineEdit", button_font_color);
- t->set_color("font_color_selected", "LineEdit", button_font_color);
- t->set_color("font_color_active", "LineEdit", accent_color);
- t->set_color("font_color_read_only", "LineEdit", button_font_color_disabled);
- t->set_color("cursor_color", "LineEdit", button_font_color);
+ t->set_color("font_color", "LineEdit", control_font_color);
+ t->set_color("font_color_selected", "LineEdit", Color(0, 0, 0));
+ t->set_color("cursor_color", "LineEdit", control_font_color_hover);
t->set_color("selection_color", "LineEdit", font_color_selection);
t->set_constant("minimum_spaces", "LineEdit", 12 * scale);
@@ -470,9 +445,9 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// TextEdit
- t->set_stylebox("normal", "TextEdit", make_stylebox(tree_bg_png, 6, 6, 6, 6));
+ t->set_stylebox("normal", "TextEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3));
t->set_stylebox("focus", "TextEdit", focus);
- t->set_stylebox("completion", "TextEdit", make_stylebox(tree_bg_png, 6, 6, 6, 6));
+ t->set_stylebox("completion", "TextEdit", make_stylebox(tree_bg_png, 3, 3, 3, 3));
t->set_icon("tab", "TextEdit", make_icon(tab_png));
@@ -512,43 +487,43 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_stylebox("scroll", "HScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
t->set_stylebox("scroll_focus", "HScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
t->set_stylebox("grabber", "HScrollBar", make_stylebox(scroll_grabber_png, 5, 5, 5, 5, 2, 2, 2, 2));
- t->set_stylebox("grabber_hilite", "HScrollBar", make_stylebox(scroll_grabber_hl_png, 5, 5, 5, 5, 2, 2, 2, 2));
+ t->set_stylebox("grabber_highlight", "HScrollBar", make_stylebox(scroll_grabber_hl_png, 5, 5, 5, 5, 2, 2, 2, 2));
t->set_icon("increment", "HScrollBar", empty_icon);
- t->set_icon("increment_hilite", "HScrollBar", empty_icon);
+ t->set_icon("increment_highlight", "HScrollBar", empty_icon);
t->set_icon("decrement", "HScrollBar", empty_icon);
- t->set_icon("decrement_hilite", "HScrollBar", empty_icon);
+ t->set_icon("decrement_highlight", "HScrollBar", empty_icon);
// VScrollBar
t->set_stylebox("scroll", "VScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
t->set_stylebox("scroll_focus", "VScrollBar", make_stylebox(scroll_bg_png, 5, 5, 5, 5, 0, 0, 0, 0));
t->set_stylebox("grabber", "VScrollBar", make_stylebox(scroll_grabber_png, 5, 5, 5, 5, 2, 2, 2, 2));
- t->set_stylebox("grabber_hilite", "VScrollBar", make_stylebox(scroll_grabber_hl_png, 5, 5, 5, 5, 2, 2, 2, 2));
+ t->set_stylebox("grabber_highlight", "VScrollBar", make_stylebox(scroll_grabber_hl_png, 5, 5, 5, 5, 2, 2, 2, 2));
t->set_icon("increment", "VScrollBar", empty_icon);
- t->set_icon("increment_hilite", "VScrollBar", empty_icon);
+ t->set_icon("increment_highlight", "VScrollBar", empty_icon);
t->set_icon("decrement", "VScrollBar", empty_icon);
- t->set_icon("decrement_hilite", "VScrollBar", empty_icon);
+ t->set_icon("decrement_highlight", "VScrollBar", empty_icon);
// HSlider
t->set_stylebox("slider", "HSlider", make_stylebox(hslider_bg_png, 4, 4, 4, 4));
- t->set_stylebox("grabber_hilite", "HSlider", make_stylebox(hslider_grabber_hl_png, 6, 6, 6, 6));
+ t->set_stylebox("grabber_highlight", "HSlider", make_stylebox(hslider_grabber_hl_png, 6, 6, 6, 6));
t->set_stylebox("focus", "HSlider", focus);
t->set_icon("grabber", "HSlider", make_icon(hslider_grabber_png));
- t->set_icon("grabber_hilite", "HSlider", make_icon(hslider_grabber_hl_png));
+ t->set_icon("grabber_highlight", "HSlider", make_icon(hslider_grabber_hl_png));
t->set_icon("tick", "HSlider", make_icon(hslider_tick_png));
// VSlider
t->set_stylebox("slider", "VSlider", make_stylebox(vslider_bg_png, 4, 4, 4, 4));
- t->set_stylebox("grabber_hilite", "VSlider", make_stylebox(vslider_grabber_hl_png, 6, 6, 6, 6));
+ t->set_stylebox("grabber_highlight", "VSlider", make_stylebox(vslider_grabber_hl_png, 6, 6, 6, 6));
t->set_stylebox("focus", "HSlider", focus);
t->set_icon("grabber", "VSlider", make_icon(vslider_grabber_png));
- t->set_icon("grabber_hilite", "VSlider", make_icon(vslider_grabber_hl_png));
+ t->set_icon("grabber_highlight", "VSlider", make_icon(vslider_grabber_hl_png));
t->set_icon("tick", "VSlider", make_icon(vslider_tick_png));
// SpinBox
@@ -557,25 +532,17 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// WindowDialog
- Ref<StyleBoxTexture> style_pp_win = make_stylebox(popup_window_png, 8, 8, 8, 8, 8, 30, 8, 8);
-
- t->set_stylebox("panel", "WindowDialog", style_pp_win);
+ t->set_stylebox("panel", "WindowDialog", sb_expand(make_stylebox(popup_window_png, 10, 26, 10, 8), 8, 24, 8, 6));
t->set_constant("scaleborder_size", "WindowDialog", 4 * scale);
- t->set_icon("close", "WindowDialog", make_icon(close_png));
- t->set_icon("close_hilite", "WindowDialog", make_icon(close_hl_png));
-
t->set_font("title_font", "WindowDialog", large_font);
-
- t->set_color("title_color", "WindowDialog", Color::html("dae0e6"));
-
- t->set_constant("close_h_ofs", "WindowDialog", 20 * scale);
- t->set_constant("close_v_ofs", "WindowDialog", 20 * scale);
- t->set_constant("titlebar_height", "WindowDialog", 20 * scale);
+ t->set_color("title_color", "WindowDialog", Color(0, 0, 0));
t->set_constant("title_height", "WindowDialog", 20 * scale);
t->set_icon("close", "WindowDialog", make_icon(close_png));
- t->set_icon("close_hilite", "WindowDialog", make_icon(close_hl_png));
+ t->set_icon("close_highlight", "WindowDialog", make_icon(close_hl_png));
+ t->set_constant("close_h_ofs", "WindowDialog", 18 * scale);
+ t->set_constant("close_v_ofs", "WindowDialog", 18 * scale);
// File Dialog
@@ -583,9 +550,9 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// Popup
- Ref<StyleBoxTexture> style_pp = sb_expand(make_stylebox(popup_bg_png, 6, 6, 6, 6, 4, 4, 4, 4), 2, 2, 2, 2);
+ 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, 7, 6, 7);
+ Ref<StyleBoxTexture> selected = make_stylebox(selection_png, 6, 6, 6, 6);
for (int i = 0; i < 4; i++) {
selected->set_expand_margin_size(Margin(i), 2 * scale);
}
@@ -646,16 +613,16 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// Tree
- Ref<StyleBoxTexture> tree_selected = make_stylebox(selection_png, 6, 7, 6, 7, 8, 0, 8, 0);
- Ref<StyleBoxTexture> tree_selected_oof = make_stylebox(selection_oof_png, 6, 6, 6, 6, 8, 0, 8, 0);
+ 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);
- t->set_stylebox("bg", "Tree", make_stylebox(tree_bg_png, 6, 6, 6, 6));
+ t->set_stylebox("bg", "Tree", make_stylebox(tree_bg_png, 4, 4, 4, 5));
t->set_stylebox("bg_focus", "Tree", focus);
t->set_stylebox("selected", "Tree", tree_selected_oof);
t->set_stylebox("selected_focus", "Tree", tree_selected);
t->set_stylebox("cursor", "Tree", focus);
t->set_stylebox("cursor_unfocused", "Tree", focus);
- t->set_stylebox("button_pressed", "Tree", make_stylebox(button_pressed_png, 6, 6, 6, 6));
+ t->set_stylebox("button_pressed", "Tree", make_stylebox(button_pressed_png, 4, 4, 4, 4));
t->set_stylebox("title_button_normal", "Tree", make_stylebox(tree_title_png, 4, 4, 4, 4));
t->set_stylebox("title_button_pressed", "Tree", make_stylebox(tree_title_pressed_png, 4, 4, 4, 4));
t->set_stylebox("title_button_hover", "Tree", make_stylebox(tree_title_png, 4, 4, 4, 4));
@@ -673,12 +640,11 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_color("title_button_color", "Tree", control_font_color);
t->set_color("font_color", "Tree", control_font_color_low);
t->set_color("font_color_selected", "Tree", control_font_color_pressed);
- t->set_color("button_pressed", "Tree", accent_color);
- t->set_color("selection_color", "Tree", Color(0, 0, 0, 0.8));
+ t->set_color("selection_color", "Tree", Color(0.1, 0.1, 1, 0.8));
t->set_color("cursor_color", "Tree", Color(0, 0, 0));
t->set_color("guide_color", "Tree", Color(0, 0, 0, 0.1));
- t->set_color("drop_position_color", "Tree", Color(0, 0, 0, 0.2));
- t->set_color("relationship_line_color", "Tree", Color(0, 0, 0, 0.1));
+ t->set_color("drop_position_color", "Tree", Color(1, 0.3, 0.2));
+ t->set_color("relationship_line_color", "Tree", Color::html("464646"));
t->set_constant("hseparation", "Tree", 4 * scale);
t->set_constant("vseparation", "Tree", 4 * scale);
@@ -690,10 +656,10 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_constant("scroll_speed", "Tree", 12);
// ItemList
- Ref<StyleBoxTexture> item_selected = make_stylebox(selection_png, 6, 7, 6, 7, 8, 2, 4, 2);
- Ref<StyleBoxTexture> item_selected_oof = make_stylebox(selection_oof_png, 6, 6, 6, 6, 8, 2, 4, 2);
+ 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);
- t->set_stylebox("bg", "ItemList", make_stylebox(tree_bg_png, 6, 6, 6, 6));
+ t->set_stylebox("bg", "ItemList", make_stylebox(tree_bg_png, 4, 4, 4, 5));
t->set_stylebox("bg_focus", "ItemList", focus);
t->set_constant("hseparation", "ItemList", 4);
t->set_constant("vseparation", "ItemList", 2);
@@ -710,25 +676,25 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// TabContainer
- Ref<StyleBoxTexture> tc_sb = sb_expand(make_stylebox(tab_container_bg_png, 6, 6, 6, 6, 4, 4, 4, 4), 3, 3, 3, 3);
+ 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(MARGIN_TOP, 2 * scale);
tc_sb->set_default_margin(MARGIN_TOP, 8 * scale);
- t->set_stylebox("tab_fg", "TabContainer", sb_expand(make_stylebox(tab_current_png, 6, 6, 6, 0, 16, 8, 16, 8), 2, 2, 2, 2));
- t->set_stylebox("tab_bg", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 8, 16, 8), 3, 0, 3, 3));
+ t->set_stylebox("tab_fg", "TabContainer", sb_expand(make_stylebox(tab_current_png, 4, 4, 4, 1, 16, 4, 16, 4), 2, 2, 2, 2));
+ t->set_stylebox("tab_bg", "TabContainer", sb_expand(make_stylebox(tab_behind_png, 5, 5, 5, 1, 16, 6, 16, 4), 3, 0, 3, 3));
t->set_stylebox("panel", "TabContainer", tc_sb);
t->set_icon("increment", "TabContainer", make_icon(scroll_button_right_png));
- t->set_icon("increment_hilite", "TabContainer", make_icon(scroll_button_right_hl_png));
+ t->set_icon("increment_highlight", "TabContainer", make_icon(scroll_button_right_hl_png));
t->set_icon("decrement", "TabContainer", make_icon(scroll_button_left_png));
- t->set_icon("decrement_hilite", "TabContainer", make_icon(scroll_button_left_hl_png));
+ t->set_icon("decrement_highlight", "TabContainer", make_icon(scroll_button_left_hl_png));
t->set_icon("menu", "TabContainer", make_icon(tab_menu_png));
- t->set_icon("menu_hilite", "TabContainer", make_icon(tab_menu_hl_png));
+ t->set_icon("menu_highlight", "TabContainer", make_icon(tab_menu_hl_png));
t->set_font("font", "TabContainer", default_font);
- t->set_color("font_color_fg", "TabContainer", control_font_color);
+ t->set_color("font_color_fg", "TabContainer", control_font_color_hover);
t->set_color("font_color_bg", "TabContainer", control_font_color_low);
t->set_color("font_color_disabled", "TabContainer", control_font_color_disabled);
@@ -740,30 +706,21 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
// Tabs
- t->set_stylebox("tab_fg", "Tabs", sb_expand(make_stylebox(tab_current_png, 6, 6, 6, 0, 16, 8, 16, 8), 2, 2, 2, 2));
- // tc_sb->set_expand_margin_size(MARGIN_TOP,2 *scale);
- t->set_stylebox("tab_bg", "Tabs", sb_expand(make_stylebox(tab_behind_png, 5, 4, 5, 1, 16, 8, 16, 8), 2, 2, 2, 2));
+ t->set_stylebox("tab_fg", "Tabs", sb_expand(make_stylebox(tab_current_png, 4, 3, 4, 1, 16, 3, 16, 2), 2, 2, 2, 2));
+ t->set_stylebox("tab_bg", "Tabs", sb_expand(make_stylebox(tab_behind_png, 5, 4, 5, 1, 16, 5, 16, 2), 3, 3, 3, 3));
t->set_stylebox("panel", "Tabs", tc_sb);
- t->set_stylebox("button_pressed", "Tabs", make_stylebox(button_pressed_png, 6, 6, 6, 6));
- t->set_stylebox("button", "Tabs", make_stylebox(button_normal_png, 6, 6, 6, 6));
+ t->set_stylebox("button_pressed", "Tabs", make_stylebox(button_pressed_png, 4, 4, 4, 4));
+ t->set_stylebox("button", "Tabs", make_stylebox(button_normal_png, 4, 4, 4, 4));
t->set_icon("increment", "Tabs", make_icon(scroll_button_right_png));
- t->set_icon("increment_hilite", "Tabs", make_icon(scroll_button_right_hl_png));
+ t->set_icon("increment_highlight", "Tabs", make_icon(scroll_button_right_hl_png));
t->set_icon("decrement", "Tabs", make_icon(scroll_button_left_png));
- t->set_icon("decrement_hilite", "Tabs", make_icon(scroll_button_left_hl_png));
+ t->set_icon("decrement_highlight", "Tabs", make_icon(scroll_button_left_hl_png));
t->set_icon("close", "Tabs", make_icon(tab_close_png));
t->set_font("font", "Tabs", default_font);
- t->set_icon("increment", "Tabs", make_icon(scroll_button_right_png));
- t->set_icon("increment_hilite", "Tabs", make_icon(scroll_button_right_hl_png));
- t->set_icon("decrement", "Tabs", make_icon(scroll_button_left_png));
- t->set_icon("decrement_hilite", "Tabs", make_icon(scroll_button_left_hl_png));
- t->set_icon("close", "Tabs", make_icon(tab_close_png));
-
- t->set_font("font", "Tabs", default_font);
-
- t->set_color("font_color_fg", "Tabs", control_font_color);
+ t->set_color("font_color_fg", "Tabs", control_font_color_hover);
t->set_color("font_color_bg", "Tabs", control_font_color_low);
t->set_color("font_color_disabled", "Tabs", control_font_color_disabled);
@@ -781,8 +738,8 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_font("normal", "Fonts", default_font);
t->set_font("large", "Fonts", large_font);
- t->set_constant("separation", "HSeparator", 16 * scale);
- t->set_constant("separation", "VSeparator", 16 * scale);
+ t->set_constant("separation", "HSeparator", 4 * scale);
+ t->set_constant("separation", "VSeparator", 4 * scale);
// Dialogs
@@ -851,12 +808,12 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_constant("separation", "HBoxContainer", 4 * scale);
t->set_constant("separation", "VBoxContainer", 4 * scale);
- t->set_constant("margin_left", "MarginContainer", 0 * scale);
+ t->set_constant("margin_left", "MarginContainer", 8 * scale);
t->set_constant("margin_top", "MarginContainer", 0 * scale);
t->set_constant("margin_right", "MarginContainer", 0 * scale);
t->set_constant("margin_bottom", "MarginContainer", 0 * scale);
- t->set_constant("hseparation", "GridContainer", 14 * scale);
- t->set_constant("vseparation", "GridContainer", 8 * scale);
+ t->set_constant("hseparation", "GridContainer", 4 * scale);
+ t->set_constant("vseparation", "GridContainer", 4 * scale);
t->set_constant("separation", "HSplitContainer", 12 * scale);
t->set_constant("separation", "VSplitContainer", 12 * scale);
t->set_constant("autohide", "HSplitContainer", 1 * scale);
@@ -904,19 +861,8 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_stylebox("panelnc", "Panel", ttnc);
t->set_stylebox("panelf", "Panel", tc_sb);
- Ref<StyleBoxTexture> sb_pc = make_stylebox(tab_container_bg_png, 6, 6, 6, 6, 7, 7, 7, 7);
+ Ref<StyleBoxTexture> sb_pc = make_stylebox(tab_container_bg_png, 4, 4, 4, 4, 7, 7, 7, 7);
t->set_stylebox("panel", "PanelContainer", sb_pc);
- t->set_stylebox("panel_full", "PanelContainer", make_stylebox(tab_container_bg_png, 4, 4, 4, 4, 2, 7, 2, 0));
-
- t->set_icon("minus", "GraphEdit", make_icon(icon_zoom_less_png));
- t->set_icon("reset", "GraphEdit", make_icon(icon_zoom_reset_png));
- t->set_icon("more", "GraphEdit", make_icon(icon_zoom_more_png));
- t->set_icon("snap", "GraphEdit", make_icon(icon_snap_png));
- t->set_stylebox("bg", "GraphEdit", make_stylebox(tree_bg_png, 6, 6, 6, 6));
- t->set_color("grid_minor", "GraphEdit", Color(1, 1, 1, 0.05));
- t->set_color("grid_major", "GraphEdit", Color(1, 1, 1, 0.2));
- t->set_constant("bezier_len_pos", "GraphEdit", 80 * scale);
- t->set_constant("bezier_len_neg", "GraphEdit", 160 * scale);
t->set_icon("minus", "GraphEdit", make_icon(icon_zoom_less_png));
t->set_icon("reset", "GraphEdit", make_icon(icon_zoom_reset_png));
@@ -930,18 +876,6 @@ void fill_default_theme(Ref<Theme> &t, const Ref<Font> &default_font, const Ref<
t->set_icon("logo", "Icons", make_icon(logo_png));
- // Editor
- t->set_color("prop_category", "Editor", Color::html("232b33"));
- t->set_color("prop_section", "Editor", Color(0, 0, 0, 0.1));
- t->set_color("prop_subsection", "Editor", Color::html("272f39"));
- t->set_color("fg_selected", "Editor", Color::html("ffbd8e8e"));
- t->set_color("fg_error", "Editor", Color::html("ffbd8e8e"));
-
- t->set_color("animation_editor_track_pos", "Editor", accent_color);
- t->set_color("animation_editor_time", "Editor", Color(1, 1, 1, 0.1));
- t->set_color("animation_editor_selection_rect", "Editor", Color(1, 1, 1, 0.5));
- t->set_color("animation_editor_line", "Editor", Color(1, 1, 1, 0.1));
-
// Theme
default_icon = make_icon(error_icon_png);
diff --git a/scene/resources/default_theme/dropdown.png b/scene/resources/default_theme/dropdown.png
index b9a324be7c..3a6a2ed778 100644
--- a/scene/resources/default_theme/dropdown.png
+++ b/scene/resources/default_theme/dropdown.png
Binary files differ
diff --git a/scene/resources/default_theme/focus.png b/scene/resources/default_theme/focus.png
index 1908fd8aee..5d37028f2d 100644
--- a/scene/resources/default_theme/focus.png
+++ b/scene/resources/default_theme/focus.png
Binary files differ
diff --git a/scene/resources/default_theme/frame_focus.png b/scene/resources/default_theme/frame_focus.png
index 1908fd8aee..9170db38ed 100644
--- a/scene/resources/default_theme/frame_focus.png
+++ b/scene/resources/default_theme/frame_focus.png
Binary files differ
diff --git a/scene/resources/default_theme/full_panel_bg.png b/scene/resources/default_theme/full_panel_bg.png
index c6e59b747c..7f02dc7259 100644
--- a/scene/resources/default_theme/full_panel_bg.png
+++ b/scene/resources/default_theme/full_panel_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/graph_node.png b/scene/resources/default_theme/graph_node.png
index c7e374693c..d4b4dd3c1f 100644
--- a/scene/resources/default_theme/graph_node.png
+++ b/scene/resources/default_theme/graph_node.png
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_comment.png b/scene/resources/default_theme/graph_node_comment.png
index 0452cb1b1d..f2d6daa259 100644
--- a/scene/resources/default_theme/graph_node_comment.png
+++ b/scene/resources/default_theme/graph_node_comment.png
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
index 49127da092..a4b7b5a618 100644
--- a/scene/resources/default_theme/graph_node_comment_focus.png
+++ b/scene/resources/default_theme/graph_node_comment_focus.png
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_position.png b/scene/resources/default_theme/graph_node_position.png
index 76a213be72..7ec15e2ff4 100644
--- a/scene/resources/default_theme/graph_node_position.png
+++ b/scene/resources/default_theme/graph_node_position.png
Binary files differ
diff --git a/scene/resources/default_theme/graph_node_selected.png b/scene/resources/default_theme/graph_node_selected.png
index 0e22312e6a..f76c9703dd 100644
--- a/scene/resources/default_theme/graph_node_selected.png
+++ b/scene/resources/default_theme/graph_node_selected.png
Binary files differ
diff --git a/scene/resources/default_theme/hseparator.png b/scene/resources/default_theme/hseparator.png
index 88165ea6b2..99609ac118 100644
--- a/scene/resources/default_theme/hseparator.png
+++ b/scene/resources/default_theme/hseparator.png
Binary files differ
diff --git a/scene/resources/default_theme/hslider_bg.png b/scene/resources/default_theme/hslider_bg.png
index a66e136813..9c2a2df62a 100644
--- a/scene/resources/default_theme/hslider_bg.png
+++ b/scene/resources/default_theme/hslider_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber.png b/scene/resources/default_theme/hslider_grabber.png
index c8be897e07..2acd33879a 100644
--- a/scene/resources/default_theme/hslider_grabber.png
+++ b/scene/resources/default_theme/hslider_grabber.png
Binary files differ
diff --git a/scene/resources/default_theme/hslider_grabber_hl.png b/scene/resources/default_theme/hslider_grabber_hl.png
index 1639776a28..f8a011e64b 100644
--- a/scene/resources/default_theme/hslider_grabber_hl.png
+++ b/scene/resources/default_theme/hslider_grabber_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/hsplit_bg.png b/scene/resources/default_theme/hsplit_bg.png
index cfb76f7dc7..7dd1d48b29 100644
--- a/scene/resources/default_theme/hsplit_bg.png
+++ b/scene/resources/default_theme/hsplit_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/hsplitter.png b/scene/resources/default_theme/hsplitter.png
index 3ac1dddf90..71a3914d7e 100644
--- a/scene/resources/default_theme/hsplitter.png
+++ b/scene/resources/default_theme/hsplitter.png
Binary files differ
diff --git a/scene/resources/default_theme/icon_close.png b/scene/resources/default_theme/icon_close.png
index b6973740e7..5ac6357dcd 100644
--- a/scene/resources/default_theme/icon_close.png
+++ b/scene/resources/default_theme/icon_close.png
Binary files differ
diff --git a/scene/resources/default_theme/line_edit.png b/scene/resources/default_theme/line_edit.png
index 339a796390..bf2b91f1be 100644
--- a/scene/resources/default_theme/line_edit.png
+++ b/scene/resources/default_theme/line_edit.png
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_active.png b/scene/resources/default_theme/line_edit_active.png
deleted file mode 100644
index b6bebde925..0000000000
--- a/scene/resources/default_theme/line_edit_active.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_disabled.png b/scene/resources/default_theme/line_edit_disabled.png
index 1fce186f3d..a0fa505e4c 100644
--- a/scene/resources/default_theme/line_edit_disabled.png
+++ b/scene/resources/default_theme/line_edit_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_focus.png b/scene/resources/default_theme/line_edit_focus.png
new file mode 100644
index 0000000000..e66d7b60e3
--- /dev/null
+++ b/scene/resources/default_theme/line_edit_focus.png
Binary files differ
diff --git a/scene/resources/default_theme/line_edit_selected.png b/scene/resources/default_theme/line_edit_selected.png
deleted file mode 100644
index b6bebde925..0000000000
--- a/scene/resources/default_theme/line_edit_selected.png
+++ /dev/null
Binary files differ
diff --git a/scene/resources/default_theme/option_arrow.png b/scene/resources/default_theme/option_arrow.png
index b7bc38e03f..007de16bfa 100644
--- a/scene/resources/default_theme/option_arrow.png
+++ b/scene/resources/default_theme/option_arrow.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_disabled.png b/scene/resources/default_theme/option_button_disabled.png
index d8e7942eaa..ce727d56e1 100644
--- a/scene/resources/default_theme/option_button_disabled.png
+++ b/scene/resources/default_theme/option_button_disabled.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_focus.png b/scene/resources/default_theme/option_button_focus.png
new file mode 100644
index 0000000000..c76d91287e
--- /dev/null
+++ b/scene/resources/default_theme/option_button_focus.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_hover.png b/scene/resources/default_theme/option_button_hover.png
index 2f67922f92..fd1e987ceb 100644
--- a/scene/resources/default_theme/option_button_hover.png
+++ b/scene/resources/default_theme/option_button_hover.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_normal.png b/scene/resources/default_theme/option_button_normal.png
index 6f14414b41..9d7fb98d1c 100644
--- a/scene/resources/default_theme/option_button_normal.png
+++ b/scene/resources/default_theme/option_button_normal.png
Binary files differ
diff --git a/scene/resources/default_theme/option_button_pressed.png b/scene/resources/default_theme/option_button_pressed.png
index 7ca71c44db..28b1d93468 100644
--- a/scene/resources/default_theme/option_button_pressed.png
+++ b/scene/resources/default_theme/option_button_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/panel_bg.png b/scene/resources/default_theme/panel_bg.png
index c6db700766..320819ad6d 100644
--- a/scene/resources/default_theme/panel_bg.png
+++ b/scene/resources/default_theme/panel_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_bg.png b/scene/resources/default_theme/popup_bg.png
index d8c633974a..63f5994441 100644
--- a/scene/resources/default_theme/popup_bg.png
+++ b/scene/resources/default_theme/popup_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_hover.png b/scene/resources/default_theme/popup_hover.png
new file mode 100644
index 0000000000..85d4e48475
--- /dev/null
+++ b/scene/resources/default_theme/popup_hover.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_unchecked.png b/scene/resources/default_theme/popup_unchecked.png
new file mode 100644
index 0000000000..c1137e6fbf
--- /dev/null
+++ b/scene/resources/default_theme/popup_unchecked.png
Binary files differ
diff --git a/scene/resources/default_theme/popup_window.png b/scene/resources/default_theme/popup_window.png
index e667c93d2f..59362a8ffd 100644
--- a/scene/resources/default_theme/popup_window.png
+++ b/scene/resources/default_theme/popup_window.png
Binary files differ
diff --git a/scene/resources/default_theme/progress_bar.png b/scene/resources/default_theme/progress_bar.png
index d3e1838248..bf81e3adea 100644
--- a/scene/resources/default_theme/progress_bar.png
+++ b/scene/resources/default_theme/progress_bar.png
Binary files differ
diff --git a/scene/resources/default_theme/progress_fill.png b/scene/resources/default_theme/progress_fill.png
index c211b0a74d..3a34dfdda6 100644
--- a/scene/resources/default_theme/progress_fill.png
+++ b/scene/resources/default_theme/progress_fill.png
Binary files differ
diff --git a/scene/resources/default_theme/radio_checked.png b/scene/resources/default_theme/radio_checked.png
index 963cf76e98..95d472022f 100644
--- a/scene/resources/default_theme/radio_checked.png
+++ b/scene/resources/default_theme/radio_checked.png
Binary files differ
diff --git a/scene/resources/default_theme/radio_unchecked.png b/scene/resources/default_theme/radio_unchecked.png
index 0b90989037..7f0535c3a4 100644
--- a/scene/resources/default_theme/radio_unchecked.png
+++ b/scene/resources/default_theme/radio_unchecked.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_bg.png b/scene/resources/default_theme/scroll_bg.png
index 1908fd8aee..cefadb2c08 100644
--- a/scene/resources/default_theme/scroll_bg.png
+++ b/scene/resources/default_theme/scroll_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_down.png b/scene/resources/default_theme/scroll_button_down.png
index a901bc8c70..caeac9b286 100644
--- a/scene/resources/default_theme/scroll_button_down.png
+++ b/scene/resources/default_theme/scroll_button_down.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_down_hl.png b/scene/resources/default_theme/scroll_button_down_hl.png
index 4e36bb924a..48036e0297 100644
--- a/scene/resources/default_theme/scroll_button_down_hl.png
+++ b/scene/resources/default_theme/scroll_button_down_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left.png b/scene/resources/default_theme/scroll_button_left.png
index ab32b9deb1..3b50938d97 100644
--- a/scene/resources/default_theme/scroll_button_left.png
+++ b/scene/resources/default_theme/scroll_button_left.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_left_hl.png b/scene/resources/default_theme/scroll_button_left_hl.png
index 7a9ff6ac0a..b3d348c24f 100644
--- a/scene/resources/default_theme/scroll_button_left_hl.png
+++ b/scene/resources/default_theme/scroll_button_left_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_right.png b/scene/resources/default_theme/scroll_button_right.png
index 3699c2cdf7..1c622a41ad 100644
--- a/scene/resources/default_theme/scroll_button_right.png
+++ b/scene/resources/default_theme/scroll_button_right.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_right_hl.png b/scene/resources/default_theme/scroll_button_right_hl.png
index 37195daadd..108796ca02 100644
--- a/scene/resources/default_theme/scroll_button_right_hl.png
+++ b/scene/resources/default_theme/scroll_button_right_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_up.png b/scene/resources/default_theme/scroll_button_up.png
index a88d17e1c5..2c8238ae4c 100644
--- a/scene/resources/default_theme/scroll_button_up.png
+++ b/scene/resources/default_theme/scroll_button_up.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_button_up_hl.png b/scene/resources/default_theme/scroll_button_up_hl.png
index 04ce402964..4283bd114a 100644
--- a/scene/resources/default_theme/scroll_button_up_hl.png
+++ b/scene/resources/default_theme/scroll_button_up_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_grabber.png b/scene/resources/default_theme/scroll_grabber.png
index 4be7f4e6cc..1d625a9b7b 100644
--- a/scene/resources/default_theme/scroll_grabber.png
+++ b/scene/resources/default_theme/scroll_grabber.png
Binary files differ
diff --git a/scene/resources/default_theme/scroll_grabber_hl.png b/scene/resources/default_theme/scroll_grabber_hl.png
index 8d0a15ac58..99eb24b7e7 100644
--- a/scene/resources/default_theme/scroll_grabber_hl.png
+++ b/scene/resources/default_theme/scroll_grabber_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/selection.png b/scene/resources/default_theme/selection.png
index 1aa4ffa86f..501877a8b4 100644
--- a/scene/resources/default_theme/selection.png
+++ b/scene/resources/default_theme/selection.png
Binary files differ
diff --git a/scene/resources/default_theme/selection_oof.png b/scene/resources/default_theme/selection_oof.png
index 7b485eec3b..9594fe0913 100644
--- a/scene/resources/default_theme/selection_oof.png
+++ b/scene/resources/default_theme/selection_oof.png
Binary files differ
diff --git a/scene/resources/default_theme/source/arrow_down.svg b/scene/resources/default_theme/source/arrow_down.svg
index 1dd209720f..354040b548 100644
--- a/scene/resources/default_theme/source/arrow_down.svg
+++ b/scene/resources/default_theme/source/arrow_down.svg
@@ -14,7 +14,7 @@
viewBox="0 0 12 12"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="22.627417"
- inkscape:cx="1.7981958"
- inkscape:cy="7.5815407"
+ inkscape:zoom="64"
+ inkscape:cx="5.7299355"
+ inkscape:cy="6.6875366"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -71,10 +71,10 @@
id="layer1"
transform="translate(0,-1040.3622)">
<path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.39215687"
- d="m 3,1045.3622 3,3 3,-3"
- id="path814"
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2,1043.3622 0,3 4,3 4,-3 0,-3 z"
+ id="rect4174"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc" />
+ sodipodi:nodetypes="cccccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/arrow_right.svg b/scene/resources/default_theme/source/arrow_right.svg
index 43134ba1b1..4c4bc05e28 100644
--- a/scene/resources/default_theme/source/arrow_right.svg
+++ b/scene/resources/default_theme/source/arrow_right.svg
@@ -14,7 +14,7 @@
viewBox="0 0 12 12"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="45.254836"
- inkscape:cx="4.0845752"
- inkscape:cy="5.8802612"
+ inkscape:cx="3.0018179"
+ inkscape:cy="6.0349408"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -71,10 +71,10 @@
id="layer1"
transform="translate(0,-1040.3622)">
<path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.39215687"
- d="m 4,1049.3622 3.0000202,-3 -3.0000202,-3"
- id="path814"
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 3,1050.3622 3,0 3,-4 -3,-4 -3,0 z"
+ id="rect4174"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccc" />
+ sodipodi:nodetypes="cccccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/button_disabled.svg b/scene/resources/default_theme/source/button_disabled.svg
deleted file mode 100644
index eb4ce87e36..0000000000
--- a/scene/resources/default_theme/source/button_disabled.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="button_disabled.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_disabled.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="3.3006706"
- inkscape:cy="10.701568"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:none;fill-opacity:0.19607843;stroke:#425468;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/button_hover.svg b/scene/resources/default_theme/source/button_hover.svg
deleted file mode 100644
index 46a58b1917..0000000000
--- a/scene/resources/default_theme/source/button_hover.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="button_hover.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_hover.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="3.6900507"
- inkscape:cy="7.7665583"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:none;fill-opacity:0.19607843;stroke:#70b1ff;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/button_normal.svg b/scene/resources/default_theme/source/button_normal.svg
deleted file mode 100644
index c0fc1f2c5a..0000000000
--- a/scene/resources/default_theme/source/button_normal.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="button_normal.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_hover.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="3.0075667"
- inkscape:cy="8.2242067"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:none;fill-opacity:0.19607843;stroke:#788da3;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/button_pressed.svg b/scene/resources/default_theme/source/button_pressed.svg
deleted file mode 100644
index e761b07eb1..0000000000
--- a/scene/resources/default_theme/source/button_pressed.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="button_pressed.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_pressed.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="5.7152485"
- inkscape:cy="9.8535758"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:none;fill-opacity:0.19607843;stroke:#7eff8a;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/focus.svg b/scene/resources/default_theme/source/focus.svg
deleted file mode 100644
index 4fd463b206..0000000000
--- a/scene/resources/default_theme/source/focus.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="focus.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="64.000003"
- inkscape:cx="3.8318954"
- inkscape:cy="6.6190751"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)" />
-</svg>
diff --git a/scene/resources/default_theme/source/frame_focus.svg b/scene/resources/default_theme/source/frame_focus.svg
deleted file mode 100644
index fba950091a..0000000000
--- a/scene/resources/default_theme/source/frame_focus.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="frame_focus.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="64.000003"
- inkscape:cx="3.8318954"
- inkscape:cy="6.6190751"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)" />
-</svg>
diff --git a/scene/resources/default_theme/source/full_panel_bg.svg b/scene/resources/default_theme/source/full_panel_bg.svg
deleted file mode 100644
index 4adceb5254..0000000000
--- a/scene/resources/default_theme/source/full_panel_bg.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="full_panel_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="11.313708"
- inkscape:cx="7.9626269"
- inkscape:cy="2.5437896"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:#232a32;fill-opacity:1;stroke:#2e3842;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484-6"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/graph_node.svg b/scene/resources/default_theme/source/graph_node.svg
deleted file mode 100644
index f309f29d9a..0000000000
--- a/scene/resources/default_theme/source/graph_node.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="70"
- viewBox="0 0 16 69.999996"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="graph_node.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="7.9999996"
- inkscape:cx="7.4490379"
- inkscape:cy="37.697586"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-982.3623)">
- <path
- style="opacity:1;fill:#afabf1;fill-opacity:0.78431374;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3 1 C 1.3380048 1 0 2.3380048 0 4 L 0 66 C 0 67.661995 1.3380048 69 3 69 L 13 69 C 14.661995 69 16 67.661995 16 66 L 16 4 C 16 2.3380048 14.661995 1 13 1 L 3 1 z M 2 23 L 14 23 L 14 66 C 14 66.554 13.554 67 13 67 L 3 67 C 2.446 67 2 66.554 2 66 L 2 23 z "
- id="rect4144"
- transform="translate(0,982.3623)" />
- <path
- style="opacity:1;fill:#1d1836;fill-opacity:0.58823532;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,1005.3623 0,43 c 0,0.554 0.446,1 1,1 l 10,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 z"
- id="rect4194"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssscc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/graph_node_comment.svg b/scene/resources/default_theme/source/graph_node_comment.svg
deleted file mode 100644
index 4b41b9b3d0..0000000000
--- a/scene/resources/default_theme/source/graph_node_comment.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="70"
- viewBox="0 0 16 69.999996"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="graph_node_comment.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="7.9999996"
- inkscape:cx="7.9593685"
- inkscape:cy="41.411006"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-982.3623)">
- <path
- style="opacity:1;fill:#ffffff;fill-opacity:0.58823532;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3 1 C 1.3380048 1 0 2.3380048 0 4 L 0 66 C 0 67.661995 1.3380048 69 3 69 L 13 69 C 14.661995 69 16 67.661995 16 66 L 16 4 C 16 2.3380048 14.661995 1 13 1 L 3 1 z M 2 23 L 14 23 L 14 66 C 14 66.554 13.554 67 13 67 L 3 67 C 2.446 67 2 66.554 2 66 L 2 23 z "
- transform="translate(0,982.3623)"
- id="rect4144" />
- <path
- style="opacity:1;fill:#ffffff;fill-opacity:0.19607843;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,1005.3623 0,43 c 0,0.554 0.446,1 1,1 l 10,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 z"
- id="rect4194"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssscc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/graph_node_comment_focus.svg b/scene/resources/default_theme/source/graph_node_comment_focus.svg
deleted file mode 100644
index af60130ea0..0000000000
--- a/scene/resources/default_theme/source/graph_node_comment_focus.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="70"
- viewBox="0 0 16 69.999996"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="graph_node_comment_focus.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="7.9999997"
- inkscape:cx="13.69465"
- inkscape:cy="33.350792"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-982.3623)">
- <path
- style="opacity:1;fill:#ffffff;fill-opacity:0.88235295;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3 1 C 1.3380048 1 0 2.3380048 0 4 L 0 66 C 0 67.661995 1.3380048 69 3 69 L 13 69 C 14.661995 69 16 67.661995 16 66 L 16 4 C 16 2.3380048 14.661995 1 13 1 L 3 1 z M 2 23 L 14 23 L 14 66 C 14 66.554 13.554 67 13 67 L 3 67 C 2.446 67 2 66.554 2 66 L 2 23 z "
- transform="translate(0,982.3623)"
- id="rect4144" />
- <path
- style="opacity:1;fill:#ffffff;fill-opacity:0.19607843;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,1005.3623 0,43 c 0,0.554 0.446,1 1,1 l 10,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 z"
- id="rect4194"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssscc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/graph_node_position.svg b/scene/resources/default_theme/source/graph_node_position.svg
deleted file mode 100644
index 6d98d8b115..0000000000
--- a/scene/resources/default_theme/source/graph_node_position.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="70"
- viewBox="0 0 16 69.999996"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="graph_node_position.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="11.313708"
- inkscape:cx="17.794895"
- inkscape:cy="40.559851"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-982.3623)">
- <path
- style="opacity:1;fill:#ff8484;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3 1 C 1.3380048 1 0 2.3380048 0 4 L 0 66 C 0 67.661995 1.3380048 69 3 69 L 13 69 C 14.661995 69 16 67.661995 16 66 L 16 4 C 16 2.3380048 14.661995 1 13 1 L 3 1 z M 3 3 L 13 3 C 13.554 3 14 3.446 14 4 L 14 23 L 14 47 L 14 66 C 14 66.554 13.554 67 13 67 L 3 67 C 2.446 67 2 66.554 2 66 L 2 47 L 2 23 L 2 4 C 2 3.446 2.446 3 3 3 z "
- transform="translate(0,982.3623)"
- id="rect4144" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/graph_node_selected.svg b/scene/resources/default_theme/source/graph_node_selected.svg
deleted file mode 100644
index a480cb8ab8..0000000000
--- a/scene/resources/default_theme/source/graph_node_selected.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="70"
- viewBox="0 0 16 69.999996"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="graph_node_selected.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="7.9999996"
- inkscape:cx="29.199039"
- inkscape:cy="37.947586"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-982.3623)">
- <path
- style="opacity:1;fill:#cac8f6;fill-opacity:0.88235295;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3 1 C 1.3380048 1 0 2.3380048 0 4 L 0 66 C 0 67.661995 1.3380048 69 3 69 L 13 69 C 14.661995 69 16 67.661995 16 66 L 16 4 C 16 2.3380048 14.661995 1 13 1 L 3 1 z M 2 23 L 14 23 L 14 66 C 14 66.554 13.554 67 13 67 L 3 67 C 2.446 67 2 66.554 2 66 L 2 23 z "
- id="rect4144"
- transform="translate(0,982.3623)" />
- <path
- style="opacity:1;fill:#1d1836;fill-opacity:0.58823532;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,1005.3623 0,43 c 0,0.554 0.446,1 1,1 l 10,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 z"
- id="rect4194"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="csssscc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/hseparator.svg b/scene/resources/default_theme/source/hseparator.svg
deleted file mode 100644
index 4bf5381240..0000000000
--- a/scene/resources/default_theme/source/hseparator.svg
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="8"
- height="8"
- viewBox="0 0 8 8"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
- inkscape:export-xdpi="45"
- inkscape:export-ydpi="45"
- sodipodi:docname="hseparator.svg">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="64.000004"
- inkscape:cx="1.1715704"
- inkscape:cy="4.26452"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:snap-bbox-midpoints="false"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid3336" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1044.3622)" />
-</svg>
diff --git a/scene/resources/default_theme/source/icon_close.svg b/scene/resources/default_theme/source/icon_close.svg
index f0eb83f54d..6e6ec16638 100644
--- a/scene/resources/default_theme/source/icon_close.svg
+++ b/scene/resources/default_theme/source/icon_close.svg
@@ -14,7 +14,7 @@
viewBox="0 0 16 16"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="7.6258883"
- inkscape:cy="7.576455"
+ inkscape:zoom="22.627418"
+ inkscape:cx="1.8501874"
+ inkscape:cy="8.0543329"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1">
@@ -69,15 +69,26 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
- <path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:0.39215687;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 4,1040.3622 8,8"
- id="path814"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:0.39215687;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 4,1048.3622 8,-8"
- id="path816"
- inkscape:connector-curvature="0" />
+ <g
+ id="layer1-4"
+ inkscape:label="Layer 1"
+ transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,-736.13242,311.54347)"
+ style="fill:#080808;fill-opacity:1">
+ <rect
+ y="1043.3622"
+ x="1"
+ height="1.9999478"
+ width="14"
+ id="rect4137"
+ style="fill:#080808;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ transform="matrix(0,1,-1,0,0,0)"
+ style="fill:#080808;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4158"
+ width="13.999966"
+ height="2.0000017"
+ x="1037.3622"
+ y="-9" />
+ </g>
</g>
</svg>
diff --git a/scene/resources/default_theme/source/line_edit.svg b/scene/resources/default_theme/source/line_edit.svg
deleted file mode 100644
index bcddf8bf7f..0000000000
--- a/scene/resources/default_theme/source/line_edit.svg
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="line_edit.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/tab_container_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="3.5104007"
- inkscape:cy="4.8259288"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-nodes="false"
- inkscape:snap-bbox-midpoints="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:#303b46;fill-opacity:1;stroke:#2c3640;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484-6"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- <path
- style="fill:none;fill-opacity:1;stroke:#788da3;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,11 c 0,1.661997 1.3380026,3 3,3 h 6 c 1.661997,0 3,-1.338003 3,-3"
- id="rect4503"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cssc"
- transform="translate(0,1036.3623)" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/line_edit_active.svg b/scene/resources/default_theme/source/line_edit_active.svg
deleted file mode 100644
index e823138141..0000000000
--- a/scene/resources/default_theme/source/line_edit_active.svg
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="line_edit_selected.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/tab_container_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="6.0294685"
- inkscape:cy="5.7319094"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-nodes="false"
- inkscape:snap-bbox-midpoints="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:#303b46;fill-opacity:1;stroke:#2c3640;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484-6"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- <path
- style="fill:none;fill-opacity:1;stroke:#7eff8a;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,11 c 0,1.661997 1.3380026,3 3,3 h 6 c 1.661997,0 3,-1.338003 3,-3"
- id="rect4503"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cssc"
- transform="translate(0,1036.3623)" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/line_edit_disabled.svg b/scene/resources/default_theme/source/line_edit_disabled.svg
deleted file mode 100644
index 9e60d7ccbd..0000000000
--- a/scene/resources/default_theme/source/line_edit_disabled.svg
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="line_edit_disabled.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/tab_container_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="2.2717731"
- inkscape:cy="8.8637422"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:#303b46;fill-opacity:1;stroke:#2c3640;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484-6"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- <path
- style="fill:none;fill-opacity:1;stroke:#425468;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 2,1047.3623 c 0,1.662 1.338003,3 3,3 h 6 c 1.661997,0 3,-1.338 3,-3"
- id="rect4503"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cssc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/option_arrow.svg b/scene/resources/default_theme/source/option_arrow.svg
index 5cd943e9e3..cd78404ff1 100644
--- a/scene/resources/default_theme/source/option_arrow.svg
+++ b/scene/resources/default_theme/source/option_arrow.svg
@@ -14,7 +14,7 @@
viewBox="0 0 12 12"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="3.1667338"
- inkscape:cy="5.9875884"
+ inkscape:zoom="45.254836"
+ inkscape:cx="6.0969578"
+ inkscape:cy="7.5632913"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -61,7 +61,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -71,10 +71,16 @@
id="layer1"
transform="translate(0,-1040.3622)">
<path
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 3,1045.3622 6,0 -3,-4 z"
+ id="path4158"
inkscape:connector-curvature="0"
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:0.78431374;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 9.9999996,1043.3583 c -0.2637796,0.01 -0.5144012,0.1165 -0.697265,0.3067 l -3.292969,3.2929 -3.2929688,-3.2929 C 2.5285367,1043.4714 2.2700113,1043.3622 2,1043.3622 c -0.8974208,2e-4 -1.34038281,1.0909 -0.6972656,1.7168 l 4,4 c 0.3905299,0.3904 1.0235325,0.3904 1.4140624,0 l 4.0000002,-4 c 0.657344,-0.6321 0.194906,-1.7422 -0.7167974,-1.7207 z"
- id="path4484"
- sodipodi:nodetypes="cccccccccc" />
+ sodipodi:nodetypes="cccc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4160"
+ d="m 3,1047.3622 6,0 -3,4 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ sodipodi:nodetypes="cccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/panel_bg.svg b/scene/resources/default_theme/source/panel_bg.svg
deleted file mode 100644
index 5115d3d0ac..0000000000
--- a/scene/resources/default_theme/source/panel_bg.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="8"
- height="8"
- viewBox="0 0 8 7.9999995"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="panel_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="6.4834446"
- inkscape:cy="3.3875925"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1044.3623)">
- <rect
- style="opacity:1;fill:#232a32;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect4213"
- width="8"
- height="7.999999"
- x="0"
- y="1044.3623" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/popup_bg.svg b/scene/resources/default_theme/source/popup_bg.svg
deleted file mode 100644
index cbf356aec0..0000000000
--- a/scene/resources/default_theme/source/popup_bg.svg
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="popup_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/popup_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="6.6514997"
- inkscape:cy="9.5440638"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- showguides="false">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:0.19607843;fill-rule:nonzero;stroke:none;stroke-width:1.77777672;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="M 4.4453125,1036.3633 C 1.9984702,1036.3633 0,1038.3598 0,1040.8066 v 7.1114 c 0,2.4468 1.9984702,4.4453 4.4453125,4.4453 H 11.554688 C 14.00153,1052.3633 16,1050.3648 16,1047.918 v -7.1114 c 0,-2.4468 -1.99847,-4.4433 -4.445312,-4.4433 z"
- id="rect4497"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sssssssss" />
- <rect
- style="fill:#394653;fill-opacity:1;stroke:#455463;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/popup_window.svg b/scene/resources/default_theme/source/popup_window.svg
deleted file mode 100644
index 43aabb3ca2..0000000000
--- a/scene/resources/default_theme/source/popup_window.svg
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="20"
- height="36"
- viewBox="0 0 20 35.999998"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="popup_window.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/full_panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="22.627416"
- inkscape:cx="10.268488"
- inkscape:cy="24.750533"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1016.3623)">
- <rect
- style="fill:#000000;fill-opacity:0.19607843;stroke:none;stroke-width:1.8106823;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4499"
- width="18"
- height="33.999996"
- x="1"
- y="1017.3623"
- ry="5.9999952" />
- <rect
- ry="4.9999952"
- y="1018.3623"
- x="2"
- height="31.999996"
- width="16"
- id="rect4497"
- style="fill:#000000;fill-opacity:0.19607843;stroke:none;stroke-width:1.65615714;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- <rect
- style="fill:#394653;fill-opacity:1;stroke:#455463;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484"
- width="12"
- height="27.999996"
- x="4"
- y="1020.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/progress_bar.svg b/scene/resources/default_theme/source/progress_bar.svg
deleted file mode 100644
index ddaac73547..0000000000
--- a/scene/resources/default_theme/source/progress_bar.svg
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="progress_bar.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/popup_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="6.2769476"
- inkscape:cy="8.8116358"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- showguides="false">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)" />
-</svg>
diff --git a/scene/resources/default_theme/source/progress_fill.svg b/scene/resources/default_theme/source/progress_fill.svg
deleted file mode 100644
index 99b6a45bf5..0000000000
--- a/scene/resources/default_theme/source/progress_fill.svg
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="progress_fill.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/popup_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="5.2752007"
- inkscape:cy="7.6135176"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- showguides="false"
- inkscape:snap-midpoints="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <circle
- style="fill:#7eff8a;fill-opacity:1;stroke:none;stroke-width:1.0285722;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path816"
- cx="8"
- cy="1044.3623"
- r="6.0000048" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/radio_checked.svg b/scene/resources/default_theme/source/radio_checked.svg
deleted file mode 100644
index cbfb407bf2..0000000000
--- a/scene/resources/default_theme/source/radio_checked.svg
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="radio_checked.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="4.875052"
- inkscape:cy="10.187321"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <path
- style="opacity:1;fill:#e0e0e0;fill-opacity:0.78431374;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 8 2 A 6 6 0 0 0 2 8 A 6 6 0 0 0 8 14 A 6 6 0 0 0 14 8 A 6 6 0 0 0 8 2 z M 8 4 A 4 4 0 0 1 12 8 A 4 4 0 0 1 8 12 A 4 4 0 0 1 4 8 A 4 4 0 0 1 8 4 z "
- transform="translate(0,1036.3623)"
- id="path4154" />
- <circle
- style="opacity:1;fill:#e0e0e0;fill-opacity:0.78431374;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="circle4158"
- cx="8"
- cy="1044.3623"
- r="3" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/radio_unchecked.svg b/scene/resources/default_theme/source/radio_unchecked.svg
deleted file mode 100644
index 0e3aaae6d9..0000000000
--- a/scene/resources/default_theme/source/radio_unchecked.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="radio_unchecked.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="22.627417"
- inkscape:cx="-0.63112348"
- inkscape:cy="10.614735"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <path
- style="opacity:1;fill:#e0e0e0;fill-opacity:0.78431374;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 8 2 A 6 6 0 0 0 2 8 A 6 6 0 0 0 8 14 A 6 6 0 0 0 14 8 A 6 6 0 0 0 8 2 z M 8 4 A 4 4 0 0 1 12 8 A 4 4 0 0 1 8 12 A 4 4 0 0 1 4 8 A 4 4 0 0 1 8 4 z "
- transform="translate(0,1036.3623)"
- id="path4154" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_down_hl.svg b/scene/resources/default_theme/source/scroll_button_down_hl.svg
deleted file mode 100644
index f0b461f037..0000000000
--- a/scene/resources/default_theme/source/scroll_button_down_hl.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_down_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="5.8513188"
- inkscape:cy="5.8532653"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#7eff8a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 10.023438,1044.3535 a 1.0001,1.0001 0 0 0 -0.6230474,0.209 L 6,1047.1113 2.5996094,1044.5625 a 1.0001,1.0001 0 1 0 -1.1992188,1.5996 l 4,3 a 1.0001,1.0001 0 0 0 1.1992188,0 l 3.9999996,-3 a 1.0001,1.0001 0 0 0 -0.576171,-1.8086 z"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_left.svg b/scene/resources/default_theme/source/scroll_button_left.svg
deleted file mode 100644
index 22d7f42001..0000000000
--- a/scene/resources/default_theme/source/scroll_button_left.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_left.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="4.5296015"
- inkscape:cy="7.0872243"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.27450982"
- d="m 6.999975,1042.3623 -3,4 3,4"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_left_hl.svg b/scene/resources/default_theme/source/scroll_button_left_hl.svg
deleted file mode 100644
index 22c24aae22..0000000000
--- a/scene/resources/default_theme/source/scroll_button_left_hl.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_left_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="4.238333"
- inkscape:cy="6.998836"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="fill:none;stroke:#7eff8a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 6.999975,1042.3623 -3,4 3,4"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_right.svg b/scene/resources/default_theme/source/scroll_button_right.svg
deleted file mode 100644
index 95afabf006..0000000000
--- a/scene/resources/default_theme/source/scroll_button_right.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_right.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="3.1153879"
- inkscape:cy="6.4685059"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:0.2745098;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 5.0332031,1041.3516 a 1.0001,1.0001 0 0 0 -0.8339843,1.6113 l 2.5507812,3.3984 -2.5507812,3.4004 a 1.000985,1.000985 0 1 0 1.6015624,1.2012 l 3,-4 a 1.0001,1.0001 0 0 0 0,-1.2012 l -3,-4 a 1.0001,1.0001 0 0 0 -0.7675781,-0.4101 z"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_right_hl.svg b/scene/resources/default_theme/source/scroll_button_right_hl.svg
deleted file mode 100644
index c836c2975b..0000000000
--- a/scene/resources/default_theme/source/scroll_button_right_hl.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_right_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="3.1153879"
- inkscape:cy="6.4685059"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#7eff8a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 5.0332031,1041.3516 a 1.0001,1.0001 0 0 0 -0.8339843,1.6113 l 2.5507812,3.3984 -2.5507812,3.4004 a 1.000985,1.000985 0 1 0 1.6015624,1.2012 l 3,-4 a 1.0001,1.0001 0 0 0 0,-1.2012 l -3,-4 a 1.0001,1.0001 0 0 0 -0.7675781,-0.4101 z"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_up.svg b/scene/resources/default_theme/source/scroll_button_up.svg
deleted file mode 100644
index 90107666c9..0000000000
--- a/scene/resources/default_theme/source/scroll_button_up.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_up.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="1.4098045"
- inkscape:cy="5.764877"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:0.27450982;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 10.023438,1048.3706 a 1.0001,1.0001 0 0 1 -0.6230474,-0.209 L 6,1045.6128 l -3.4003906,2.5488 a 1.0001,1.0001 0 1 1 -1.1992188,-1.5996 l 4,-3 a 1.0001,1.0001 0 0 1 1.1992188,0 l 3.9999996,3 a 1.0001,1.0001 0 0 1 -0.576171,1.8086 z"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/scroll_button_up_hl.svg b/scene/resources/default_theme/source/scroll_button_up_hl.svg
deleted file mode 100644
index b5f92e0f8a..0000000000
--- a/scene/resources/default_theme/source/scroll_button_up_hl.svg
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="12"
- height="12"
- viewBox="0 0 12 11.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="scroll_button_up_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="1.4098045"
- inkscape:cy="5.764877"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1040.3623)">
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#7eff8a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 10.023438,1048.3706 a 1.0001,1.0001 0 0 1 -0.6230474,-0.209 L 6,1045.6128 l -3.4003906,2.5488 a 1.0001,1.0001 0 1 1 -1.1992188,-1.5996 l 4,-3 a 1.0001,1.0001 0 0 1 1.1992188,0 l 3.9999996,3 a 1.0001,1.0001 0 0 1 -0.576171,1.8086 z"
- id="path4511"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/selection.svg b/scene/resources/default_theme/source/selection.svg
deleted file mode 100644
index 7346191195..0000000000
--- a/scene/resources/default_theme/source/selection.svg
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="selection.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_pressed.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="9.5458029"
- inkscape:cy="7.3443927"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:none;fill-opacity:0.19607843;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294119"
- id="rect823"
- width="14"
- height="9.9999952"
- x="1"
- y="1039.3623"
- ry="3.9999952" />
- <rect
- ry="2.9999952"
- y="1040.3623"
- x="1.9999952"
- height="7.9999952"
- width="12.00001"
- id="rect825"
- style="fill:#ffffff;fill-opacity:0.19607843;stroke:none;stroke-width:1.71428704;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/selection_oof.svg b/scene/resources/default_theme/source/selection_oof.svg
deleted file mode 100644
index f12b066a52..0000000000
--- a/scene/resources/default_theme/source/selection_oof.svg
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="selection_oof.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_pressed.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="16"
- inkscape:cx="-2.3310576"
- inkscape:cy="4.9359914"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:none;fill-opacity:0.19607843;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294119"
- id="rect823"
- width="14"
- height="14"
- x="1"
- y="1037.3623"
- ry="3.9999952" />
- <rect
- ry="2.9999952"
- y="1038.3623"
- x="1.9999954"
- height="12.00001"
- width="12.00001"
- id="rect825"
- style="fill:#ffffff;fill-opacity:0.19607843;stroke:none;stroke-width:1.71428704;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/spinbox_updown.svg b/scene/resources/default_theme/source/spinbox_updown.svg
index e29d7fe0d2..5b8e0a83eb 100644
--- a/scene/resources/default_theme/source/spinbox_updown.svg
+++ b/scene/resources/default_theme/source/spinbox_updown.svg
@@ -14,7 +14,7 @@
viewBox="0 0 16 16"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -28,11 +28,11 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="16"
- inkscape:cx="-1.901723"
- inkscape:cy="9.1326297"
+ inkscape:zoom="45.254834"
+ inkscape:cx="5.7914867"
+ inkscape:cy="9.8174296"
inkscape:document-units="px"
- inkscape:current-layer="layer1-5"
+ inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:snap-bbox="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -71,13 +71,16 @@
id="layer1"
transform="translate(0,-1036.3622)">
<path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#e0e0e0;fill-opacity:0.78431374;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="M 7.984375 1.0019531 A 1.0001 1.0001 0 0 0 7.2929688 1.2929688 L 3.2929688 5.2929688 A 1.0001 1.0001 0 1 0 4.7070312 6.7070312 L 8 3.4140625 L 11.292969 6.7070312 A 1.0001 1.0001 0 1 0 12.707031 5.2929688 L 8.7070312 1.2929688 A 1.0001 1.0001 0 0 0 7.984375 1.0019531 z M 11.990234 8.9863281 A 1.0001 1.0001 0 0 0 11.292969 9.2929688 L 8 12.585938 L 4.7070312 9.2929688 A 1.0001 1.0001 0 0 0 3.9902344 8.9902344 A 1.0001 1.0001 0 0 0 3.2929688 10.707031 L 7.2929688 14.707031 A 1.0001 1.0001 0 0 0 8.7070312 14.707031 L 12.707031 10.707031 A 1.0001 1.0001 0 0 0 11.990234 8.9863281 z "
- transform="translate(0,1036.3622)"
- id="path4484" />
- <g
- id="layer1-5"
- inkscape:label="Layer 1"
- transform="translate(14.210182,-5.3664)" />
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 4,1042.3622 8,0 -4,-5 z"
+ id="path4158"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4160"
+ d="m 4,1046.3622 8,0 -4,5 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ sodipodi:nodetypes="cccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/submenu.svg b/scene/resources/default_theme/source/submenu.svg
index 927338d9bb..ef7f696571 100644
--- a/scene/resources/default_theme/source/submenu.svg
+++ b/scene/resources/default_theme/source/submenu.svg
@@ -14,7 +14,7 @@
viewBox="0 0 8 8"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="64.000003"
- inkscape:cx="5.7489132"
- inkscape:cy="3.1277668"
+ inkscape:cx="1.4039962"
+ inkscape:cy="5.6866955"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -71,9 +71,10 @@
id="layer1"
transform="translate(0,-1044.3622)">
<path
- style="fill:none;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.78431374;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 3,1045.3622 3,3 -3,3"
- id="path814"
- inkscape:connector-curvature="0" />
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1,1052.3622 3,0 3,-4 -3,-4 -3,0 z"
+ id="rect4174"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/tab_behind.svg b/scene/resources/default_theme/source/tab_behind.svg
deleted file mode 100644
index 5fa84ffda5..0000000000
--- a/scene/resources/default_theme/source/tab_behind.svg
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tab_behind.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/tab_behind.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="10.899138"
- inkscape:cy="7.5918468"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)" />
-</svg>
diff --git a/scene/resources/default_theme/source/tab_close.svg b/scene/resources/default_theme/source/tab_close.svg
index f85518665b..65b71ae860 100644
--- a/scene/resources/default_theme/source/tab_close.svg
+++ b/scene/resources/default_theme/source/tab_close.svg
@@ -14,11 +14,11 @@
viewBox="0 0 16 16"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
- sodipodi:docname="tab_close.svg">
+ sodipodi:docname="icon_close.svg">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="45.254836"
- inkscape:cx="9.2858482"
- inkscape:cy="8.0181058"
+ inkscape:zoom="22.627418"
+ inkscape:cx="3.3969834"
+ inkscape:cy="11.678255"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1">
@@ -60,7 +60,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -69,15 +69,25 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
- <path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:0.39215687;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 4,1048.3622 8,-8"
- id="path819"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:0.39215687;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 4,1040.3622 8,8"
- id="path821"
- inkscape:connector-curvature="0" />
+ <g
+ id="layer1-4"
+ inkscape:label="Layer 1"
+ transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,-736.13242,311.54347)">
+ <rect
+ y="1043.3622"
+ x="1"
+ height="1.9999478"
+ width="14"
+ id="rect4137"
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ transform="matrix(0,1,-1,0,0,0)"
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4158"
+ width="13.999966"
+ height="2.0000017"
+ x="1037.3622"
+ y="-9" />
+ </g>
</g>
</svg>
diff --git a/scene/resources/default_theme/source/tab_container_bg.svg b/scene/resources/default_theme/source/tab_container_bg.svg
deleted file mode 100644
index d19cb7cfa1..0000000000
--- a/scene/resources/default_theme/source/tab_container_bg.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tab_container_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/tab_container_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="5.1997709"
- inkscape:cy="8.5220258"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:#36424e;fill-opacity:1;stroke:#323d48;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484-6"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/tab_current.svg b/scene/resources/default_theme/source/tab_current.svg
deleted file mode 100644
index e43a83c3ec..0000000000
--- a/scene/resources/default_theme/source/tab_current.svg
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tab_current.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/tab_current.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="45.254834"
- inkscape:cx="9.2059746"
- inkscape:cy="6.5875113"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <path
- style="fill:#36424e;fill-opacity:1;stroke:#323d48;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 14,16 V 5 C 14,3.3380026 12.661997,2 11,2 H 5 C 3.3380026,2 2,3.3380026 2,5 v 11"
- transform="translate(0,1036.3623)"
- id="rect4484-6"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccsscc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/tab_menu.svg b/scene/resources/default_theme/source/tab_menu.svg
index 39e0d1f261..84f7c8095a 100644
--- a/scene/resources/default_theme/source/tab_menu.svg
+++ b/scene/resources/default_theme/source/tab_menu.svg
@@ -14,7 +14,7 @@
viewBox="0 0 16 16"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="32.000001"
- inkscape:cx="4.0814179"
- inkscape:cy="8.4695645"
+ inkscape:zoom="45.254836"
+ inkscape:cx="6.2944765"
+ inkscape:cy="7.7343939"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -70,23 +70,11 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
- <circle
- style="fill:#ffffff;fill-opacity:0.39215687;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294118"
- id="path819"
- cx="8"
- cy="1038.3622"
- r="2" />
- <circle
- r="2"
- cy="1044.3622"
- cx="8"
- id="circle821"
- style="fill:#ffffff;fill-opacity:0.39215687;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294118" />
- <circle
- style="fill:#ffffff;fill-opacity:0.39215687;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.35294118"
- id="circle823"
- cx="8"
- cy="1050.3622"
- r="2" />
+ <path
+ style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 4,1044.3622 0,3 4,3 4,-3 0,-3 z"
+ id="rect4174"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/toggle_off.svg b/scene/resources/default_theme/source/toggle_off.svg
deleted file mode 100644
index e5bf0e9809..0000000000
--- a/scene/resources/default_theme/source/toggle_off.svg
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="64"
- height="32"
- viewBox="0 0 64 31.999998"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="toggle_off.svg"
- inkscape:export-filename="/home/djrm/Projects/gd_theme/assets/check_btn_off.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="11.313709"
- inkscape:cx="35.30642"
- inkscape:cy="10.306683"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1020.3623)">
- <path
- style="fill:#000000;fill-opacity:0.19607843;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 24 6 A 10.000006 10.000006 0 0 0 14 16 A 10.000006 10.000006 0 0 0 24 26 L 40 26 A 9.9999943 9.9999943 0 0 0 50 16 A 9.9999943 9.9999943 0 0 0 40 6 L 24 6 z "
- transform="translate(0,1020.3623)"
- id="circle4160" />
- <circle
- r="7.9999924"
- cy="1036.3623"
- cx="-24.000006"
- id="circle4138"
- style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- transform="scale(-1,1)" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/toggle_on.svg b/scene/resources/default_theme/source/toggle_on.svg
deleted file mode 100644
index f8b55a853d..0000000000
--- a/scene/resources/default_theme/source/toggle_on.svg
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="64"
- height="32"
- viewBox="0 0 64 31.999998"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="toggle_on.svg"
- inkscape:export-filename="/home/djrm/Projects/gd_theme/assets/check_btn_on.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="16.000001"
- inkscape:cx="31.866725"
- inkscape:cy="13.213395"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1020.3623)">
- <path
- inkscape:connector-curvature="0"
- style="fill:#000000;fill-opacity:0.19607843;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="m 40.000015,1026.3623 a 10.000006,10.000006 0 0 1 10,10 10.000006,10.000006 0 0 1 -10,10 h -16 a 9.9999943,9.9999943 0 0 1 -10,-10 9.9999943,9.9999943 0 0 1 10,-10 z"
- id="circle4160" />
- <circle
- r="7.9999924"
- cy="1036.3623"
- cx="40.000008"
- id="circle4138"
- style="fill:#7eff8a;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/tooltip_bg.svg b/scene/resources/default_theme/source/tooltip_bg.svg
deleted file mode 100644
index 84da6fe984..0000000000
--- a/scene/resources/default_theme/source/tooltip_bg.svg
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tooltip_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/button_pressed.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="1.4290295"
- inkscape:cy="8.0937882"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <path
- style="opacity:1;fill:#ffffff;fill-opacity:0.78431373;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- d="m 3,1036.3623 c -1.661997,0 -3,1.338 -3,3 v 10 c 0,1.662 1.338003,3 3,3 h 10 c 1.661997,0 3,-1.338 3,-3 v -10 c 0,-1.662 -1.338003,-3 -3,-3 z m 0,2 h 10 c 0.553997,0 1,0.446 1,1 v 10 c 0,0.554 -0.446003,1 -1,1 H 3 c -0.553997,0 -1,-0.446 -1,-1 v -10 c 0,-0.554 0.446003,-1 1,-1 z"
- id="rect4166"
- inkscape:connector-curvature="0" />
- <rect
- style="opacity:1;fill:#ffffff;fill-opacity:0.68627451;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="rect4137"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="0.99999481" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/tree_bg.svg b/scene/resources/default_theme/source/tree_bg.svg
deleted file mode 100644
index ba39010421..0000000000
--- a/scene/resources/default_theme/source/tree_bg.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tree_bg.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/panel_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32.000002"
- inkscape:cx="1.8744117"
- inkscape:cy="8.3113002"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="fill:#2b353f;fill-opacity:1;stroke:#252e37;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4484-6"
- width="12"
- height="12"
- x="2"
- y="1038.3623"
- ry="2.9999952" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/tree_title.svg b/scene/resources/default_theme/source/tree_title.svg
deleted file mode 100644
index f7140f3aff..0000000000
--- a/scene/resources/default_theme/source/tree_title.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tree_title.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/popup_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="11.133501"
- inkscape:cy="7.000622"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- showguides="false">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="opacity:1;fill:#000000;fill-opacity:0.19607843;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4158"
- width="16"
- height="16"
- x="0"
- y="1036.3623" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/tree_title_pressed.svg b/scene/resources/default_theme/source/tree_title_pressed.svg
deleted file mode 100644
index a1a6cd5a89..0000000000
--- a/scene/resources/default_theme/source/tree_title_pressed.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="tree_title_pressed.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/popup_bg.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="3.414751"
- inkscape:cy="7.219372"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- showguides="false">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <rect
- style="opacity:1;fill:#000000;fill-opacity:0.27450982;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="rect4158"
- width="16"
- height="16"
- x="0"
- y="1036.3623" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/updown.svg b/scene/resources/default_theme/source/updown.svg
index 24e4ed0f23..adc72b405d 100644
--- a/scene/resources/default_theme/source/updown.svg
+++ b/scene/resources/default_theme/source/updown.svg
@@ -14,7 +14,7 @@
viewBox="0 0 8 16"
id="svg2"
version="1.1"
- inkscape:version="0.92.1 r"
+ inkscape:version="0.91 r13725"
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collapse.png"
inkscape:export-xdpi="45"
inkscape:export-ydpi="45"
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32.000001"
- inkscape:cx="-0.193656"
- inkscape:cy="9.787299"
+ inkscape:cx="-3.4436559"
+ inkscape:cy="10.099799"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -42,8 +42,8 @@
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
@@ -71,7 +71,7 @@
id="layer1"
transform="translate(0,-1036.3622)">
<path
- style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431374"
+ style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 1,1042.3565 3,-2.9943 3,2.9943"
id="path4155"
inkscape:connector-curvature="0"
@@ -80,7 +80,7 @@
inkscape:connector-curvature="0"
id="path4159"
d="m 1,1046.3622 3,3 3,-3"
- style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.78431374"
+ style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="ccc" />
</g>
</svg>
diff --git a/scene/resources/default_theme/source/vslider_grabber.svg b/scene/resources/default_theme/source/vslider_grabber.svg
deleted file mode 100644
index 76703daa54..0000000000
--- a/scene/resources/default_theme/source/vslider_grabber.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="vslider_grabber.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="8.8922186"
- inkscape:cy="6.4674144"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <circle
- r="6.9999943"
- cy="1044.3623"
- cx="8.0000057"
- id="circle4262"
- style="fill:#d3d3d3;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/vslider_grabber_hl.svg b/scene/resources/default_theme/source/vslider_grabber_hl.svg
deleted file mode 100644
index b688130f24..0000000000
--- a/scene/resources/default_theme/source/vslider_grabber_hl.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="vslider_grabber_hl.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="7.0748113"
- inkscape:cy="6.0432589"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1600"
- inkscape:window-height="836"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <circle
- r="6.9999943"
- cy="1044.3623"
- cx="8.0000057"
- id="circle4262"
- style="fill:#7eff8a;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/source/window_resizer.svg b/scene/resources/default_theme/source/window_resizer.svg
deleted file mode 100644
index ef92d64be0..0000000000
--- a/scene/resources/default_theme/source/window_resizer.svg
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- viewBox="0 0 16 15.999999"
- id="svg2"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="window_resizer.svg"
- inkscape:export-filename="/home/djrm/Projects/godot/scene/resources/default_theme/unchecked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="32"
- inkscape:cx="-3.1015509"
- inkscape:cy="9.5660349"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- units="px"
- inkscape:object-paths="false"
- inkscape:snap-intersection-paths="false"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:window-width="1920"
- inkscape:window-height="1016"
- inkscape:window-x="0"
- inkscape:window-y="27"
- inkscape:window-maximized="1"
- inkscape:snap-midpoints="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:object-nodes="true">
- <inkscape:grid
- type="xygrid"
- id="grid4136"
- empspacing="4" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3623)">
- <path
- style="opacity:1;fill:#ffffff;fill-opacity:0.78431373;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- d="m 2.0000005,1047.3623 8.9999995,0 0,-9 z"
- id="circle4178"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccc" />
- </g>
-</svg>
diff --git a/scene/resources/default_theme/spinbox_updown.png b/scene/resources/default_theme/spinbox_updown.png
index ff65df801b..b40b1e9fd2 100644
--- a/scene/resources/default_theme/spinbox_updown.png
+++ b/scene/resources/default_theme/spinbox_updown.png
Binary files differ
diff --git a/scene/resources/default_theme/submenu.png b/scene/resources/default_theme/submenu.png
index 465afe7786..ec727eecf1 100644
--- a/scene/resources/default_theme/submenu.png
+++ b/scene/resources/default_theme/submenu.png
Binary files differ
diff --git a/scene/resources/default_theme/tab.png b/scene/resources/default_theme/tab.png
index 951a4a3e76..3e4d792a48 100644
--- a/scene/resources/default_theme/tab.png
+++ b/scene/resources/default_theme/tab.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_behind.png b/scene/resources/default_theme/tab_behind.png
index d3e1838248..12f07c3a91 100644
--- a/scene/resources/default_theme/tab_behind.png
+++ b/scene/resources/default_theme/tab_behind.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_close.png b/scene/resources/default_theme/tab_close.png
index b6973740e7..20d9b5c810 100644
--- a/scene/resources/default_theme/tab_close.png
+++ b/scene/resources/default_theme/tab_close.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_container_backup.png b/scene/resources/default_theme/tab_container_backup.png
deleted file mode 100644
index f87905b1da..0000000000
--- a/scene/resources/default_theme/tab_container_backup.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
index 1b62e2690c..92482aaf28 100644
--- a/scene/resources/default_theme/tab_container_bg.png
+++ b/scene/resources/default_theme/tab_container_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_current.png b/scene/resources/default_theme/tab_current.png
index c1f0ba24d4..7289e032da 100644
--- a/scene/resources/default_theme/tab_current.png
+++ b/scene/resources/default_theme/tab_current.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_menu.png b/scene/resources/default_theme/tab_menu.png
index ffc63f2d41..148b64b8aa 100644
--- a/scene/resources/default_theme/tab_menu.png
+++ b/scene/resources/default_theme/tab_menu.png
Binary files differ
diff --git a/scene/resources/default_theme/tab_menu_hl.png b/scene/resources/default_theme/tab_menu_hl.png
index ffc63f2d41..148b64b8aa 100644
--- a/scene/resources/default_theme/tab_menu_hl.png
+++ b/scene/resources/default_theme/tab_menu_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/theme_data.h b/scene/resources/default_theme/theme_data.h
index eba925cfe0..b9c401525a 100644
--- a/scene/resources/default_theme/theme_data.h
+++ b/scene/resources/default_theme/theme_data.h
@@ -3,11 +3,11 @@
// 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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xd5, 0x8f, 0x31, 0xa, 0x80, 0x40, 0x10, 0x3, 0x27, 0x9e, 0x8d, 0xa5, 0xe0, 0x9f, 0x84, 0xc3, 0xe7, 0x8a, 0xe0, 0xab, 0x2c, 0x6d, 0x84, 0xb5, 0xd9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2c, 0x73, 0xff, 0xfe, 0x7d, 0xd, 0x6, 0x6, 0x86, 0x55, 0x8c, 0x8c, 0x8c, 0xba, 0x50, 0xa1, 0x1b, 0xcc, 0xcc, 0xcc, 0x61, 0xb2, 0xb2, 0xb2, 0x97, 0xb1, 0x6a, 0x60, 0x60, 0x60, 0x60, 0x78, 0xf1, 0xe2, 0x5, 0xf7, 0xcf, 0x9f, 0x3f, 0xa7, 0x30, 0x30, 0x30, 0x30, 0xb0, 0xb3, 0xb3, 0xe7, 0x48, 0x48, 0x48, 0x60, 0xb3, 0x75, 0x30, 0x1, 0x0, 0x28, 0x20, 0x14, 0xc2, 0x1b, 0xd0, 0x7c, 0xca, 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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x72, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xb5, 0xd0, 0xb1, 0xe, 0x1, 0x61, 0x14, 0x44, 0xe1, 0xef, 0xb2, 0x5, 0x2a, 0xc4, 0x2b, 0x89, 0x58, 0x9e, 0x97, 0xac, 0x67, 0x12, 0x74, 0x34, 0x72, 0x35, 0x5b, 0xf0, 0x67, 0xb3, 0xab, 0xd9, 0xe9, 0x4e, 0x71, 0x32, 0x93, 0x61, 0xec, 0xc4, 0x37, 0x64, 0xe6, 0x11, 0x15, 0x9a, 0x88, 0x78, 0x76, 0x9, 0x93, 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0x81, 0x81, 0x81, 0x41, 0xeb, 0xe7, 0xcf, 0x9f, 0x53, 0x48, 0xd1, 0x80, 0x1, 0x8, 0x69, 0xb8, 0xc6, 0xce, 0xce, 0x9e, 0x43, 0xac, 0x86, 0xaf, 0x8c, 0x8c, 0x8c, 0x61, 0x12, 0x12, 0x12, 0x5f, 0x89, 0xd2, 0xf0, 0xff, 0xff, 0xff, 0x1c, 0x79, 0x79, 0xf9, 0xab, 0x84, 0x1d, 0x49, 0x6d, 0x0, 0x0, 0x8f, 0x30, 0x1e, 0x10, 0x6e, 0x79, 0xda, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char background_png[] = {
@@ -19,31 +19,27 @@ static const unsigned char base_green_png[] = {
};
static const unsigned char button_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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0x2, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x93, 0x31, 0x4e, 0x2, 0x61, 0x10, 0x85, 0xbf, 0xf9, 0xc3, 0x15, 0x54, 0x94, 0xc2, 0x6a, 0x2b, 0xee, 0x40, 0x1, 0xd9, 0x8e, 0x82, 0x8, 0xb6, 0x62, 0xc9, 0x66, 0xb, 0xaf, 0xf0, 0x1f, 0x2, 0x1, 0x3b, 0xa4, 0x5, 0xb, 0x63, 0xb9, 0x71, 0x4d, 0xf6, 0xc, 0x50, 0x6d, 0x65, 0x1, 0x1, 0xbd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0xe1, 0xc6, 0x48, 0x3c, 0x7d, 0x1e, 0x3e, 0xde, 0xf8, 0x31, 0x6c, 0xfe, 0x1d, 0xab, 0x15, 0x32, 0x30, 0x70, 0x5e, 0x9b, 0xfb, 0xa, 0xbb, 0x7c, 0x61, 0xa2, 0x50, 0x44, 0x45, 0xca, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char button_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, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 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, 0x4, 0x42, 0x26, 0xa1, 0xa1, 0xce, 0x8a, 0x40, 0x46, 0x7a, 0xe7, 0xcc, 0x99, 0x33, 0xca, 0x80, 0x8c, 0xd5, 0x20, 0xe1, 0x5d, 0x40, 0x1c, 0x3, 0x62, 0x1c, 0x5, 0xe2, 0x48, 0x10, 0x63, 0x2a, 0x7e, 0x6, 0x5c, 0x31, 0x58, 0xbb, 0x14, 0x10, 0xe7, 0xee, 0x9c, 0x39, 0x73, 0x1e, 0xc8, 0x40, 0x31, 0x98, 0x15, 0xe8, 0x0, 0x0, 0xec, 0xe0, 0x11, 0x6d, 0x2c, 0x6f, 0x45, 0x2b, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
-static const unsigned char button_group_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0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, 0x62, 0xe3, 0xf3, 0x69, 0x96, 0xe1, 0x78, 0xe3, 0x7f, 0x6c, 0x7e, 0x1, 0x6e, 0x8e, 0x40, 0x43, 0xe2, 0x3d, 0x6f, 0x1c, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xea, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0xd3, 0x2d, 0x52, 0x82, 0x61, 0x14, 0xc5, 0xf1, 0xdf, 0x65, 0x58, 0x80, 0x45, 0x67, 0x94, 0x60, 0xa2, 0xab, 0x7b, 0xa0, 0xf9, 0xc1, 0xb8, 0x0, 0xb5, 0x13, 0xc4, 0x1d, 0xb0, 0x3, 0x8, 0x68, 0x56, 0x56, 0x20, 0x43, 0x64, 0xf, 0x6c, 0x80, 0x64, 0x80, 0xa0, 0x5, 0x36, 0xe0, 0x35, 0xf8, 0xf2, 0x26, 0xf9, 0x98, 0xa1, 0x7a, 0xd2, 0xd, 0xf7, 0x7f, 0xee, 0x99, 0x67, 0xce, 0xc3, 0x9e, 0x8a, 0x72, 0xca, 0x8c, 0xa7, 0xa1, 0x87, 0xc, 0xd, 0x1c, 0xae, 0xd9, 0xff, 0x8a, 0x34, 0xee, 0xde, 0x78, 0x15, 0x91, 0xa5, 0x41, 0xa7, 0x93, 0x95, 0xe5, 0xb9, 0x61, 0x72, 0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42, 0x3f, 0x4c, 0x53, 0x50, 0x5f, 0x53, 0x4f, 0x5e, 0xff, 0xff, 0xff, 0x99, 0x8b, 0x2e, 0x55, 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, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x2e, 0x54, 0xd3, 0x10, 0x87, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0x97, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x65, 0xcf, 0x49, 0x12, 0x82, 0x30, 0x10, 0x5, 0xd0, 0xce, 0x48, 0x46, 0x40, 0x51, 0x4, 0x41, 0x45, 0xc4, 0x20, 0x88, 0xf7, 0xbf, 0x9e, 0x21, 0x45, 0x65, 0xa1, 0x6f, 0xd7, 0xbf, 0xaa, 0x27, 0x0, 0x84, 0x9, 0x65, 0xdc, 0x63, 0x94, 0x60, 0x4, 0x80, 0x12, 0x21, 0x95, 0x36, 0xd6, 0x1a, 0xad, 0xa4, 0x48, 0x10, 0x60, 0x91, 0x66, 0xe5, 0x29, 0x28, 0xb3, 0x54, 0x60, 0x20, 0x32, 0xaf, 0xea, 0x73, 0x50, 0x57, 0xb9, 0x24, 0x40, 0x55, 0xb3, 0xd5, 0x3e, 0x69, 0x14, 0x5, 0xa6, 0xdb, 0x4b, 0xd4, 0x6a, 0x6, 0xdc, 0x5c, 0x6f, 0xd1, 0xd5, 0x70, 0xe0, 0xb6, 0xbb, 0x47, 0x9d, 0x5d, 0x83, 0xfe, 0x11, 0xf5, 0x6b, 0x60, 0x86, 0x67, 0x34, 0xf8, 0x16, 0xa6, 0xdd, 0x18, 0x39, 0x3f, 0x94, 0x2a, 0x37, 0xbe, 0x36, 0xa3, 0xf3, 0x6b, 0x89, 0xdc, 0x4d, 0xf3, 0x3b, 0x98, 0xa7, 0xbd, 0x3f, 0xc, 0x8b, 0xe2, 0xb0, 0x7c, 0x82, 0xe5, 0x58, 0xf8, 0xd3, 0xff, 0x9e, 0xfb, 0x7d, 0xff, 0xb, 0x74, 0xeb, 0x15, 0x11, 0xe1, 0xa7, 0x60, 0xfc, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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,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0x61, 0xa7, 0x27, 0x9a, 0xc2, 0x52, 0x6e, 0xe6, 0x17, 0x9a, 0xc3, 0x59, 0xa6, 0xb3, 0xf1, 0xbd, 0x1b, 0xb3, 0xf0, 0x18, 0x55, 0xf9, 0x61, 0xf9, 0x6c, 0x96, 0x63, 0x1e, 0x5e, 0xff, 0x2b, 0xf7, 0x5b, 0xff, 0xb, 0x69, 0x5a, 0x14, 0xfa, 0x84, 0xf6, 0xc2, 0x8, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char button_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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0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0x25, 0xb, 0xb3, 0xa2, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char checked_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, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0xa, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xc5, 0x92, 0x3d, 0x6a, 0xc3, 0x40, 0x10, 0x46, 0xbf, 0x4f, 0x3f, 0xbd, 0x4d, 0x88, 0xd3, 0xed, 0xa, 0xcc, 0x9e, 0x22, 0x4d, 0x20, 0xc7, 0x91, 0xfb, 0xf8, 0x6, 0x82, 0xa4, 0xb, 0x4e, 0xf0, 0x25, 0xe4, 0x6b, 0xe4, 0x10, 0x8b, 0xa, 0x6d, 0xb1, 0x10, 0x37, 0x72, 0xbd, 0xa, 0x4c, 0x1a, 0x9, 0x14, 0xdb, 0x92, 0x52, 0x25, 0x53, 0xcd, 0x30, 0xfb, 0xde, 0xce, 0xc0, 0x0, 0xff, 0x1d, 0xec, 0x93, 0xba, 0xae, 0xef, 0x45, 0x64, 0xb, 0xe0, 0x76, 0x12, 0x20, 0x8f, 0x22, 0x52, 0x64, 0x59, 0xf6, 0x1, 0x0, 0xd1, 0xa0, 0xf7, 0x34, 0x7, 0x3, 0x80, 0x88, 0xac, 0x48, 0x6e, 0xfb, 0x3a, 0x1a, 0x36, 0x66, 0xd8, 0x86, 0xe4, 0xa1, 0x7b, 0x7b, 0x77, 0x21, 0x98, 0x83, 0xdb, 0xb6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0x2d, 0xb9, 0x5, 0xa1, 0xc, 0x6d, 0xb0, 0xa2, 0x1a, 0x9b, 0xad, 0x12, 0x3d, 0xec, 0x70, 0xdf, 0x36, 0x58, 0x9b, 0x1, 0xe, 0xc7, 0xd3, 0x19, 0x4b, 0xfa, 0x80, 0x9d, 0xc9, 0xd2, 0xcb, 0x18, 0xae, 0x88, 0x37, 0x1a, 0x43, 0x91, 0xdf, 0x1f, 0x6f, 0x70, 0x6b, 0x5f, 0x69, 0xb7, 0x76, 0x38, 0xcc, 0xe8, 0x24, 0xec, 0xe, 0x83, 0x28, 0xec, 0x4f, 0x97, 0xcb, 0x8, 0xbe, 0x9e, 0xe3, 0xcc, 0x3d, 0xf7, 0xd3, 0x13, 0x10, 0x58, 0xd, 0x44, 0xd4, 0xa5, 0x38, 0x3e, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char checker_bg_png[] = {
@@ -51,11 +47,11 @@ static const unsigned char checker_bg_png[] = {
};
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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xbe, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xd5, 0x90, 0x3b, 0xe, 0xc2, 0x40, 0xc, 0x44, 0x9f, 0x9, 0x45, 0xf8, 0x14, 0x80, 0xb8, 0xf, 0x15, 0x8a, 0x8, 0x48, 0xdc, 0x94, 0x8a, 0x4, 0x85, 0x9a, 0xe3, 0x20, 0x48, 0xc3, 0xa7, 0x20, 0x32, 0x8d, 0x41, 0x8b, 0xc9, 0x4a, 0xb4, 0xb8, 0xda, 0x1d, 0x7b, 0x9e, 0x35, 0x86, 0xbf, 0x2f, 0x9, 0x3f, 0xaa, 0xba, 0x2, 0xba, 0x40, 0x25, 0x22, 0x37, 0xd7, 0xeb, 0x1, 0x19, 0xf0, 0x10, 0x91, 0xed, 0x4b, 0xef, 0x38, 0x60, 0x2, 0x4c, 0x81, 0xdc, 0xc, 0xa1, 0x39, 0xb7, 0x5e, 0x12, 0x1a, 0x3c, 0xa0, 0x2, 0x4e, 0xc0, 0x18, 0x58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 0x58, 0xd0, 0xd3, 0xf0, 0xa3, 0x7c, 0x36, 0x3c, 0x82, 0x48, 0x44, 0x22, 0x6f, 0xb1, 0x4d, 0x85, 0x14, 0x81, 0xf, 0x2c, 0x28, 0xe0, 0xda, 0xd5, 0x8c, 0x4e, 0x77, 0xb, 0xfc, 0xd5, 0x98, 0xd9, 0x20, 0x29, 0x7a, 0xb9, 0xa4, 0x68, 0x66, 0x83, 0xb, 0x93, 0xcc, 0x24, 0xa7, 0x9a, 0x44, 0x52, 0x24, 0x39, 0x91, 0xcc, 0x55, 0x89, 0xa4, 0xde, 0xcc, 0xce, 0x24, 0xb, 0xc9, 0x39, 0x84, 0xb0, 0xf7, 0xb2, 0xae, 0xeb, 0x76, 0xde, 0x8a, 0x4f, 0x92, 0x66, 0xd8, 0x91, 0x5c, 0x49, 0x5e, 0x9a, 0xe1, 0xb5, 0x64, 0x5, 0x16, 0x92, 0x8b, 0x7, 0x6f, 0x9b, 0x8c, 0x0, 0x4a, 0x29, 0x9b, 0x26, 0x81, 0xa4, 0x3e, 0xa5, 0x34, 0x2, 0x38, 0x2, 0x58, 0x0, 0xcc, 0x0, 0xe, 0x39, 0xe7, 0xd3, 0xfa, 0xb0, 0xee, 0xea, 0x8f, 0x7, 0x7b, 0xf5, 0x9d, 0xb7, 0xb0, 0x97, 0x55, 0x25, 0x5f, 0x17, 0xe9, 0x2e, 0xf9, 0xb8, 0xca, 0x3f, 0x9b, 0x1b, 0x1a, 0xe3, 0x40, 0x47, 0xa0, 0xda, 0xda, 0x61, 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, 0x6, 0x0, 0x0, 0x0, 0x1f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0x8a, 0x4f, 0x92, 0x66, 0xd8, 0x91, 0x5c, 0x49, 0x5e, 0x9a, 0xe1, 0xb5, 0x64, 0x5, 0x16, 0x92, 0x8b, 0x7, 0x6f, 0x9b, 0x8c, 0x0, 0x4a, 0x29, 0x9b, 0x26, 0x81, 0xa4, 0x3e, 0xa5, 0x34, 0x2, 0x38, 0x2, 0x58, 0x0, 0xcc, 0x0, 0xe, 0x39, 0xe7, 0xd3, 0xfa, 0xb0, 0xee, 0xea, 0x8f, 0x7, 0x7b, 0xf5, 0x9d, 0xb7, 0xb0, 0x97, 0x55, 0x25, 0x5f, 0x17, 0xe9, 0x2e, 0xf9, 0xb8, 0xca, 0x3f, 0x9b, 0x1b, 0x1a, 0xe3, 0x40, 0x47, 0xa0, 0xda, 0xda, 0x61, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char color_picker_hue_png[] = {
@@ -71,7 +67,7 @@ static const unsigned char dosfont_png[] = {
};
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, 0x6, 0x0, 0x0, 0x0, 0xc4, 0xf, 0xbe, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x68, 0x49, 0x44, 0x41, 0x54, 0x18, 0x95, 0xa5, 0x8e, 0x21, 0xe, 0xc3, 0x60, 0x14, 0x82, 0x3f, 0xfe, 0xa4, 0x99, 0xee, 0x9, 0x9e, 0xa8, 0xe9, 0xe1, 0x66, 0x76, 0x92, 0x99, 0x9a, 0x1d, 0x6e, 0x82, 0x13, 0x54, 0xcf, 0xf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b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char error_icon_png[] = {
@@ -79,19 +75,19 @@ static const unsigned char error_icon_png[] = {
};
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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xf, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x80, 0x3a, 0x0, 0x0, 0x2, 0x4c, 0x0, 0x1, 0x4e, 0x94, 0x8c, 0x4d, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0,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0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe0, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 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, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const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x6d, 0xb8, 0xf4, 0x9c, 0xac, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char full_panel_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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0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 0x81, 0xb4, 0x8c, 0x75, 0x60, 0x14, 0x25, 0x20, 0xab, 0xf3, 0x24, 0xcc, 0x6a, 0x57, 0xb8, 0xc2, 0xff, 0x42, 0x76, 0xda, 0xf4, 0xf6, 0x69, 0x38, 0x69, 0x7a, 0x79, 0xbc, 0x49, 0xfe, 0x2f, 0x65, 0xd3, 0x2d, 0x45, 0xb, 0x5e, 0xbc, 0x3b, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x46, 0x8, 0x6, 0x0, 0x0, 0x0, 0xc5, 0x24, 0x14, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff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x63, 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[] = {
@@ -103,11 +99,11 @@ static const unsigned char graph_node_close_png[] = {
};
static const unsigned char graph_node_comment_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x46, 0x8, 0x6, 0x0, 0x0, 0x0, 0xc5, 0x24, 0x14, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x8b, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xed, 0xd8, 0xb1, 0xd, 0xc2, 0x40, 0xc, 0x5, 0xd0, 0x97, 0x28, 0x75, 0x90, 0x18, 0x6, 0x58, 0x80, 0x92, 0x82, 0x1d, 0x18, 0x8b, 0x2d, 0x22, 0xa, 0xd8, 0x0, 0xb6, 0xc9, 0x4, 0x47, 0x13, 0x4, 0x25, 0xc9, 0x41, 0xf7, 0x5d, 0xf9, 0x24, 0xff, 0x77, 0xae, 0x4d, 0x65, 0x35, 0xa5, 0x94, 0xe, 0x7, 0x6c, 0xb0, 0xfa, 0x32, 0x37, 0xe2, 0x81, 0xa1, 0x29, 0xa5, 0x1c, 0xb1, 0x5f, 0xb8, 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, 0xf2, 0x28, 0xe4, 0xe2, 0x7f, 0xea, 0x13, 0x64, 0x47, 0x6c, 0x83, 0x36, 0x6d, 0xd2, 0x40, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char graph_node_comment_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, 0x46, 0x8, 0x6, 0x0, 0x0, 0x0, 0xc5, 0x24, 0x14, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x97, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xed, 0xd8, 0xb1, 0x11, 0xc2, 0x30, 0x10, 0x44, 0xd1, 0x7f, 0x8c, 0x87, 0xe, 0x80, 0xd4, 0x94, 0xa4, 0x2a, 0xa0, 0x0, 0x12, 0x5c, 0x3, 0x10, 0x9a, 0x2e, 0xa0, 0x11, 0x9a, 0x20, 0xb4, 0x29, 0x62, 0x9, 0xd0, 0xc, 0x84, 0xb6, 0x6c, 0xb2, 0xbd, 0x44, 0xa7, 0x60, 0x9f, 0x36, 0x16, 0x4c, 0x9c, 0x90, 0xb4, 0x4, 0xe, 0x40, 0x2, 0xd6, 0x3, 0x73, 0x3d, 0x70, 0x3, 0x4e, 0x21, 0xa9, 0x1, 0x76, 0x85, 0x5, 0xae, 0x21, 0xe9, 0x1, 0xac, 0xa, 0x81, 0x57, 0x48, 0x7a, 0x16, 0x86, 0x1, 0x58, 0x4c, 0x9, 0x1b, 0x30, 0x60, 0xc0, 0xc0, 0xac, 0x40, 0xf5, 0xb3, 0xa7, 0x91, 0xd9, 0xfb, 0x2c, 0xd, 0x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, 0x7d, 0x16, 0x1, 0x45, 0xfd, 0xab, 0x18, 0x1, 0x9d, 0x78, 0x25, 0x83, 0xa8, 0xe0, 0x9d, 0x4a, 0x80, 0x4, 0x48, 0x80, 0x7f, 0x1a, 0xea, 0xf1, 0xda, 0xc, 0xe, 0x38, 0xd8, 0xdf, 0x5b, 0x7d, 0x8b, 0x69, 0x69, 0xf9, 0xf3, 0x6e, 0xba, 0x85, 0x4, 0x48, 0x80, 0x4, 0x48, 0x80, 0x4, 0x48, 0x80, 0x4, 0xf8, 0xaf, 0x80, 0xac, 0x47, 0x46, 0xec, 0x7b, 0x7, 0xf9, 0x0, 0xde, 0x3c, 0x2, 0x72, 0xdc, 0xa0, 0xd5, 0x87, 0xb9, 0x15, 0x3c, 0x79, 0x21, 0x44, 0xd9, 0x33, 0x34, 0xbb, 0x3f, 0x4f, 0xaf, 0x7c, 0xb0, 0x9a, 0xc1, 0xd3, 0x8e, 0xc9, 0x75, 0x1c, 0xb, 0x8d, 0x6a, 0x65, 0xb, 0xf3, 0x2f, 0x34, 0x37, 0xc7, 0x71, 0xb9, 0x56, 0xff, 0x8a, 0x23, 0x5c, 0x64, 0x5d, 0x11, 0x6e, 0xc, 0x33, 0x98, 0xc4, 0xc8, 0x33, 0xe1, 0xbb, 0x85, 0x3f, 0xf8, 0x15, 0x72, 0x74, 0x3b, 0x7b, 0xd4, 0xd0, 0xa1, 0x98, 0x7, 0x9f, 0xd9, 0x41, 0x27, 0x1c, 0xf9, 0x6e, 0xc0, 0xc6, 0x3f, 0xd5, 0x5f, 0x9d, 0x54, 0x4e, 0x15, 0xfd, 0xeb, 0xb4, 0x4f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char graph_node_default_png[] = {
@@ -119,11 +115,11 @@ static const unsigned char graph_node_default_focus_png[] = {
};
static const unsigned char graph_node_position_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1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0x88, 0x1b, 0xd8, 0x9b, 0xe6, 0x84, 0x53, 0x48, 0x10, 0x14, 0x52, 0xe4, 0x5d, 0x25, 0xfe, 0x7c, 0x9e, 0x58, 0x3d, 0xa2, 0xcd, 0x52, 0x7d, 0x50, 0x63, 0xb8, 0x88, 0xc8, 0x2d, 0x9e, 0x2b, 0x36, 0x65, 0x4f, 0xf2, 0x30, 0x3, 0x4b, 0x25, 0xf7, 0x1b, 0x9e, 0x73, 0x36, 0x65, 0xb5, 0xd0, 0x49, 0xb1, 0x29, 0x7b, 0x9b, 0xb2, 0xaf, 0x31, 0x34, 0x9, 0xc8, 0x67, 0x50, 0xc7, 0x9e, 0x6e, 0x96, 0xed, 0xeb, 0x69, 0x8f, 0x1b, 0xde, 0x36, 0x15, 0xaf, 0xd, 0xdd, 0xe9, 0xdd, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x1f, 0x1, 0xe5, 0x2d, 0x3f, 0xf2, 0x5a, 0x91, 0x73, 0x66, 0x4e, 0x65, 0x1c, 0xed, 0xda, 0x52, 0x62, 0x3d, 0x91, 0x5c, 0xcf, 0x64, 0xe7, 0x4f, 0xeb, 0x6, 0x80, 0xff, 0x44, 0x93, 0xd4, 0xd9, 0xea, 0x7e, 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, 0x46, 0x8, 0x6, 0x0, 0x0, 0x0, 0xc5, 0x24, 0x14, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xb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0x14, 0x8e, 0xd0, 0x6a, 0xb5, 0x78, 0x6d, 0x6d, 0xcd, 0x10, 0xc5, 0xdb, 0xba, 0x7f, 0x0, 0xb2, 0x1f, 0xaf, 0x82, 0x62, 0x7a, 0x69, 0xbb, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char graph_port_png[] = {
@@ -131,19 +127,19 @@ static const unsigned char graph_port_png[] = {
};
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, 0x8, 0x6, 0x0, 0x0, 0x0, 0xc4, 0xf, 0xbe, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xf, 0x49, 0x44, 0x41, 0x54, 0x18, 0x95, 0x63, 0x60, 0x18, 0x5, 0xc, 0xc, 0xc, 0xc, 0x0, 0x1, 0x8, 0x0, 0x1, 0x7d, 0x41, 0xa5, 0xce, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 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, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0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0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x66, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0xd0, 0xab, 0xe, 0x83, 0x50, 0x10, 0x84, 0xe1, 0xf, 0x4e, 0x48, 0x4d, 0xd5, 0x31, 0x4d, 0xe0, 0xfd, 0x5f, 0xd, 0xc, 0xc5, 0x50, 0x87, 0x0, 0x73, 0xb8, 0x8, 0x1a, 0x8, 0x58, 0x7e, 0xb3, 0xc9, 0x24, 0x33, 0xbb, 0xb3, 0x3c, 0xdc, 0x26, 0xdb, 0xcc, 0x12, 0x11, 0xc5, 0x81, 0x67, 0x40, 0x87, 0x1a, 0x63, 0x48, 0x62, 0x85, 0xf, 0xc2, 0x3f, 0xd7, 0x86, 0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x7c, 0x28, 0xb5, 0x75, 0xd6, 0x6a, 0x9, 0xde, 0x0, 0x52, 0xe9, 0xe7, 0xa3, 0x17, 0x42, 0xb0, 0xb1, 0x9e, 0xaf, 0x1a, 0xad, 0x5c, 0x88, 0x93, 0x6d, 0xff, 0x3e, 0xdd, 0x37, 0x8e, 0x4d, 0x14, 0xef, 0xd8, 0x48, 0x89, 0x63, 0x45, 0x31, 0x51, 0x7d, 0xe8, 0x2, 0xf5, 0xf, 0x9, 0x67, 0xd9, 0x88, 0x8f, 0x5b, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xfd, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xad, 0x92, 0x31, 0x4e, 0xc3, 0x30, 0x18, 0x46, 0x9f, 0x7f, 0xc9, 0xde, 0x60, 0x83, 0xb, 0x50, 0xc8, 0x10, 0x45, 0x96, 0x72, 0x8d, 0x76, 0x84, 0x1e, 0x20, 0x7b, 0xb9, 0x4c, 0x66, 0xe, 0x80, 0x54, 0xb1, 0xb4, 0x5c, 0x23, 0x52, 0x32, 0x56, 0xf4, 0x2, 0x85, 0x85, 0x76, 0x8c, 0x94, 0x9f, 0x25, 0x89, 0xa2, 0x94, 0x56, 0xb5, 0xe0, 0x1b, 0x3f, 0xe9, 0xbd, 0xcf, 0xb6, 0xc, 0x7f, 0x8c, 0x19, 0x17, 0x65, 0x59, 0xde, 0x8a, 0xc8, 0x33, 0x30, 0x5, 0xee, 0x1, 0x54, 0x75, 0x3, 0xbc, 0xab, 0x6a, 0xee, 0xbd, 0xdf, 0x9d, 0x14, 0x54, 0x55, 0xf5, 0x64, 0x8c, 0x79, 0x1, 0xae, 0x4e, 0xc, 0x1e, 0x44, 0x24, 0x8b, 0xe3, 0x78, 0x79, 0x24, 0x68, 0xe1, 0xd7, 0xdf, 0x4e, 0x35, 0x8a, 0x8a, 0xc8, 0xbc, 0x93, 0x98, 0xc1, 0xb1, 0x3f, 0xce, 0x2c, 0x8f, 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0xce, 0x5f, 0xbf, 0x39, 0xca, 0x67, 0x21, 0x18, 0x66, 0x3b, 0x0, 0xf8, 0x4, 0x7e, 0x5c, 0x62, 0x33, 0x51, 0xf0, 0xbb, 0xff, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0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xd9, 0xc2, 0x84, 0x52, 0x82, 0xad, 0x4c, 0x0, 0xb6, 0xb9, 0x10, 0xdc, 0xc6, 0x40, 0x3, 0x24, 0x3c, 0x92, 0x32, 0xe2, 0x4, 0x6a, 0x40, 0x54, 0xc8, 0x64, 0x4, 0x45, 0x1a, 0x9c, 0xd2, 0x29, 0x85, 0x73, 0xd9, 0xd1, 0x50, 0xa9, 0x5e, 0x52, 0xb8, 0xd6, 0xea, 0x1a, 0x1a, 0xcd, 0x5b, 0xa, 0xf7, 0x56, 0x5b, 0x43, 0xa7, 0xdb, 0x53, 0x52, 0xaa, 0xfe, 0x80, 0x65, 0x3d, 0x86, 0xa3, 0x58, 0xca, 0x78, 0x3c, 0x99, 0x6a, 0x70, 0x67, 0xf3, 0x87, 0x52, 0xcf, 0xc5, 0x32, 0xaf, 0xee, 0xf9, 0xab, 0xd7, 0x7b, 0xed, 0x7b, 0xc5, 0x33, 0xc1, 0x66, 0xbb, 0xdb, 0xb3, 0x22, 0x27, 0x47, 0x87, 0xa3, 0xe5, 0xfe, 0xfe, 0x1b, 0x6, 0x2c, 0xfc, 0x6e, 0x1f, 0x93, 0x2a, 0x10, 0x62, 0x3, 0x21, 0x32, 0x75, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char hslider_tick_png[] = {
@@ -151,11 +147,11 @@ static const unsigned char hslider_tick_png[] = {
};
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, 0x8, 0x6, 0x0, 0x0, 0x0, 0xc4, 0xf, 0xbe, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x15, 0x49, 0x44, 0x41, 0x54, 0x18, 0x95, 0x63, 0x64, 0x60, 0x60, 0x30, 0x62, 0xc0, 0x3, 0x98, 0xf0, 0x49, 0xe, 0x1f, 0x5, 0x0, 0x3c, 0x10, 0x0, 0x42, 0xb5, 0xb3, 0xc, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52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, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, 0x81, 0xe, 0x17, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x27, 0x4, 0x36, 0x8a, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x39, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0x63, 0x60, 0x20, 0x5, 0xfc, 0xff, 0xff, 0xdf, 0xe7, 0xff, 0xff, 0xff, 0x3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, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe0, 0x6, 0x16, 0x12, 0x2b, 0x4, 0x4e, 0x1d, 0x2, 0xaf, 0x0, 0x0, 0x0, 0x27, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x63, 0x60, 0x80, 0x2, 0x66, 0x86, 0x5, 0xa2, 0xe7, 0x18, 0x16, 0x88, 0x9e, 0x63, 0x66, 0x10, 0xbd, 0xf6, 0x98, 0x41, 0xf4, 0xda, 0x63, 0x6, 0xc, 0x30, 0xaa, 0x66, 0x54, 0xd, 0x9a, 0x1a, 0x0, 0x5c, 0x29, 0x6a, 0x81, 0x90, 0x8f, 0x52, 0x12, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char icon_add_png[] = {
@@ -163,7 +159,7 @@ static const unsigned char icon_add_png[] = {
};
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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xbe, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xd5, 0x90, 0x3b, 0xe, 0xc2, 0x40, 0xc, 0x44, 0x9f, 0x9, 0x45, 0xf8, 0x14, 0x80, 0xb8, 0xf, 0x15, 0x8a, 0x8, 0x48, 0xdc, 0x94, 0x8a, 0x4, 0x85, 0x9a, 0xe3, 0x20, 0x48, 0xc3, 0xa7, 0x20, 0x32, 0x8d, 0x41, 0x8b, 0xc9, 0x4a, 0xb4, 0xb8, 0xda, 0x1d, 0x7b, 0x9e, 0x35, 0x86, 0xbf, 0x2f, 0x9, 0x3f, 0xaa, 0xba, 0x2, 0xba, 0x40, 0x25, 0x22, 0x37, 0xd7, 0xeb, 0x1, 0x19, 0xf0, 0x10, 0x91, 0xed, 0x4b, 0xef, 0x38, 0x60, 0x2, 0x4c, 0x81, 0xdc, 0xc, 0xa1, 0x39, 0xb7, 0x5e, 0x12, 0x1a, 0x3c, 0xa0, 0x2, 0x4e, 0xc0, 0x18, 0x58, 0xaa, 0x6a, 0x5f, 0x55, 0x53, 0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x7c, 0x36, 0x3c, 0x82, 0x48, 0x44, 0x22, 0x6f, 0xb1, 0x4d, 0x85, 0x14, 0x81, 0xf, 0x2c, 0x28, 0xe0, 0xda, 0xd5, 0x8c, 0x4e, 0x77, 0xb, 0xfc, 0xd5, 0x98, 0xd9, 0x20, 0x29, 0x7a, 0xb9, 0xa4, 0x68, 0x66, 0x83, 0xb, 0x93, 0xcc, 0x24, 0xa7, 0x9a, 0x44, 0x52, 0x24, 0x39, 0x91, 0xcc, 0x55, 0x89, 0xa4, 0xde, 0xcc, 0xce, 0x24, 0xb, 0xc9, 0x39, 0x84, 0xb0, 0xf7, 0xb2, 0xae, 0xeb, 0x76, 0xde, 0x8a, 0x4f, 0x92, 0x66, 0xd8, 0x91, 0x5c, 0x49, 0x5e, 0x9a, 0xe1, 0xb5, 0x64, 0x5, 0x16, 0x92, 0x8b, 0x7, 0x6f, 0x9b, 0x8c, 0x0, 0x4a, 0x29, 0x9b, 0x26, 0x81, 0xa4, 0x3e, 0xa5, 0x34, 0x2, 0x38, 0x2, 0x58, 0x0, 0xcc, 0x0, 0xe, 0x39, 0xe7, 0xd3, 0xfa, 0xb0, 0xee, 0xea, 0x8f, 0x7, 0x7b, 0xf5, 0x9d, 0xb7, 0xb0, 0x97, 0x55, 0x25, 0x5f, 0x17, 0xe9, 0x2e, 0xf9, 0xb8, 0xca, 0x3f, 0x9b, 0x1b, 0x1a, 0xe3, 0x40, 0x47, 0xa0, 0xda, 0xda, 0x61, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char icon_color_pick_png[] = {
@@ -203,19 +199,15 @@ static const unsigned char icon_zoom_reset_png[] = {
};
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, 0x10, 0x0, 0x0, 0x0, 0x10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, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char line_edit_active_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, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0x50, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xdd, 0x93, 0x4d, 0x4b, 0x2, 0x51, 0x14, 0x86, 0xdf, 0x73, 0x66, 0xc, 0x1d, 0x87, 0xa0, 0xa8, 0x4c, 0x27, 0x19, 0x49, 0xc, 0x84, 0x24, 0xda, 0xe4, 0x52, 0x22, 0xdc, 0x44, 0x44, 0x2d, 0x86, 0x5a, 0xba, 0xb1, 0x68, 0xef, 0xf, 0xf0, 0x6f, 0xb4, 0xab, 0x6d, 0x9b, 0x16, 0xe1, 0xaa, 0x24, 0x5a, 0x16, 0xf4, 0x69, 0x3f, 0xc0, 0x82, 0xd2, 0x8a, 0x8, 0x2, 0x47, 0xa1, 0x69, 0x4e, 0xb, 0x41, 0x5c, 0x4c, 0x29, 0xb8, 0xeb, 0x81, 0xb, 0x77, 0x71, 0xde, 0xe7, 0xbe, 0x67, 0x71, 0x81, 0x1, 0xa1, 0xee, 0x7b, 0x2a, 0x9d, 0xc9, 0x41, 0x38, 0x2b, 0x24, 0xe3, 0x9e, 0xc3, 0x42, 0x6f, 0x20, 0xf7, 0xb8, 0x72, 0x7e, 0xb6, 0x7, 0x40, 0xba, 0x5, 0x3c, 0xbb, 0xb0, 0x78, 0x4, 0xc8, 0x32, 0x11, 0x39, 0x20, 0x52, 0x3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32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x10, 0x0, 0x0, 0x0, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0x3a, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xdd, 0x93, 0x31, 0x4b, 0x3, 0x41, 0x10, 0x85, 0xdf, 0xcc, 0xec, 0x6d, 0x8c, 0x26, 0x7a, 0x20, 0x51, 0x4c, 0x1a, 0x2b, 0x2b, 0xd3, 0x9a, 0x32, 0x88, 0xa4, 0x11, 0xb1, 0xbb, 0x3e, 0x95, 0x62, 0xef, 0x9f, 0xb1, 0xb3, 0xb4, 0x17, 0x41, 0xd0, 0x20, 0x16, 0x16, 0x5a, 0x9, 0xfa, 0x3, 0x52,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x57, 0x81, 0xe, 0x17, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
-static const unsigned char line_edit_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, 0x10, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0x50, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xdd, 0x93, 0x4d, 0x4b, 0x2, 0x51, 0x14, 0x86, 0xdf, 0x73, 0x66, 0xc, 0x1d, 0x87, 0xa0, 0xa8, 0x4c, 0x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x25, 0xa5, 0xab, 0x35, 0x5, 0x6c, 0x18, 0x63, 0x5b, 0xd6, 0x7, 0xd8, 0x71, 0xcf, 0xe3, 0x9c, 0xfb, 0x9c, 0x7b, 0x3e, 0x40, 0x4, 0xfb, 0xe0, 0x10, 0x84, 0xa1, 0x8, 0x85, 0x0, 0x1c, 0x4f, 0xe7, 0x28, 0xbe, 0x44, 0x71, 0x9c, 0x24, 0x67, 0xc0, 0x35, 0x4d, 0xb3, 0x2c, 0xcb, 0xcd, 0x4b, 0x73, 0x40, 0x71, 0x33, 0x15, 0xe5, 0xfd, 0x51, 0x16, 0x25, 0xa0, 0x92, 0xf2, 0xf9, 0x92, 0xbf, 0x2a, 0x9, 0x50, 0xaa, 0x56, 0xef, 0x46, 0xb5, 0x4d, 0x5b, 0x37, 0x0, 0xdd, 0x7d, 0xb4, 0x36, 0xdb, 0x69, 0xad, 0x1, 0x7f, 0xc7, 0x59, 0xc3, 0xf3, 0xad, 0x2f, 0x30, 0x4f, 0x11, 0x50, 0x3e, 0x12, 0x48, 0xdb, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char logo_png[] = {
@@ -223,31 +215,35 @@ static const unsigned char logo_png[] = {
};
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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x82, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xcd, 0x90, 0x31, 0xa, 0xc2, 0x50, 0x10, 0x44, 0xdf, 0x4f, 0x95, 0x46, 0xc8, 0xc7, 0xdc, 0x40, 0x1b, 0xbd, 0x9a, 0xc7, 0x89, 0xb1, 0xb0, 0x48, 0x44, 0xb0, 0xf0, 0x26, 0x5e, 0x42, 0xd0, 0x5e, 0xcf, 0xf0, 0x6c, 0xb6, 0xf8, 0x1, 0xd1, 0x36, 0x53, 0xce, 0xbe, 0x59, 0x86, 0x81, 0x79, 0x4a, 0x3d, 0xa8, 0xa3, 0xda, 0x7c, 0xb9, 0x35, 0xea, 0xa0, 0x1e, 0x1, 0xaa, 0xf0, 0x6b, 0x60, 0x3, 0x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xf8, 0x85, 0x62, 0x8c, 0x21, 0xc6, 0x18, 0xb6, 0x32, 0x59, 0x83, 0x94, 0xd2, 0x5e, 0x55, 0x6f, 0x0, 0x22, 0x72, 0xf0, 0xde, 0xdf, 0xdb, 0x7c, 0xd7, 0x9a, 0x9c, 0xb3, 0x55, 0xd5, 0x9, 0xb0, 0x80, 0x55, 0xd5, 0x29, 0xe7, 0x6c, 0x5f, 0x16, 0x6a, 0xad, 0x67, 0x60, 0x68, 0xd0, 0xb0, 0xb0, 0x3f, 0xaa, 0x3b, 0x3a, 0xa5, 0x74, 0x51, 0xd5, 0xd0, 0xd, 0x88, 0x5c, 0xbd, 0xf7, 0xc7, 0xa7, 0xef, 0x6e, 0x30, 0xc6, 0x9c, 0x80, 0xb9, 0x41, 0xf3, 0xc2, 0xd8, 0x2c, 0x38, 0xe7, 0x8a, 0x88, 0x8c, 0x40, 0x1, 0x8a, 0x88, 0x8c, 0xce, 0xb9, 0xf2, 0x71, 0xcf, 0x77, 0x8f, 0xfb, 0x5a, 0xf, 0x28, 0x4a, 0x37, 0xff, 0x58, 0x46, 0x7b, 0x50, 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, 0x6, 0x0, 0x0, 0x0, 0x77, 0x0, 0x7d, 0x59, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0xf, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xed, 0xd5, 0x31, 0x4a, 0x3, 0x41, 0x18, 0x86, 0xe1, 0x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, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+static const unsigned char option_button_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, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a, 0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80, 0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a, 0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x0, 0xb4, 0x50, 0x4c, 0x54, 0x45, 0x95, 0xa9, 0xb0, 0x92, 0xa7, 0xae, 0x8e, 0xa2, 0xa9, 0x8a, 0x9d, 0xa4, 0x85, 0x98, 0x9f, 0x80, 0x93, 0x9b, 0x7b, 0x8f, 0x96, 0x77, 0x8a, 0x92, 0x72, 0x86, 0x8c, 0x6e, 0x80, 0x88, 0x69, 0x7c, 0x84, 0x64, 0x77, 0x7f, 0x60, 0x72, 0x7a, 0x5b, 0x6e, 0x75, 0x56, 0x69, 0x71, 0xc8, 0xe3, 0xe7, 0xc8, 0xe2, 0xe7, 0xca, 0xe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, 0x70, 0x1d, 0xe0, 0xb5, 0xa0, 0xe5, 0x1b, 0x69, 0xca, 0xd8, 0x8d, 0x31, 0x96, 0x65, 0x68, 0x96, 0xa4, 0x36, 0x60, 0x3, 0x34, 0x2a, 0x69, 0xed, 0xf8, 0x7a, 0xab, 0x91, 0xfe, 0xf9, 0x8e, 0x7c, 0x74, 0xd2, 0x27, 0x7e, 0x7e, 0x46, 0x20, 0x17, 0xe, 0x2d, 0x4e, 0x9, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char option_button_hover_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, 0x6, 0x0, 0x0, 0x0, 0x77, 0x0, 0x7d, 0x59, 0x0, 0x0, 0x0, 0x6,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2d, 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, 0xff, 0xff, 0xff, 0xd1, 0x85, 0xc5, 0x5, 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, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x6b, 0x52, 0x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 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char option_button_normal_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x1c, 0x8, 0x6, 0x0, 0x0, 0x0, 0x0, 0xc2, 0xbd, 0x22, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x19, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xed, 0xc1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x82, 0x20, 0xff, 0xaf, 0x6e, 0x48, 0x40, 0x1, 0x0, 0x0, 0xf0, 0x6e, 0xe, 0x1c, 0x0, 0x1, 0xe8, 0x20, 0x47, 0xc2, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 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, 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 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, 0x21, 0x25, 0x23, 0x23, 0x27, 0x20, 0x20, 0x24, 0x1d, 0x1d, 0x21, 0x36, 0x34, 0x3e, 0x44, 0x41, 0x4e, 0x1f, 0x1f, 0x24, 0x1f, 0x1f, 0x23, 0x1e, 0x1e, 0x21, 0x44, 0x42, 0x4d, 0x44, 0x41, 0x4c, 0x4e, 0x4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7f, 0x3e, 0xeb, 0xaf, 0xef, 0xfe, 0x6, 0x1a, 0x96, 0x59, 0x89, 0x91, 0xf7, 0xf1, 0x7b, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x77, 0x0, 0x7d, 0x59, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xf3, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xed, 0xd5, 0x31, 0x4a, 0x3, 0x41, 0x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 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, 0xff, 0xff, 0xff, 0x2, 0x4e, 0xff, 0xf1, 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, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x6e, 0x22, 0xf, 0x51, 0x17, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x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0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80, 0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a, 0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0x25, 0x25, 0x2a, 0x35, 0x32, 0x3b, 0x4a, 0x73, 0x58, 0x4a, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x1, 0xff, 0x2, 0x2d, 0xde, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0xb, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x40, 0x5, 0x0, 0x0, 0x10, 0x0, 0x1, 0xa1, 0xc5, 0x21, 0xc1, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char popup_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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0x5e, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x93, 0x31, 0x4b, 0x1c, 0x51, 0x14, 0x85, 0xbf, 0x77, 0x67, 0xde, 0x9b, 0x85, 0x71, 0x58, 0xc, 0x51, 0xc2, 0x16, 0x6, 0x2c, 0x42, 0x48, 0x29, 0x81, 0x5d, 0x42, 0x8, 0xb6, 0x8a, 0x42, 0xba, 0x74, 0xfe, 0x87, 0xfc, 0x92, 0x14, 0xf9, 0x15, 0x69, 0x55, 0x4c, 0x17, 0xb6, 0x58, 0xc2, 0x6, 0xf6, 0x17, 0xb8, 0xcd, 0x36, 0x2e, 0xc2, 0x80, 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7a, 0x61, 0x14, 0xef, 0xa4, 0x38, 0xa, 0x3d, 0x53, 0x3, 0x62, 0xf1, 0xa4, 0xed, 0x50, 0x9b, 0x70, 0x8b, 0x0, 0xb5, 0xd3, 0xac, 0xeb, 0x51, 0x97, 0xa5, 0x36, 0x5, 0x9d, 0x89, 0xbc, 0xbf, 0xa3, 0x3e, 0x17, 0x4c, 0x7, 0xdd, 0x9, 0x8a, 0xe1, 0x81, 0x86, 0x22, 0x70, 0x30, 0x28, 0xc7, 0x27, 0x1a, 0x4b, 0xc, 0x98, 0xd8, 0x4f, 0x2f, 0x34, 0xed, 0xb7, 0x13, 0x59, 0x7a, 0x98, 0x17, 0x34, 0x1f, 0xb7, 0x52, 0x52, 0xf1, 0x7a, 0x5d, 0xde, 0xd2, 0xb2, 0x9e, 0x78, 0x45, 0xb6, 0x61, 0xe7, 0xba, 0xb9, 0x48, 0xcd, 0xf5, 0xb6, 0xd, 0xc3, 0xe9, 0xe9, 0xd7, 0xf4, 0xbf, 0xe7, 0x7e, 0xdf, 0xff, 0x0, 0xda, 0x19, 0x15, 0x34, 0xd5, 0xa4, 0x90, 0x50, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char popup_bg_disabled_png[] = {
@@ -258,24 +254,32 @@ static const unsigned char popup_checked_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, 0x6, 0x0, 0x0, 0x0, 0xc4, 0xf, 0xbe, 0x8b, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xa3, 0x49, 0x44, 0x41, 0x54, 0x18, 0x95, 0x85, 0xcd, 0xa1, 0xa, 0xc2, 0x50, 0x0, 0x85, 0xe1, 0xff, 0xdc, 0x5d, 0xd8, 0x14, 0x4, 0xab, 0x69, 0x37, 0xac, 0x98, 0xd5, 0x27, 0xb0, 0x89, 0x16, 0x8b, 0xd5, 0xf7, 0xd0, 0xec, 0x73, 0xf8, 0x4, 0x16, 0x61, 0x4d, 0x10, 0xc, 0x16, 0xa3, 0x61, 0x71, 0xab, 0x16, 0xeb, 0x84, 0x3b, 0xae, 0x45, 0x8b, 0xa, 0x9e, 0x78, 0xce, 0x7, 0x7, 0xfe, 0x44, 0xbf, 0xca, 0xa2, 0x28, 0x3a, 0x71, 0x1c, 0x1f, 0x24, 0x3d, 0xcc, 0xe7, 0x18, 0x42, 0x50, 0x92, 0x24, 0x5b, 0x49, 0x23, 0xa0, 0xfd, 0x5, 0xaa, 0xaa, 0x5a, 0x1, 0x73, 0xe0, 0x1e, 0x45, 0xd1, 0x42, 0x65, 0x59, 0x9e, 0x80, 0x96, 0xf7, 0x7e, 0x62, 0xad, 0x1d, 0x2, 0xfb, 0x97, 0x9d, 0x39, 0xe7, 0x72, 0x1b, 0x42, 0x88, 0x25, 0xd, 0xac, 0xb5, 0x47, 0xa0, 0x7, 0x18, 0x60, 0xed, 0x9c, 0xcb, 0x1, 0x4c, 0xd3, 0x34, 0x53, 0xe0, 0xa, 0xf4, 0x81, 0x2e, 0xb0, 0x4b, 0xd3, 0x74, 0xf3, 0xbe, 0x34, 0x59, 0x96, 0xdd, 0xbc, 0xf7, 0x63, 0xe0, 0x2, 0x9c, 0xeb, 0xba, 0x5e, 0x4a, 0xa, 0x6f, 0xf0, 0x4, 0x57, 0x3d, 0x2c, 0x27, 0x2b, 0xe9, 0x62, 0x6b, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
+static const unsigned char popup_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, 0x4, 0x3, 0x0, 0x0, 0x0, 0xed, 0xdd, 0xe2, 0x52, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a, 0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80, 0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a, 0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x0, 0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x0, 0xff, 0x20, 0x2e, 0x31, 0x83,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0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+static const unsigned char popup_unchecked_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, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a, 0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80, 0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a, 0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x0, 0x6, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0x9f, 0x18, 0x32, 0xe0, 0x0, 0x0, 0x0, 0x1, 0x74, 0x52, 0x4e, 0x53, 0x0, 0x40, 0xe6, 0xd8, 0x66, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x1, 0xff, 0x2, 0x2d, 0xde, 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, 0x6, 0x16, 0x12, 0x2b, 0x4, 0x4e, 0x1d, 0x2, 0xaf, 0x0, 0x0, 0x0, 0xb, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x40, 0x5, 0x0, 0x0, 0x10, 0x0, 0x1, 0xa1, 0xc5, 0x21, 0xc1, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
static const unsigned char popup_window_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x14, 0x0, 0x0, 0x0, 0x24, 0x8, 0x6, 0x0, 0x0, 0x0, 0x89, 0xf3, 0x1a, 0xa0, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0xb7, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xed, 0x96, 0x31, 0x6f, 0xd3, 0x40, 0x18, 0x86, 0x9f, 0xfb, 0x62, 0x27, 0x71, 0x2, 0x49, 0x93, 0x3a, 0x48, 0x91, 0x80, 0x2e, 0x1d, 0x2a, 0x48, 0xa5, 0x22, 0x41, 0xc5, 0x42, 0x18, 0x18, 0x18, 0x18, 0xf9, 0x2b, 0xfc, 0xd, 0xfe, 0x9, 0x7f, 0x80, 0x91, 0x46, 0x95, 0x10, 0xa8, 0x62, 0x48, 0x51, 0x18, 0x58, 0x0, 0x75, 0xa9, 0x4b, 0x1a, 0x2c, 0x48, 0x1a, 0x9f, 0x73, 0xc7, 0x10, 0x87, 0x18, 0xe4, 0x88, 0x56, 0xca, 0xe8, 0x57, 0xba, 0xe1, 0x24, 0xbf, 0xcf, 0xdd, 0x77, 0x5e, 0x1e, 0x58, 0x73, 0x54, 0xc6, 0xbe, 0x5, 0x34, 0x0, 0xf, 0x90, 0x15, 0x3d, 0x3, 0x4c, 0x80, 0x21, 0x70, 0x6, 0xd8, 0x2c, 0xa0, 0xb, 0x6c, 0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32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x12, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x60, 0x14, 0x8c, 0x2, 0x8, 0x0, 0x0, 0x4, 0x10, 0x0, 0x1, 0x7f, 0x4d, 0x78, 0x8e, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x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0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe0, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0x44, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0xc5, 0xcf, 0x31, 0x16, 0x0, 0x10, 0xc, 0x44, 0xc1, 0x4d, 0x84, 0x4, 0xc1, 0xfd, 0x6f, 0xab, 0xc9, 0x53, 0x70, 0x0, 0x53, 0x6e, 0xb5, 0x1f, 0x20, 0x4e, 0x12, 0x12, 0x13, 0x40, 0xb9, 0xa8, 0x5, 0x2d, 0x99, 0xc0, 0xb5, 0x75, 0xf, 0xbd, 0x55, 0x86, 0xe8, 0x98, 0x2b, 0xcc, 0xa1, 0x2, 0x31, 0x5f, 0x87, 0xdb, 0xbf, 0xe1, 0x3e, 0xf6, 0x5c, 0x7f, 0xe2, 0xee, 0xfc, 0xd, 0x60, 0x3b, 0xa, 0x1d, 0x9e, 0x6a, 0x29, 0x33, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xea, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xcd, 0x92, 0x31, 0x6e, 0xc2, 0x40, 0x10, 0x45, 0xdf, 0xd8, 0x96, 0x70, 0xe9, 0xd4, 0xb9, 0x41, 0x14, 0x29, 0x74, 0xe4, 0x10, 0x3e, 0x1, 0xd4, 0x88, 0xca, 0x14, 0x6e, 0xd3, 0xd0, 0xd0, 0x52, 0xe0, 0xce, 0x35, 0x1c, 0x21, 0x67, 0x0, 0x3a, 0x17, 0x28, 0x37, 0xa0, 0x76, 0x83, 0x40, 0x1b, 0xc9, 0x99, 0x14, 0xb1, 0x2d, 0x2b, 0xc6, 0xc9, 0x52, 0xc1, 0x97, 0xb6, 0xd8, 0xaf, 0xff, 0xdf, 0x8c, 0x56, 0xb, 0xb7, 0x96, 0xfc, 0x36, 0x22, 0x5d, 0xf6, 0x2, 0xcc, 0x44, 0xd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d, 0x44, 0xc8, 0xd, 0x54, 0x54, 0xc0, 0xf3, 0x8a, 0xe5, 0x2b, 0x8c, 0xcd, 0xf2, 0x95, 0xe7, 0x15, 0x86, 0x2, 0x5e, 0x7f, 0xfe, 0xaf, 0xec, 0xc, 0x10, 0xc8, 0xff, 0x95, 0xd7, 0x9f, 0xe6, 0x1, 0x4c, 0x2, 0x0, 0x0, 0x68, 0x3f, 0x16, 0xd7, 0xea, 0x7c, 0xdd, 0x1a, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char radio_checked_png[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x52, 0x4b, 0x42, 0x34, 0xd, 0x58, 0x2, 0xd7, 0xbb, 0xa9, 0x32, 0xc8, 0x36, 0xe0, 0x80, 0x2c, 0x1d, 0x48, 0x6, 0xdc, 0xa, 0x4c, 0x91, 0x69, 0xe9, 0x74, 0x76, 0x2a, 0xa6, 0x8e, 0xaf, 0xfa, 0xb9, 0x7e, 0xee, 0xaf, 0x7, 0xb9, 0xfb, 0x8, 0xe7, 0x90, 0x1c, 0x65, 0x49, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0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0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe0, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0x4a, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x40, 0x80, 0xb0, 0x8a, 0xf6, 0x54, 0x10, 0x2d, 0xb9, 0xfa, 0xcc, 0x99, 0x5d, 0x93, 0x80, 0x8c, 0xb9, 0x67, 0x80, 0xe0, 0x26, 0x3, 0x3, 0xeb, 0x1a, 0x10, 0xe3, 0x54, 0x0, 0x3, 0xdb, 0x1e, 0x10, 0xe3, 0x74, 0x2, 0x3, 0xfb, 0x19, 0x30, 0x28, 0x60, 0xe0, 0x80, 0x30, 0x1a, 0x10, 0xc, 0xb8, 0x14, 0x5c, 0x31, 0x5c, 0x3b, 0xdc, 0x40, 0x6, 0x4b, 0x90, 0x15, 0x53, 0x90, 0x2d, 0x85, 0x2, 0x0, 0x37, 0xca, 0x3d, 0x81, 0xc4, 0xfc, 0x38, 0x7b, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char reference_border_png[] = {
@@ -283,111 +287,115 @@ static const unsigned char reference_border_png[] = {
};
static const unsigned char scroll_bg_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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xf, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x80, 0x3a, 0x0, 0x0, 0x2, 0x4c, 0x0, 0x1, 0x4e, 0x94, 0x8c, 0x4d, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 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, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a, 0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 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0, 0x0, 0x0, 0x5c, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x55, 0x8e, 0x49, 0xe, 0xc0, 0x20, 0xc, 0x3, 0x3, 0x61, 0x9, 0x3b, 0x61, 0xfb, 0xff, 0x53, 0x4b, 0x5b, 0x55, 0x15, 0x73, 0x1b, 0xc9, 0xb2, 0xd, 0x20, 0x24, 0x2a, 0xad, 0x15, 0x4a, 0x1, 0x20, 0x8c, 0x25, 0xc7, 0xec, 0xc8, 0x1a, 0x1, 0xd2, 0x87, 0xd6, 0xc7, 0xe8, 0x2d, 0x78, 0x9, 0x48, 0x6d, 0xae, 0xcd, 0x6c, 0x84, 0xa0, 0x62, 0x5f, 0xf, 0x3d, 0x2a, 0x48, 0x3c, 0x5e, 0x19, 0x9c, 0x4e, 0x39, 0x62, 0x47, 0x41, 0x2e, 0x5f, 0x75, 0xc9, 0x7b, 0xb4, 0x52, 0x64, 0x8e, 0x54, 0xcd, 0x7d, 0xe1, 0xbf, 0x73, 0x1, 0x30, 0x2f, 0x7, 0x53, 0x16, 0x34, 0xbd, 0xfa, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char scroll_button_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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x70, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xd5, 0xcf, 0x31, 0xe, 0xc2, 0x50, 0xc, 0x3, 0xd0, 0xe7, 0x76, 0x5, 0xe, 0xd0, 0x1b, 0x20, 0xb1, 0xf7, 0xfe, 0x33, 0x23, 0x48, 0x48, 0x1d, 0x19, 0x38, 0x1, 0x6b, 0x9, 0x4b, 0x2b, 0x7d, 0x2a, 0xb1, 0x83, 0x97, 0x28, 0x89, 0x63, 0xc7, 0xfc, 0x3f, 0x2, 0x55, 0x35, 0xa2, 0xc3, 0x25, 0xc9, 0xb3, 0x25, 0x54, 0xd5, 0xe, 0x27, 0xcc, 0x49, 0xce, 0x5d, 0xb3, 0xdb, 0x63, 0xac, 0xaa, 0xa1, 0x21, 0xf, 0x18, 0x71, 0x58, 0xc5,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0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char scroll_button_down_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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x93, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xd5, 0x8f, 0x3d, 0xe, 0x1, 0x51, 0x18, 0x45, 0xcf, 0x7d, 0x44, 0xc1, 0x52, 0x14, 0xa, 0xb, 0x20, 0xb6, 0x21, 0xf1, 0xa6, 0xd7, 0x33, 0xcd, 0x4c, 0x31, 0x1a, 0x19, 0x95, 0xc2, 0xb4, 0x7e, 0x96, 0xf3, 0x7a, 0x4b, 0x31, 0xd1, 0xf0, 0x69, 0x5e, 0x18, 0x62, 0x1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0xfa, 0xe2, 0x64, 0xe2, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0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, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 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, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xa9, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0x95, 0x8f, 0x3d, 0xe, 0x82, 0x60, 0x10, 0x44, 0xdf, 0x82, 0x85, 0xf9, 0x8c, 0xf7, 0x30, 0xb1, 0xb0, 0xb4, 0xf2, 0x24, 0x16, 0x48, 0xad, 0xa5, 0x7f, 0xd, 0x16, 0xd0, 0x20, 0xd6, 0xc6, 0x52, 0x29, 0x3c, 0x86, 0x17, 0xb0, 0xf7, 0x2a, 0xc4, 0x84, 0x90, 0xb5, 0xa0, 0x51, 0xfc, 0x0, 0x9d, 0x72, 0x67, 0x27, 0xf3, 0x6, 0xfe, 0x94, 0xd8, 0x8e, 0x4b, 0x3d, 0xf4, 0xc, 0x7a, 0x3, 0xc9, 0x43, 0x59, 0x4d, 0xde, 0x3d, 0xc7, 0x16, 0x30, 0x70, 0x4, 0xc6, 0x40, 0xbf, 0xea, 0x7d, 0x5, 0x76, 0xba, 0xf7, 0x41, 0x3d, 0xe0, 0xa9, 0x14, 0x5e, 0x23, 0x52, 0xa0, 0xf1, 0x50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0x6f, 0x30, 0xe5, 0xef, 0xb0, 0x5, 0xaf, 0xe7, 0x4e, 0x7e, 0xff, 0x1a, 0xb, 0x26, 0x7, 0xac, 0xd9, 0xa3, 0x51, 0xe3, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 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, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0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x18, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe0, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 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, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0xc, 0x0, 0x0, 0x0, 0xc, 0x8, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xa8, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0x95, 0x90, 0x2b, 0xe, 0xc2, 0x50, 0x10, 0x45, 0xcf, 0x3c, 0x4, 0xa4, 0x61, 0x27, 0x8, 0x14, 0xb, 0x60, 0x1f, 0x24, 0xb4, 0x41, 0x82, 0xe5, 0x63, 0x5e, 0x5, 0x35, 0xe5, 0x63, 0x9, 0x8a, 0x50, 0x4, 0x2b, 0x41, 0x81, 0x67, 0x29, 0x7d, 0x41, 0x75, 0x30, 0x8, 0xd2, 0x6f, 0x7a, 0xe5, 0xdc, 0x39, 0x33, 0x77, 0x6, 0x5a, 0x4a, 0xf2, 0x85, 0x50, 0xf, 0xf, 0xd0, 0xae, 0x43, 0xc6, 0x47, 0x59, 0xa6, 0x79, 0xdf, 0x14, 0x67, 0x68, 0x1f, 0x18, 0x79, 0x70, 0x2a, 0xdb, 0x50, 0x0, 0x94, 0x6c, 0x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19, 0x83, 0x77, 0xef, 0xc, 0x3e, 0xdc, 0x11, 0xc6, 0x1d, 0xc2, 0x79, 0x45, 0x23, 0x11, 0xc1, 0x4b, 0xe7, 0xfc, 0x3b, 0xc, 0xe0, 0xf5, 0xdc, 0xce, 0xef, 0x1f, 0xb, 0xc, 0x30, 0x7, 0xaf, 0x1f, 0x5b, 0x76, 0x12, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char scroll_button_up_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x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0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0x36, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0xc, 0x5, 0x3, 0x21, 0x86, 0xf4, 0xe, 0x30, 0x28, 0x63, 0x88, 0x80, 0x30, 0x5a, 0xb1, 0x33, 0x3a, 0x67, 0x40, 0x19, 0x33, 0x67, 0x42, 0x18, 0x9d, 0x33, 0x67, 0xce, 0x0, 0x33, 0x66, 0x2, 0x1, 0x2a, 0x3, 0x9f, 0x39, 0x10, 0x6, 0xdc, 0x52, 0x43, 0x88, 0x33, 0x44, 0x0, 0x59, 0xc8, 0x3d, 0xf9, 0xf, 0x68, 0xc5, 0xa9, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char scroll_button_up_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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x9d, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xcd, 0x90, 0x2b, 0xe, 0xc2, 0x50, 0x14, 0x44, 0xcf, 0xbc, 0xa0, 0xca, 0x3a, 0x50, 0x38, 0x48, 0xaa, 0x58, 0xb, 0xc5, 0x57, 0x60, 0xa0, 0xc1, 0x40, 0x9a, 0x3c, 0x43, 0x8a, 0xae, 0x7f, 0xb0, 0x10, 0x82, 0x25, 0x1, 0x81, 0x60, 0x2b, 0x55, 0xa4, 0x17, 0xd1, 0x12, 0x7e, 0xa, 0xc7, 0x98, 0xc9, 0x9d, 0xb9, 0xc9, 0x49, 0x6, 0xfe, 0x4e, 0xfa, 0xc, 0x96, 0xb6, 0xee, 0xb, 0xb7, 0x3, 0xcc, 0xa8, 0x13, 0xaf, 0xc5, 0xf5, 0xb5, 0x77, 0xef, 0xcf, 0xc5, 0x58, 0xb8, 0x23, 0x30, 0x0, 0x86, 0xc2, 0x9d, 0x56, 0x56, 0x4c, 0xbf, 0x8, 0x33, 0xdb, 0x74, 0x23, 0x28, 0xc1, 0x92, 0x36, 0xde, 0x36, 0xde, 0xdc, 0x82, 0x20, 0xaa, 0x34, 0x57, 0x5e, 0x75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xce, 0xce, 0x59, 0x59, 0x59, 0xb8, 0xf5, 0x6d, 0x48, 0x0, 0x0, 0x0, 0x5, 0x74, 0x52, 0x4e, 0x53, 0x7, 0xfe, 0xc, 0x9, 0x1c, 0xda, 0x2b, 0xa5, 0x57, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0xa, 0x68, 0xd0, 0xf4, 0x56, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0x36, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0xc, 0x5, 0x3, 0x21, 0x86, 0xf4, 0xe, 0x30, 0x28, 0x63, 0x88, 0x80, 0x30, 0x5a, 0xb1, 0x33, 0x3a, 0x67, 0x40, 0x19, 0x33, 0x67, 0x42, 0x18, 0x9d, 0x33, 0x67, 0xce, 0x0, 0x33, 0x66, 0x2, 0x1, 0x2a, 0x3, 0x9f, 0x39, 0x10, 0x6, 0xdc, 0x52, 0x43, 0x88, 0x33, 0x44, 0x0, 0x59, 0xc8, 0x3d, 0xf9, 0xf, 0x68, 0xc5, 0xa9, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x56, 0x75, 0x5c, 0xe7, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x48, 0x49, 0x44, 0x41, 0x54, 0x28, 0x91, 0xd5, 0xcc, 0xb1, 0xd, 0x80, 0x40, 0x10, 0x3, 0xc1, 0x39, 0x12, 0x68, 0x80, 0x22, 0xa0, 0xff, 0x5a, 0xbe, 0xa, 0xa, 0x20, 0x3b, 0x92, 0xf, 0x0, 0x9d, 0x90, 0x8, 0x7f, 0x25, 0x27, 0xb6, 0xd6, 0x8c, 0x4f, 0xbc, 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 0xcc, 0xe1, 0x96, 0x90, 0x6, 0x2, 0x9, 0x6e, 0x30, 0x87, 0x87, 0x57, 0x4a, 0x46, 0x46, 0x96, 0x97, 0x7, 0x62, 0x1c, 0x1f, 0xbf, 0x80, 0x9c, 0x20, 0x1f, 0x5e, 0xdb, 0x1, 0x23, 0xfd, 0x4, 0x11, 0x2d, 0x48, 0xcb, 0xd2, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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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 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 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8, 0x3d, 0x16, 0xb4, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0xe, 0x6f, 0xbd, 0x30, 0x4f, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 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, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xb6, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0xd3, 0xbd, 0x4a, 0x43, 0x41, 0x10, 0xc5, 0xf1, 0xdf, 0x2c, 0xb1, 0xb, 0x6, 0x22, 0x28, 0x92, 0x47, 0x48, 0xae, 0xef, 0xff, 0x1c, 0x89, 0x16, 0xe9, 0x45, 0x83, 0x60, 0xc0, 0x60, 0x77, 0x85, 0xb1, 0xb8, 0x7b, 0x43, 0xa, 0x3f, 0x56, 0xd2, 0x7a, 0x9a, 0xe1, 0xec, 0xf0, 0x9f, 0x61, 0x7, 0x4e, 0xa8, 0xca, 0xcc, 0x1b, 0xac, 0x70, 0x85, 0x89, 0xaf, 0xf5, 0x81, 0x57, 0x6c, 0x23, 0xe2, 0x11, 0xa2, 0xc2, 0x2b, 0x74, 0xa3, 0x6f, 0xd4, 0x7d, 0x44, 0xac, 0x27, 0x75, 0x73, 0x57, 0x1f, 0x9f, 0x70, 0xf8, 0x5, 0x9c, 0x62, 0x81, 0x65, 0x66, 0xee,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 0x1b, 0x8, 0xb7, 0x2, 0x6e, 0x29, 0xcc, 0x19, 0x0, 0x1a, 0x23, 0x52, 0x59, 0xa4, 0x2f, 0x3d, 0xa7, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0xe, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xc5, 0x53, 0xc1, 0x4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0x2c, 0x6c, 0xf8, 0x1, 0xc5, 0x72, 0x85, 0x9, 0xd, 0xf, 0x10, 0x43, 0xce, 0x86, 0x82, 0xe0, 0xe9, 0x19, 0x8d, 0x95, 0x53, 0xce, 0xce, 0x6e, 0x26, 0x99, 0x59, 0xe0, 0x97, 0x10, 0x91, 0x95, 0x52, 0x2a, 0x79, 0xa5, 0xa1, 0x67, 0x83, 0xa2, 0x28, 0xa6, 0x0, 0x8e, 0x0, 0x98, 0x99, 0xe7, 0x61, 0x18, 0x9e, 0xde, 0x3e, 0x20, 0x22, 0x3e, 0x11, 0x65, 0x0, 0x46, 0x2d, 0x55, 0x3a, 0x8e, 0x33, 0xe, 0x82, 0xe0, 0xd2, 0xd7, 0x72, 0x9f, 0xc8, 0xb2, 0x6c, 0x0, 0x60, 0xdf, 0x59, 0x6, 0x0, 0xbf, 0x69, 0x9a, 0x43, 0x9e, 0xe7, 0x43, 0xeb, 0x1, 0xcf, 0xf3, 0x76, 0x44, 0x34, 0x33, 0x18, 0x9b, 0xb8, 0xae, 0x9b, 0x9a, 0x1c, 0xff, 0x3b, 0x1e, 0x62, 0x14, 0x91, 0x94, 0x88, 0x8c, 0xe5, 0x21, 0xa2, 0x34, 0x8a, 0xa2, 0x75, 0x97, 0x7b, 0x48, 0xa1, 0xaa, 0xaa, 0x8d, 0xd6, 0xda, 0x54, 0x9a, 0x73, 0x5d, 0xd7, 0x5b, 0xab, 0x83, 0xd6, 0xc5, 0xe7, 0x45, 0x2, 0x80, 0x38, 0x8e, 0x4b, 0xad, 0xf5, 0x2, 0xc0, 0x15, 0xc0, 0x8d, 0x99, 0x97, 0xa6, 0x65, 0x2b, 0x94, 0x52, 0x89, 0xed, 0x99, 0xbe, 0xc6, 0x1d, 0x31, 0x1f, 0x40, 0xdc, 0x74, 0x8a, 0x5b, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char submenu_png[] = {
- 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0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x12, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x60, 0x14, 0x8c, 0x2, 0x8, 0x0, 0x0, 0x4, 0x10, 0x0, 0x1, 0x7f, 0x4d, 0x78, 0x8e, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 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, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x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b, 0x35, 0x6d, 0xb7, 0xf8, 0xe3, 0x7a, 0x2, 0x49, 0x7e, 0x47, 0x10, 0xc3, 0xf7, 0xae, 0x75, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
-};
-
-static const unsigned char tab_container_backup_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, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x88, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x92, 0xb1, 0xd, 0xc2, 0x40, 0xc, 0x45, 0x9f, 0xcf, 0x91, 0x4e, 0x99, 0x21, 0x7, 0xb, 0x65, 0x5, 0x3a, 0xa4, 0x5b, 0x3, 0xb1, 0x5, 0x81, 0x9a, 0x19, 0x18, 0x28, 0xd9, 0x1, 0xa5, 0x48, 0x4c, 0xc3, 0x45, 0x54, 0x58, 0x14, 0x28, 0x14, 0xfc, 0xca, 0x67, 0xfb, 0x3d, 0xb9, 0x38, 0x58, 0x3b, 0x52, 0x8a, 0xdd, 0xfe, 0xd8, 0x9a, 0x58, 0x7, 0x34, 0xe, 0x33, 0x20, 0x92, 0xaf, 0x97, 0xc3, 0xd, 0xa0, 0x2a, 0x5d, 0x13, 0x3b, 0x8d, 0xe3, 0xbd, 0x99, 0xa7, 0xe9, 0x2d, 0x1d, 0x54, 0x53, 0x8c, 0x75, 0x7, 0x6c, 0x1, 0xc2, 0xcb, 0x2c, 0x79, 0x30, 0xc0, 0x73, 0x67, 0xb3, 0x8, 0x5d, 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ae, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x1, 0x0, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x93, 0x31, 0x4a, 0x43, 0x51, 0x10, 0x45, 0xcf, 0x7d, 0xef, 0x83, 0x2b, 0x50, 0x88, 0x8d, 0x9d, 0xbd, 0xa9, 0x52, 0x44, 0xbb, 0x8f, 0x62, 0xe1, 0x16, 0xcc, 0x22, 0x5c, 0x40, 0x96, 0xa2, 0xd9, 0x82, 0x4, 0x94, 0xdf, 0x19, 0x1b, 0x9b, 0x8f, 0xb, 0xb0, 0x10, 0x91, 0x8, 0xba, 0x84, 0xbc, 0xf7, 0xae, 0x8d, 0x86, 0x20, 0x3f, 0x28, 0xa4, 0xf5, 0xc2, 0xc0, 0x14, 0x33, 0x67, 0xee, 0xc, 0xc, 0x6c, 0x28, 0xad, 0xe6, 0xfd, 0xe1, 0xf1, 0x48, 0x52, 0x6d, 0xd8, 0x5e, 0x53, 0xfc, 0x61, 0xbb, 0x69, 0xef, 0x6f, 0x2f, 0x1, 0xaf, 0x0, 0xc6, 0xe1, 0xe0, 0xe8, 0xe1, 0x5a, 0xf6, 0xa9, 0xa4, 0x84, 0x54, 0x75, 0x8e, 0xb3, 0x93, 0xed, 0xa, 0x31, 0x6d, 0xef, 0x6, 0x67, 0x30, 0x2e, 0x11, 0xa0, 0x3f, 0xdc, 0x1a, 0x9, 0x2e, 0x62, 0xac,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0xea, 0xfc, 0x1a, 0xf4, 0xf, 0xd4, 0xaf, 0x81, 0x1b, 0x46, 0x34, 0x84, 0x11, 0x61, 0xa7, 0x27, 0x9a, 0xc2, 0x52, 0x6e, 0xe6, 0x17, 0x9a, 0xc3, 0x59, 0xa6, 0xb3, 0xf1, 0xbd, 0x1b, 0xb3, 0xf0, 0x18, 0x55, 0xf9, 0x61, 0xf9, 0x6c, 0x96, 0x63, 0x1e, 0x5e, 0xff, 0x2b, 0xf7, 0x5b, 0xff, 0xb, 0x69, 0x5a, 0x14, 0xfa, 0x84, 0xf6, 0xc2, 0x8, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x10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, 0x55, 0x53, 0x62, 0x4a, 0x46, 0x52, 0x46, 0x41, 0x4e, 0x45, 0x41, 0x4d, 0x55, 0x52, 0x60, 0x44, 0x41, 0x4c, 0x53, 0x50, 0x5e, 0x43, 0x40, 0x4b, 0x52, 0x4e, 0x5d, 0x41, 0x3e, 0x4a, 0x4f, 0x4d, 0x5a, 0x3f, 0x3d, 0x48, 0x4e, 0x4b, 0x59, 0x3e, 0x3c, 0x47, 0x4d, 0x4a, 0x58, 0x3d, 0x3b, 0x46, 0x4b, 0x49, 0x54, 0x3c, 0x3a, 0x44, 0x4b, 0x47, 0x54, 0x3b, 0x39, 0x43, 0x3b, 0x39, 0x42, 0x3b, 0x38, 0x43, 0x3b, 0x38, 0x42, 0x3a, 0x37, 0x41, 0x39, 0x37, 0x41, 0x3a, 0x38, 0x41, 0x39, 0x36, 0x3f, 0x38, 0x36, 0x3f, 0x39, 0x36, 0x40, 0x38, 0x36, 0x40, 0x37, 0x35, 0x3e, 0x37, 0x34, 0x3e, 0x36, 0x35, 0x3d, 0x35, 0x32, 0x3b, 0x59, 0xdd, 0xd3, 0xff, 0x0, 0x0, 0x0, 0x11, 0x74, 0x52, 0x4e, 0x53, 0x4, 0xa, 0x11, 0x19, 0x1f, 0x22, 0x24, 0x15, 0x25, 0x34, 0x3f, 0x46, 0x47, 0x48, 0x77, 0xef, 0xef, 0xa3, 0x31, 0x6b, 0xc2, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x33, 0x37, 0xd5, 0x7c, 0x5e, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0xa2, 0x49,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x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x47, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x64, 0xc0, 0x1, 0xfe, 0xff, 0xff, 0x2f, 0xcb, 0xc0, 0xc0, 0x60, 0x3, 0xe5, 0x1e, 0x61, 0x64, 0x64, 0x7c, 0x8c, 0x4d, 0x1d, 0x13, 0x2e, 0x3, 0xa0, 0x9a, 0xb9, 0xa1, 0xd8, 0x6, 0x97, 0x22, 0x7c, 0x6, 0x10, 0x5, 0xf0, 0x19,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 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, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x6f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0x18, 0x5, 0xa3, 0x80, 0x81, 0x81, 0x11, 0x5d, 0xe0, 0xc1, 0x83, 0x7, 0xff, 0xf1, 0x69, 0x50, 0x50, 0x50, 0x40, 0xd1, 0xc3, 0x44, 0xa9, 0xb, 0xa8, 0x6f, 0x0, 0x23, 0x23, 0x63, 0x3c, 0x3, 0x3, 0xc3, 0x57, 0x2c, 0x6a, 0xbf, 0x33, 0x32, 0x32, 0xa6, 0x63, 0xa8, 0xc7, 0x66, 0xea, 0xfd, 0xfb, 0xf7, 0x35, 0x18, 0x18, 0x18, 0x56, 0x31, 0x32, 0x32, 0xea, 0x42, 0x85, 0x6e, 0x30, 0x33, 0x33, 0x87, 0xc9, 0xca, 0xca, 0x5e, 0x26, 0xca, 0x0, 0x6, 0x6, 0x6, 0x86, 0x17, 0x2f, 0x5e, 0x70, 0xff, 0xfc, 0xf9, 0x73, 0xa, 0x3, 0x3, 0x3, 0x3, 0x3b, 0x3b, 0x7b, 0x8e, 0x84, 0x84, 0x4, 0x36, 0x57, 0xd, 0x2, 0x0, 0x0, 0x67, 0xf2, 0x14, 0xc2, 0xc2, 0xbe, 0xf5, 0xb5, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char toggle_off_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0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, 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, 0x24, 0x24, 0x29, 0x25, 0x25, 0x2a, 0x24, 0x24, 0x28, 0x25, 0x25, 0x28, 0x25, 0x25, 0x29, 0x25, 0x25, 0x27, 0x2d, 0x26, 0x2c, 0x4d, 0x2b, 0x37, 0x63, 0x2f, 0x3f, 0x6e, 0x31, 0x43, 0x71, 0x32, 0x44, 0x6c, 0x31, 0x42, 0x51, 0x2c, 0x39, 0x47, 0x2a, 0x35, 0x66, 0x30, 0x40, 0x4d, 0x2b, 0x38, 0x32, 0x26, 0x2e, 0x26, 0x25, 0x2a, 0x2e, 0x25, 0x2c, 0x3c, 0x28, 0x31, 0x52, 0x2c, 0x39, 0x68, 0x30, 0x40, 0x27, 0x25, 0x2a, 0x50, 0x2c, 0x38, 0x5f, 0x2e, 0x3d, 0x35, 0x27, 0x2f, 0x38, 0x27, 0x30, 0x5e, 0x2e, 0x3d, 0x43, 0x2a, 0x34, 0x5f, 0x2f, 0x3e, 0x2f, 0x25, 0x2c, 0x44, 0x2a, 0x34, 0x2b, 0x26, 0x2c, 0x64, 0x2f, 0x3f, 0x36, 0x27, 0x30, 0x37, 0x27, 0x30, 0x66, 0x2f, 0x40, 0x2c, 0x26, 0x2c, 0x46, 0x2a, 0x35, 0x53, 0x2c, 0x39, 0x40, 0x40, 0x44, 0xad, 0xad, 0xaf, 0xff, 0xff, 0xff, 0xf2, 0xf2, 0xf2, 0x77, 0x77, 0x7a, 0x5b, 0x5b, 0x5f, 0x32, 0x32, 0x37, 0x5d, 0x2e, 0x3d, 0x3e, 0x29, 0x32, 0xc9, 0xc9, 0xca, 0xbb, 0xbb, 0xbd, 0x69, 0x69, 0x6c, 0x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82, 0xde, 0x40, 0xde, 0x2d, 0xc3, 0x2a, 0xca, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char toggle_on_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, 0x6, 0x0, 0x0, 0x0, 0xa2, 0x9d, 0x7e, 0x84, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b,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0x1d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x20, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 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, 0x25, 0x25, 0x2a, 0x24, 0x24, 0x29, 0x25, 0x2c, 0x36, 0x27, 0x49, 0x65, 0x29, 0x5d, 0x85, 0x2a, 0x66, 0x95, 0x2a, 0x68, 0x99, 0x29, 0x64, 0x92, 0x28, 0x4c, 0x6b, 0x25, 0x27, 0x2d, 0x27, 0x43, 0x5c, 0x29, 0x5f, 0x89, 0x27, 0x49, 0x66, 0x25, 0x30, 0x3e, 0x25, 0x26, 0x2d, 0x25, 0x25, 0x2b, 0x25, 0x26, 0x2c, 0x25, 0x2d, 0x38, 0x25, 0x3a, 0x4c, 0x27, 0x4d, 0x6b, 0x29, 0x60, 0x8c, 0x27, 0x44, 0x5c, 0x27, 0x4b, 0x69, 0x28, 0x59, 0x7f, 0x25, 0x34, 0x43, 0x25, 0x35, 0x45, 0x28, 0x58, 0x7f, 0x25, 0x26, 0x2b, 0x27, 0x40, 0x57, 0x27, 0x41, 0x57, 0x25, 0x2a, 0x33, 0x29, 0x5d, 0x87, 0x25, 0x34, 0x44, 0x25, 0x2b, 0x34, 0x40, 0x40, 0x44, 0xad, 0xad, 0xaf, 0xff, 0xff, 0xff, 0xf2, 0xf2, 0xf2, 0x77, 0x77, 0x7a, 0x5b, 0x5b, 0x5f, 0x4e, 0x4e, 0x52, 0xc9, 0xc9, 0xca, 0x27, 0x43, 0x5b, 0x27, 0x4d, 0x6c, 0x27, 0x4e, 0x6d, 0xbb, 0xbb, 0xbd, 0x69, 0x69, 0x6c, 0x28, 0x56, 0x7b, 0x26, 0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0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, 0x81, 0xe, 0x17, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+static const unsigned char tool_button_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, 0x8, 0x3, 0x0, 0x0, 0x0, 0x28, 0x2d, 0xf, 0x53, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a, 0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80, 0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a, 0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x2, 0x1, 0x50, 0x4c, 0x54, 0x45, 0x29, 0x3a, 0x40, 0x2d, 0x3e, 0x44, 0x26, 0x34, 0x3b, 0x24, 0x34, 0x39, 0x23, 0x31, 0x38, 0x22, 0x31, 0x37, 0x22, 0x31, 0x37, 0x22, 0x30, 0x36, 0x22, 0x31, 0x36, 0x26, 0x34, 0x3c, 0x32, 0x44, 0x4c, 0x26, 0x34, 0x39, 0x23, 0x31, 0x36, 0x21, 0x2e, 0x34, 0x1f, 0x2c, 0x30, 0x1f, 0x2b, 0x2f, 0x1f, 0x2a, 0x2e, 0x1e, 0x2b, 0x2f, 0x1f, 0x2b, 0x2e, 0x36, 0x4b, 0x52, 0x25, 0x33, 0x38, 0x20, 0x2f, 0x32, 0x1c, 0x29, 0x2e, 0x1b, 0x26, 0x2a, 0x1a, 0x23, 0x26, 0x18, 0x22, 0x26, 0x19, 0x22, 0x26, 0x19, 0x23, 0x26, 0x19, 0x26, 0x29, 0x20, 0x2d, 0x32, 0x25, 0x31, 0x38, 0x3c, 0x51, 0x59, 0x23, 0x31, 0x37, 0x1f, 0x2b, 0x31, 0x1a, 0x25, 0x2b, 0x17, 0x20, 0x24, 0x15, 0x1c, 0x21, 0x14, 0x1b, 0x21, 0x14, 0x1c, 0x21, 0x13, 0x1b, 0x21, 0x15, 0x1d, 0x21, 0x1a, 0x25, 0x2a, 0x40, 0x57, 0x60, 0x23, 0x31, 0x36, 0x1f, 0x2b, 0x31, 0x1b, 0x25, 0x29, 0x16, 0x1e, 0x23, 0x14, 0x1b, 0x1d, 0x12, 0x19, 0x1d, 0x12, 0x1b, 0x1d, 0x14, 0x1a, 0x1d, 0x45, 0x5e, 0x67, 0x22, 0x32, 0x37, 0x20, 0x2d, 0x31, 0x1a, 0x26, 0x2a, 0x15, 0x1f, 0x25, 0x14, 0x1c, 0x1f, 0x12, 0x1b, 0x1f, 0x12, 0x1b, 0x20, 0x14, 0x1b, 0x1f, 0x15, 0x1e, 0x24, 0x1a, 0x25, 0x29, 0x4b, 0x64, 0x6d, 0x23, 0x32, 0x38, 0x20, 0x2e, 0x32, 0x1b, 0x27, 0x2b, 0x17, 0x22, 0x27, 0x16, 0x1e, 0x23, 0x14, 0x1e, 0x23, 0x16, 0x20, 0x24, 0x14, 0x1e, 0x22, 0x15, 0x1e, 0x22, 0x17, 0x21, 0x27, 0x1c, 0x27, 0x2c, 0x4f, 0x6a, 0x75, 0x21, 0x2f, 0x33, 0x1d, 0x29, 0x2d, 0x19, 0x23, 0x2a, 0x18, 0x22, 0x27, 0x16, 0x21, 0x27, 0x18, 0x23, 0x29, 0x17, 0x21, 0x26, 0x19, 0x23, 0x29, 0x1c, 0x28, 0x2d, 0x21, 0x2e, 0x33, 0x54, 0x70, 0x7c, 0x23, 0x33, 0x38, 0x22, 0x30, 0x34, 0x1e, 0x2a, 0x2f, 0x1a, 0x26, 0x2d, 0x1a, 0x25, 0x2b, 0x19, 0x25, 0x2b, 0x1a, 0x26, 0x2d, 0x1a, 0x26, 0x2c, 0x18, 0x25, 0x2a, 0x1a, 0x24, 0x2a, 0x1a, 0x25, 0x2c, 0x1d, 0x2a, 0x2f, 0x22, 0x2f, 0x34, 0x59, 0x77, 0x82, 0x23, 0x33, 0x39, 0x22, 0x30, 0x35, 0x1f, 0x2c, 0x31, 0x1c, 0x28, 0x30, 0x1c, 0x28, 0x2e, 0x1b, 0x29, 0x2f, 0x1c, 0x2a, 0x31, 0x1b, 0x28, 0x2f, 0x1c, 0x28, 0x2d, 0x1b, 0x27, 0x2f, 0x1f, 0x2b, 0x31, 0x5e, 0x7d, 0x8a, 0x24, 0x34, 0x39, 0x21, 0x2f, 0x37, 0x20, 0x2d, 0x34, 0x1d, 0x2b, 0x33, 0x1d, 0x2b, 0x32, 0x1d, 0x2d, 0x35, 0x1e, 0x2e, 0x36, 0x1f, 0x2e, 0x36, 0x1d, 0x2b, 0x34, 0x1d, 0x2b, 0x31, 0x1d, 0x2b, 0x32, 0x20, 0x2d, 0x32, 0x21, 0x2f, 0x36, 0x63, 0x83, 0x90, 0x25, 0x34, 0x39, 0x21, 0x31, 0x36, 0x1f, 0x2e, 0x34, 0x1f, 0x2e, 0x34, 0x1f, 0x2e, 0x36, 0x20, 0x31, 0x39, 0x21, 0x33, 0x3b, 0x21, 0x32, 0x3b, 0x1f, 0x30, 0x37, 0x1f, 0x2e, 0x35, 0x1e, 0x2d, 0x33, 0x1f, 0x2d, 0x33, 0x21, 0x30, 0x36, 0x67, 0x8a, 0x97, 0x24, 0x33, 0x39, 0x20, 0x30, 0x36, 0x1f, 0x2f, 0x35, 0x21, 0x30, 0x37, 0x22, 0x32, 0x39, 0x21, 0x35, 0x3e, 0x24, 0x37, 0x41, 0x24, 0x36, 0x41, 0x21, 0x33, 0x3c, 0x21, 0x31, 0x38, 0x1e, 0x2f, 0x35, 0x1e, 0x2e, 0x35, 0x20, 0x2e, 0x35, 0x24, 0x31, 0x39, 0x6c, 0x90, 0x9e, 0x22, 0x30, 0x36, 0x1f, 0x2e, 0x36, 0x20, 0x30, 0x36, 0x20, 0x31, 0x39, 0x23, 0x34, 0x3d, 0x23, 0x37, 0x41, 0x26, 0x3c, 0x47, 0x26, 0x3b, 0x46, 0x22, 0x35, 0x3f, 0x22, 0x32, 0x3b, 0x1f, 0x30, 0x37, 0x1f, 0x2e, 0x35, 0x1f, 0x2d, 0x35, 0x21, 0x30, 0x36, 0x72, 0x96, 0xa5, 0x72, 0x96, 0xa5, 0xe8, 0x14, 0xaa, 0x3f, 0x0, 0x0, 0x0, 0xaa, 0x74, 0x52, 0x4e, 0x53, 0xc3, 0xc3, 0xe6, 0xd7, 0xcb, 0xc3, 0xbf, 0xbe, 0xbd, 0xe5, 0xc3, 0xd7, 0xc0, 0xac, 0xa0, 0x9a, 0x98, 0x98, 0x98, 0xc3, 0xcb, 0xac, 0x92, 0x82, 0x7b, 0x78, 0x78, 0x7b, 0x82, 0xac, 0xcb, 0xc3, 0xc3, 0xa0, 0x82, 0x6f, 0x67, 0x64, 0x63, 0x64, 0x67, 0x82, 0xc3, 0xbf, 0x9a, 0x7a, 0x67, 0x5e, 0x5b, 0x5a, 0x5e, 0xc3, 0xbd, 0x98, 0x78, 0x64, 0x5b, 0x57, 0x57, 0x5b, 0x64, 0x78, 0xc3, 0xbd, 0x98, 0x78, 0x63, 0x5a, 0x57, 0x56, 0x57, 0x5a, 0x63, 0x77, 0xc3, 0x98, 0x78, 0x63, 0x5a, 0x57, 0x56, 0x5a, 0x63, 0x77, 0x98, 0xc3, 0xbd, 0x98, 0x78, 0x63, 0x5a, 0x57, 0x56, 0x56, 0x57, 0x5a, 0x63, 0x77, 0x98, 0xc3, 0xbd, 0x98, 0x77, 0x63, 0x5a, 0x57, 0x56, 0x57, 0x5a, 0x63, 0x77, 0xc3, 0xbb, 0x96, 0x76, 0x63, 0x5a, 0x57, 0x56, 0x56, 0x57, 0x5a, 0x63, 0x76, 0x96, 0xc3, 0xb5, 0x92, 0x75, 0x62, 0x5a, 0x57, 0x56, 0x56, 0x57, 0x59, 0x62, 0x74, 0x92, 0xc3, 0xa9, 0x8b, 0x71, 0x61, 0x59, 0x57, 0x56, 0x56, 0x57, 0x59, 0x61, 0x71, 0x8b, 0xa9, 0xc3, 0x95, 0x7e, 0x6b, 0x5e, 0x59, 0x57, 0x56, 0x56, 0x57, 0x59, 0x5e, 0x6b, 0x7e, 0x95, 0xc3, 0x4f, 0x78, 0x99, 0x30, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0xa9, 0x27, 0xf, 0x6, 0x4, 0x0, 0x0, 0x0, 0x9, 0x70, 0x48, 0x59, 0x73, 0x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 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 0x61, 0xa1, 0xc, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xa9, 0x29, 0xc9, 0xc, 0xf9, 0x5, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0x5, 0xf9, 0xc, 0xb5, 0x75, 0xf5, 0xd, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0x75, 0xb5, 0xc, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x13, 0x26, 0x4e, 0x9a, 0x3c, 0x65, 0xea, 0xb4, 0xe9, 0x33, 0x66, 0x76, 0x33, 0xcc, 0x9a, 0x3d, 0x67, 0xee, 0xbc, 0xf9, 0xb, 0x16, 0x2e, 0x5a, 0xbc, 0x64, 0xe9, 0xb2, 0xe5, 0x2b, 0x66, 0x31, 0xac, 0x44, 0x3, 0x0, 0xa4, 0xd7, 0x4d, 0x73, 0x12, 0x21, 0x19, 0xde, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char tooltip_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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x77, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x93, 0xc1, 0xd, 0x40, 0x40, 0x14, 0x44, 0xdf, 0xa, 0x15, 0x50, 0x86, 0x42, 0xe8, 0x81, 0xb3, 0x3, 0x15, 0x71, 0xa3, 0x5, 0x89, 0x46, 0x94, 0xb1, 0x6a, 0x18, 0x97, 0xdd, 0x10, 0x71, 0xd8, 0x75, 0x36, 0xa7, 0xff, 0x93, 0x79, 0xf3, 0xe7, 0xf2, 0x8d, 0xa4, 0xc, 0xe8, 0x80, 0xa, 0x28, 0x8, 0x93, 0x5, 0x36, 0x60, 0x34, 0x92, 0x6, 0xa0, 0x9, 0x4, 0x9f, 0x5a, 0x8c, 0xa4, 0xd5, 0x5d, 0xde, 0x81, 0x3c, 0x10, 0x3c, 0x80, 0x12, 0xb0, 0x9, 0x57, 0xed, 0x50, 0xf8, 0xee, 0x2d, 0x92, 0x8, 0xe8, 0x55, 0x7f, 0xc0, 0x1f, 0xe0, 0x3, 0xac, 0x9b, 0x8f, 0x8, 0xce, 0x33, 0xd6, 0x48, 0xea, 0x81, 0xf6, 0x63, 0x81, 0x39, 0x5, 0x46, 0xb7, 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0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char tree_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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xe5, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x93, 0x31, 0x4a, 0x43, 0x41, 0x18, 0x84, 0xbf, 0xd9, 0x7f, 0xdf, 0x9, 0x24, 0x1, 0x5, 0xcb, 0xd8, 0xa5, 0x35, 0x5e, 0x20, 0x8d, 0x82, 0x57, 0xd0, 0x43, 0x78, 0x20, 0xbd, 0x82, 0x62, 0xf5, 0x2e, 0xa0, 0x56, 0x81, 0x94, 0x69, 0x2c, 0xc4, 0x22, 0x82, 0x27, 0xd8, 0xb7, 0xbf, 0xc5, 0x3e, 0x49, 0x94, 0x95, 0x28, 0xaf, 0xf5, 0x87, 0x85, 0x2d, 0x76, 0x66, 0xfe, 0x61, 0x67, 0x60, 0xe0, 0x68, 0xfb, 0x3e, 0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0x49, 0x4d, 0x45, 0x7, 0xe0, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 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, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+static const unsigned char tree_bg_focus_png[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x20, 0x8, 0x6, 0x0, 0x0, 0x0, 0x73, 0x7a, 0x7a, 0xf4, 0x0, 0x0, 0x0, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 0x0, 0x0, 0x0, 0x20, 0x63, 0x48, 0x52, 0x4d, 0x0, 0x0, 0x7a, 0x26, 0x0, 0x0, 0x80, 0x84, 0x0, 0x0, 0xfa, 0x0, 0x0, 0x0, 0x80, 0xe8, 0x0, 0x0, 0x75, 0x30, 0x0, 0x0, 0xea, 0x60, 0x0, 0x0, 0x3a, 0x98, 0x0, 0x0, 0x17, 0x70, 0x9c, 0xba, 0x51, 0x3c, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 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, 0xdb, 0xb, 0x4, 0x12, 0x2d, 0x3a, 0xb5, 0x1b, 0x14, 0x49, 0x0, 0x0, 0x2, 0xd9, 0x49, 0x44, 0x41, 0x54, 0x58, 0xc3, 0xc5, 0x57, 0x31, 0x8e, 0x14, 0x31, 0x10, 0xac, 0xea,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74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, 0x81, 0xe, 0x17, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char tree_cursor_png[] = {
@@ -399,35 +407,35 @@ static const unsigned char tree_cursor_unfocus_png[] = {
};
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, 0x8, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x1d, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 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0, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0xc, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x20, 0xd, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0xc7, 0xaa, 0x85, 0x8e, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x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4e, 0x14, 0xd7, 0x5b, 0xf8, 0x0, 0x0, 0x0, 0x1, 0x62, 0x4b, 0x47, 0x44, 0x1, 0xff, 0x2, 0x2d, 0xde, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0xc, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x20, 0xd, 0x0, 0x0, 0x0, 0x30, 0x0, 0x1, 0xc7, 0xaa, 0x85, 0x8e, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x9c, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0x52, 0xbb, 0xd, 0xc2, 0x30, 0x10, 0x7d, 0x2f, 0xc7, 0xa, 0x84, 0xd6, 0x52, 0xa4, 0x2c, 0xc1, 0x2e, 0xac, 0x41, 0x36, 0xf0, 0x1e, 0x59, 0x86, 0x1d, 0x90, 0x2c, 0x25, 0x65, 0xb2, 0x83, 0xf5, 0x68, 0x30, 0x8a, 0x48, 0x1c, 0x8b, 0x6, 0x1a, 0x5e, 0x75, 0x77, 0xef, 0x73, 0x57, 0x1c, 0xf0, 0x6b, 0x30, 0x15, 0xe3, 0x38, 0x9e, 0x25, 0x75, 0x0, 0x8e, 0xbb, 0x6, 0x72, 0x96, 0xe4, 0x9d, 0x73, 0x37, 0x0, 0xa8, 0x16, 0xdc, 0xb5, 0x64, 0x6, 0x0, 0x49, 0x35, 0xc9, 0x2e, 0xf5, 0x87, 0x25, 0x1, 0x0, 0x31, 0xc6, 0x4b, 0xd3, 0x34, 0xf7, 0x2d, 0x73, 0x8, 0xa1, 0x35, 0xb3, 0x5e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59, 0xd3, 0x8f, 0xa, 0x5f, 0xcf, 0xbd, 0x3a, 0x1, 0x93, 0xe2, 0x8, 0xa4, 0xb1, 0xeb, 0xd3, 0x56, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x2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, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x69, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xed, 0xd3, 0xa1, 0xe, 0x83, 0x40, 0x14, 0x5, 0xd1, 0x3, 0xa4, 0xc1, 0xa0, 0x30, 0x4d, 0xe8, 0xff, 0xff, 0x1a, 0x18, 0xc0, 0x80, 0x6b, 0xd2, 0x62, 0x56, 0x11, 0x1e, 0xd9, 0x4, 0x83, 0xe0, 0xba, 0x9d, 0x37, 0x19, 0xb7, 0x5c, 0x5c, 0x71, 0xc2, 0x3b, 0xb4, 0xe9, 0x3d, 0xa3, 0xc7, 0x7f, 0x2f, 0x56, 0x41, 0xe0, 0x83, 0x77, 0xba, 0x57, 0x68, 0x50, 0x62, 0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xc4, 0x6e, 0x9c, 0xf7, 0xce, 0x1c, 0x62, 0x0, 0x53, 0x2e, 0xc4, 0x18, 0x9c, 0x62, 0x3, 0xb8, 0xf6, 0xf1, 0x8e, 0x3f, 0xf9, 0x3, 0xd8, 0xa6, 0xdc, 0x20, 0x27, 0x8b, 0x3b, 0x90, 0x52, 0x43, 0x83, 0x50, 0xb, 0xf9, 0xb, 0xd3, 0xd1, 0xe9, 0xed, 0x5c, 0x6c, 0xaa, 0xfe, 0x1d, 0xf7, 0x9e, 0x7f, 0x1, 0x89, 0x5c, 0xa, 0x6b, 0x1f, 0xe5, 0xca, 0x60, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0xfd, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0xad, 0x92, 0x31, 0x4e, 0xc3, 0x30, 0x18, 0x46, 0x9f, 0x7f, 0xc9, 0xde, 0x60, 0x83, 0xb, 0x50, 0xc8, 0x10, 0x45, 0x96, 0x72, 0x8d, 0x76, 0x84, 0x1e, 0x20, 0x7b, 0xb9, 0x4c, 0x66, 0xe, 0x80, 0x54, 0xb1, 0xb4, 0x5c, 0x23, 0x52, 0x32, 0x56, 0xf4, 0x2, 0x85, 0x85, 0x76, 0x8c, 0x94, 0x9f, 0x25, 0x89, 0xa2, 0x94, 0x56, 0xb5, 0xe0, 0x1b, 0x3f, 0xe9, 0xbd, 0xcf, 0xb6, 0xc, 0x7f, 0x8c, 0x19, 0x17, 0x65, 0x59, 0xde, 0x8a, 0xc8, 0x33, 0x30, 0x5, 0xee, 0x1, 0x54, 0x75, 0x3, 0xbc, 0xab, 0x6a, 0xee, 0xbd, 0xdf, 0x9d, 0x14, 0x54, 0x55, 0xf5, 0x64, 0x8c, 0x79, 0x1, 0xae, 0x4e, 0xc, 0x1e, 0x44, 0x24, 0x8b, 0xe3, 0x78, 0x79, 0x24, 0x68, 0xe1, 0xd7, 0xdf, 0x4e, 0x35, 0x8a, 0x8a, 0xc8, 0xbc, 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 0x95, 0x8c, 0xd0, 0x7d, 0xff, 0xe1, 0xee, 0xe2, 0xb6, 0xdd, 0x79, 0x61, 0xc4, 0xd7, 0xc, 0x48, 0x57, 0x2b, 0xeb, 0xb5, 0x28, 0xaf, 0x1, 0xc5, 0x12, 0x4e, 0xac, 0x7b, 0x6f, 0x57, 0x27, 0x8d, 0xcf, 0xe, 0x1, 0x56, 0x1, 0xb9, 0x9d, 0xba, 0x28, 0x6, 0x18, 0xc, 0x31, 0x21, 0x5a, 0xda, 0x4c, 0xb6, 0xbc, 0xb9, 0x35, 0x7c, 0xea, 0xbd, 0x13, 0x4a, 0x20, 0xe5, 0x95, 0xf4, 0x6c, 0x12, 0x30, 0x84, 0xf8, 0x44, 0x6b, 0xfb, 0xcd, 0x83, 0x3d, 0x1c, 0xf9, 0x8b, 0x80, 0x4a, 0xba, 0x88, 0x4, 0x30, 0x1e, 0xdd, 0x3b, 0x1b, 0xf1, 0x77, 0x87, 0x24, 0x81, 0x8b, 0x79, 0x3e, 0x3b, 0x6a, 0x5d, 0x33, 0x51, 0x80, 0x2d, 0x38, 0x2b, 0x65, 0xb5, 0x6c, 0x91, 0x28, 0x92, 0xa4, 0xad, 0xec, 0x76, 0xcf, 0x8f, 0xf, 0x1f, 0xdb, 0xc, 0x31, 0xb, 0x9a, 0xb1, 0xd0, 0x3, 0xfb, 0xda, 0x3a, 0xbd, 0xbc, 0x89, 0xfa, 0xf8, 0x73, 0xcd, 0x9f, 0x47, 0x45, 0x4, 0xf8, 0x4, 0x18, 0xfe, 0x2f, 0x53, 0x8, 0x62, 0x5c, 0xcf, 0x1f, 0x5f, 0xcb, 0x2c, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char vslider_grabber_hl_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48, 0x44, 0x52, 0x0, 0x0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x0, 0x0, 0xb, 0x13, 0x0, 0x0, 0xb, 0x13, 0x1, 0x0, 0x9a, 0x9c, 0x18, 0x0, 0x0, 0x0, 0x7, 0x74, 0x49, 0x4d, 0x45, 0x7, 0xe1, 0x1, 0x12, 0x1, 0x36, 0x11, 0x34, 0xd2, 0xf, 0x93, 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, 0x0, 0x48, 0x49, 0x44, 0x41, 0x54, 0x18, 0xd3, 0x63, 0x60, 0xa0, 0x12, 0x10, 0x14, 0xe0, 0xe7, 0xe3, 0x45, 0xe2, 0x4b, 0x9a, 0x18, 0x1b, 0x19, 0x1a, 0x48, 0x88, 0x8b, 0xc1, 0xe4, 0x4d, 0x2c, 0x2d, 0x80, 0xc0, 0xdc, 0xcc, 0x54, 0x6, 0x22, 0x20, 0x60, 0x6c, 0x1, 0x1, 0xe6, 0x56, 0x72, 0x68, 0x2, 0xd6, 0x8a, 0xa8, 0x5a, 0x6c, 0x94, 0x11, 0x86, 0xda, 0xdb, 0xd9, 0xaa, 0xa9, 0xaa, 0x20, 0x59, 0xab, 0xa3, 0xad, 0xc5, 0x40, 0x3d, 0x0, 0x0, 0xbf, 0x8e, 0xc, 0xed, 0xed, 0xc7, 0x67, 0x72, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
static const unsigned char vslider_tick_png[] = {
@@ -435,15 +443,15 @@ static const unsigned char vslider_tick_png[] = {
};
static const unsigned char vsplit_bg_png[] = {
- 0x89, 0x50, 0x4e, 0x47, 0xd, 0xa, 0x1a, 0xa, 0x0, 0x0, 0x0, 0xd, 0x49, 0x48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x62, 0x4b, 0x47, 0x44, 0x1, 0xff, 0x2, 0x2d, 0xde, 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, 0x6, 0x16, 0x12, 0x2b, 0x5, 0x39, 0x1a, 0x32, 0x39, 0x0, 0x0, 0x0, 0xb, 0x49, 0x44, 0x41, 0x54, 0x8, 0xd7, 0x63, 0x60, 0x40, 0x5, 0x0, 0x0, 0x10, 0x0, 0x1, 0xa1, 0xc5, 0x21, 0xc1, 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, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x49, 0x62, 0xf9, 0xdf, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x2f, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xed, 0xce, 0x41, 0x1, 0x0, 0x20, 0x0, 0x2, 0xb1, 0xc3, 0x14, 0x86, 0x32, 0xae, 0xa1, 0x6c, 0x81, 0x2d, 0xe4, 0x21, 0x4b, 0x30, 0xa8, 0xfa, 0x9a, 0x0, 0x6c, 0x2f, 0x60, 0x86, 0x2f, 0xaf, 0x1d, 0x49, 0x7b, 0xa4, 0x17, 0x55, 0x15, 0x75, 0x1, 0x7e, 0xa6, 0x5, 0x4, 0x90, 0x92, 0x89, 0x73, 0x0, 0x0, 0x0, 0x0, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+ 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, 0x4, 0x67, 0x41, 0x4d, 0x41, 0x0, 0x0, 0xb1, 0x8f, 0xb, 0xfc, 0x61, 0x5, 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, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xc9, 0xad, 0xc8, 0x52, 0x0, 0x0, 0x0, 0x25, 0x74, 0x45, 0x58, 0x74, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0, 0x32, 0x30, 0x31, 0x36, 0x2d, 0x30, 0x36, 0x2d, 0x32, 0x32, 0x54, 0x32, 0x30, 0x3a, 0x33, 0x39, 0x3a, 0x32, 0x36, 0x2b, 0x30, 0x32, 0x3a, 0x30, 0x30, 0xb8, 0xf0, 0x70, 0xee, 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, 0x6, 0x0, 0x0, 0x0, 0x1f, 0xf3, 0xff, 0x61, 0x0, 0x0, 0x0, 0x6, 0x62, 0x4b, 0x47, 0x44, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0xa0, 0xbd, 0xa7, 0x93, 0x0, 0x0, 0x0, 0x3f, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x63, 0x60, 0x18, 0x32, 0xe0, 0xff, 0xff, 0xff, 0x29, 0x14, 0x69, 0xfe, 0xff, 0xff, 0xff, 0x9, 0x6c, 0x72, 0x4c, 0x44, 0xda, 0x8c, 0xd3, 0x76, 0xbc, 0x6, 0x10, 0x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 0x87, 0x81, 0x66, 0x6c, 0x81, 0x48, 0x92, 0x66, 0xa2, 0x5c, 0x43, 0x91, 0xe6, 0x11, 0xa, 0x0, 0x73, 0x5b, 0x34, 0x19, 0x10, 0xa0, 0xb6, 0x7d, 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
index 5537d00a4a..71cd64b001 100644
--- a/scene/resources/default_theme/toggle_off.png
+++ b/scene/resources/default_theme/toggle_off.png
Binary files differ
diff --git a/scene/resources/default_theme/toggle_on.png b/scene/resources/default_theme/toggle_on.png
index 77e4601205..6ea1b589c7 100644
--- a/scene/resources/default_theme/toggle_on.png
+++ b/scene/resources/default_theme/toggle_on.png
Binary files differ
diff --git a/scene/resources/default_theme/tool_button_pressed.png b/scene/resources/default_theme/tool_button_pressed.png
new file mode 100644
index 0000000000..bcf70b486d
--- /dev/null
+++ b/scene/resources/default_theme/tool_button_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/tooltip_bg.png b/scene/resources/default_theme/tooltip_bg.png
index 7ca3567788..eca0675a98 100644
--- a/scene/resources/default_theme/tooltip_bg.png
+++ b/scene/resources/default_theme/tooltip_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_bg.png b/scene/resources/default_theme/tree_bg.png
index 0be4f628a9..839a6a272a 100644
--- a/scene/resources/default_theme/tree_bg.png
+++ b/scene/resources/default_theme/tree_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_bg_focus.png b/scene/resources/default_theme/tree_bg_focus.png
new file mode 100644
index 0000000000..692cf71926
--- /dev/null
+++ b/scene/resources/default_theme/tree_bg_focus.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_title.png b/scene/resources/default_theme/tree_title.png
index 7f81acd89e..b0ddcffbbe 100644
--- a/scene/resources/default_theme/tree_title.png
+++ b/scene/resources/default_theme/tree_title.png
Binary files differ
diff --git a/scene/resources/default_theme/tree_title_pressed.png b/scene/resources/default_theme/tree_title_pressed.png
index b09604015b..746d10039e 100644
--- a/scene/resources/default_theme/tree_title_pressed.png
+++ b/scene/resources/default_theme/tree_title_pressed.png
Binary files differ
diff --git a/scene/resources/default_theme/unchecked.png b/scene/resources/default_theme/unchecked.png
index 8341cdc643..d6f790cbc2 100644
--- a/scene/resources/default_theme/unchecked.png
+++ b/scene/resources/default_theme/unchecked.png
Binary files differ
diff --git a/scene/resources/default_theme/updown.png b/scene/resources/default_theme/updown.png
index efcb04fde6..916284a3cf 100644
--- a/scene/resources/default_theme/updown.png
+++ b/scene/resources/default_theme/updown.png
Binary files differ
diff --git a/scene/resources/default_theme/vseparator.png b/scene/resources/default_theme/vseparator.png
index 88165ea6b2..498768c05b 100644
--- a/scene/resources/default_theme/vseparator.png
+++ b/scene/resources/default_theme/vseparator.png
Binary files differ
diff --git a/scene/resources/default_theme/vslider_bg.png b/scene/resources/default_theme/vslider_bg.png
index b88582ba36..8d9ead3c5a 100644
--- a/scene/resources/default_theme/vslider_bg.png
+++ b/scene/resources/default_theme/vslider_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber.png b/scene/resources/default_theme/vslider_grabber.png
index c8be897e07..afc490be45 100644
--- a/scene/resources/default_theme/vslider_grabber.png
+++ b/scene/resources/default_theme/vslider_grabber.png
Binary files differ
diff --git a/scene/resources/default_theme/vslider_grabber_hl.png b/scene/resources/default_theme/vslider_grabber_hl.png
index 1639776a28..548972e115 100644
--- a/scene/resources/default_theme/vslider_grabber_hl.png
+++ b/scene/resources/default_theme/vslider_grabber_hl.png
Binary files differ
diff --git a/scene/resources/default_theme/vsplit_bg.png b/scene/resources/default_theme/vsplit_bg.png
index 0c29b1e35c..7dd1d48b29 100644
--- a/scene/resources/default_theme/vsplit_bg.png
+++ b/scene/resources/default_theme/vsplit_bg.png
Binary files differ
diff --git a/scene/resources/default_theme/vsplitter.png b/scene/resources/default_theme/vsplitter.png
index 56fb20bc3f..ec5542bf69 100644
--- a/scene/resources/default_theme/vsplitter.png
+++ b/scene/resources/default_theme/vsplitter.png
Binary files differ
diff --git a/scene/resources/default_theme/window_resizer.png b/scene/resources/default_theme/window_resizer.png
index baa3f30e5b..ed51968c4e 100644
--- a/scene/resources/default_theme/window_resizer.png
+++ b/scene/resources/default_theme/window_resizer.png
Binary files differ
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 6a5c4b97fc..d2848076a0 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -569,7 +569,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) {
//blit to image and texture
{
- Image img(tex.texture_size, tex.texture_size, 0, Image::FORMAT_LA8, tex.imgdata);
+ Ref<Image> img = memnew(Image(tex.texture_size, tex.texture_size, 0, Image::FORMAT_LA8, tex.imgdata));
if (tex.texture.is_null()) {
tex.texture.instance();
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 96871cc944..39943b99db 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -44,21 +44,21 @@ void Environment::set_background(BGMode p_bg) {
_change_notify();
}
-void Environment::set_skybox(const Ref<SkyBox> &p_skybox) {
+void Environment::set_sky(const Ref<Sky> &p_sky) {
- bg_skybox = p_skybox;
+ bg_sky = p_sky;
RID sb_rid;
- if (bg_skybox.is_valid())
- sb_rid = bg_skybox->get_rid();
+ if (bg_sky.is_valid())
+ sb_rid = bg_sky->get_rid();
- VS::get_singleton()->environment_set_skybox(environment, sb_rid);
+ VS::get_singleton()->environment_set_sky(environment, sb_rid);
}
-void Environment::set_skybox_scale(float p_scale) {
+void Environment::set_sky_scale(float p_scale) {
- bg_skybox_scale = p_scale;
- VS::get_singleton()->environment_set_skybox_scale(environment, p_scale);
+ bg_sky_scale = p_scale;
+ VS::get_singleton()->environment_set_sky_scale(environment, p_scale);
}
void Environment::set_bg_color(const Color &p_color) {
@@ -79,31 +79,31 @@ void Environment::set_canvas_max_layer(int p_max_layer) {
void Environment::set_ambient_light_color(const Color &p_color) {
ambient_color = p_color;
- VS::get_singleton()->environment_set_ambient_light(environment, ambient_color, ambient_energy, ambient_skybox_contribution);
+ VS::get_singleton()->environment_set_ambient_light(environment, ambient_color, ambient_energy, ambient_sky_contribution);
}
void Environment::set_ambient_light_energy(float p_energy) {
ambient_energy = p_energy;
- VS::get_singleton()->environment_set_ambient_light(environment, ambient_color, ambient_energy, ambient_skybox_contribution);
+ VS::get_singleton()->environment_set_ambient_light(environment, ambient_color, ambient_energy, ambient_sky_contribution);
}
-void Environment::set_ambient_light_skybox_contribution(float p_energy) {
+void Environment::set_ambient_light_sky_contribution(float p_energy) {
- ambient_skybox_contribution = p_energy;
- VS::get_singleton()->environment_set_ambient_light(environment, ambient_color, ambient_energy, ambient_skybox_contribution);
+ ambient_sky_contribution = p_energy;
+ VS::get_singleton()->environment_set_ambient_light(environment, ambient_color, ambient_energy, ambient_sky_contribution);
}
Environment::BGMode Environment::get_background() const {
return bg_mode;
}
-Ref<SkyBox> Environment::get_skybox() const {
+Ref<Sky> Environment::get_sky() const {
- return bg_skybox;
+ return bg_sky;
}
-float Environment::get_skybox_scale() const {
+float Environment::get_sky_scale() const {
- return bg_skybox_scale;
+ return bg_sky_scale;
}
Color Environment::get_bg_color() const {
@@ -126,9 +126,9 @@ float Environment::get_ambient_light_energy() const {
return ambient_energy;
}
-float Environment::get_ambient_light_skybox_contribution() const {
+float Environment::get_ambient_light_sky_contribution() const {
- return ambient_skybox_contribution;
+ return ambient_sky_contribution;
}
void Environment::set_tonemapper(ToneMapper p_tone_mapper) {
@@ -266,8 +266,8 @@ Ref<Texture> Environment::get_adjustment_color_correction() const {
void Environment::_validate_property(PropertyInfo &property) const {
- if (property.name == "background/skybox" || property.name == "background/skybox_scale" || property.name == "ambient_light/skybox_contribution") {
- if (bg_mode != BG_SKYBOX) {
+ if (property.name == "background/sky" || property.name == "background/sky_scale" || property.name == "ambient_light/sky_contribution") {
+ if (bg_mode != BG_SKY) {
property.usage = PROPERTY_USAGE_NOEDITOR;
}
}
@@ -664,36 +664,36 @@ Environment::DOFBlurQuality Environment::get_dof_blur_near_quality() const {
void Environment::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_background", "mode"), &Environment::set_background);
- ClassDB::bind_method(D_METHOD("set_skybox", "skybox:CubeMap"), &Environment::set_skybox);
- ClassDB::bind_method(D_METHOD("set_skybox_scale", "scale"), &Environment::set_skybox_scale);
+ ClassDB::bind_method(D_METHOD("set_sky", "sky:CubeMap"), &Environment::set_sky);
+ ClassDB::bind_method(D_METHOD("set_sky_scale", "scale"), &Environment::set_sky_scale);
ClassDB::bind_method(D_METHOD("set_bg_color", "color"), &Environment::set_bg_color);
ClassDB::bind_method(D_METHOD("set_bg_energy", "energy"), &Environment::set_bg_energy);
ClassDB::bind_method(D_METHOD("set_canvas_max_layer", "layer"), &Environment::set_canvas_max_layer);
ClassDB::bind_method(D_METHOD("set_ambient_light_color", "color"), &Environment::set_ambient_light_color);
ClassDB::bind_method(D_METHOD("set_ambient_light_energy", "energy"), &Environment::set_ambient_light_energy);
- ClassDB::bind_method(D_METHOD("set_ambient_light_skybox_contribution", "energy"), &Environment::set_ambient_light_skybox_contribution);
+ ClassDB::bind_method(D_METHOD("set_ambient_light_sky_contribution", "energy"), &Environment::set_ambient_light_sky_contribution);
ClassDB::bind_method(D_METHOD("get_background"), &Environment::get_background);
- ClassDB::bind_method(D_METHOD("get_skybox:CubeMap"), &Environment::get_skybox);
- ClassDB::bind_method(D_METHOD("get_skybox_scale"), &Environment::get_skybox_scale);
+ ClassDB::bind_method(D_METHOD("get_sky:CubeMap"), &Environment::get_sky);
+ ClassDB::bind_method(D_METHOD("get_sky_scale"), &Environment::get_sky_scale);
ClassDB::bind_method(D_METHOD("get_bg_color"), &Environment::get_bg_color);
ClassDB::bind_method(D_METHOD("get_bg_energy"), &Environment::get_bg_energy);
ClassDB::bind_method(D_METHOD("get_canvas_max_layer"), &Environment::get_canvas_max_layer);
ClassDB::bind_method(D_METHOD("get_ambient_light_color"), &Environment::get_ambient_light_color);
ClassDB::bind_method(D_METHOD("get_ambient_light_energy"), &Environment::get_ambient_light_energy);
- ClassDB::bind_method(D_METHOD("get_ambient_light_skybox_contribution"), &Environment::get_ambient_light_skybox_contribution);
+ ClassDB::bind_method(D_METHOD("get_ambient_light_sky_contribution"), &Environment::get_ambient_light_sky_contribution);
ADD_GROUP("Background", "background_");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "background_mode", PROPERTY_HINT_ENUM, "Clear Color,Custom Color,Skybox,Canvas,Keep"), "set_background", "get_background");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "background_skybox", PROPERTY_HINT_RESOURCE_TYPE, "SkyBox"), "set_skybox", "get_skybox");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_skybox_scale", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_skybox_scale", "get_skybox_scale");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "background_mode", PROPERTY_HINT_ENUM, "Clear Color,Custom Color,Sky,Canvas,Keep"), "set_background", "get_background");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "background_sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_sky_scale", PROPERTY_HINT_RANGE, "0,32,0.01"), "set_sky_scale", "get_sky_scale");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "background_color"), "set_bg_color", "get_bg_color");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy");
ADD_PROPERTY(PropertyInfo(Variant::INT, "background_canvas_max_layer", PROPERTY_HINT_RANGE, "-1000,1000,1"), "set_canvas_max_layer", "get_canvas_max_layer");
ADD_GROUP("Ambient Light", "ambient_light_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ambient_light_color"), "set_ambient_light_color", "get_ambient_light_color");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_ambient_light_energy", "get_ambient_light_energy");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_skybox_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_skybox_contribution", "get_ambient_light_skybox_contribution");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "ambient_light_sky_contribution", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_ambient_light_sky_contribution", "get_ambient_light_sky_contribution");
ClassDB::bind_method(D_METHOD("set_ssr_enabled", "enabled"), &Environment::set_ssr_enabled);
ClassDB::bind_method(D_METHOD("is_ssr_enabled"), &Environment::is_ssr_enabled);
@@ -909,12 +909,12 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "adjustment_color_correction", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_adjustment_color_correction", "get_adjustment_color_correction");
- GLOBAL_DEF("rendering/skybox/irradiance_cube_resolution", 256);
+ GLOBAL_DEF("rendering/sky/irradiance_cube_resolution", 256);
BIND_CONSTANT(BG_KEEP);
BIND_CONSTANT(BG_CLEAR_COLOR);
BIND_CONSTANT(BG_COLOR);
- BIND_CONSTANT(BG_SKYBOX);
+ BIND_CONSTANT(BG_SKY);
BIND_CONSTANT(BG_CANVAS);
BIND_CONSTANT(BG_MAX);
BIND_CONSTANT(GLOW_BLEND_MODE_ADDITIVE);
@@ -933,11 +933,11 @@ void Environment::_bind_methods() {
Environment::Environment() {
bg_mode = BG_CLEAR_COLOR;
- bg_skybox_scale = 1.0;
+ bg_sky_scale = 1.0;
bg_energy = 1.0;
bg_canvas_max_layer = 0;
ambient_energy = 1.0;
- ambient_skybox_contribution = 0;
+ ambient_sky_contribution = 0;
tone_mapper = TONE_MAPPER_LINEAR;
tonemap_exposure = 1.0;
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 9014a9f5c2..d9141ccd9c 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -44,7 +44,7 @@ public:
BG_CLEAR_COLOR,
BG_COLOR,
- BG_SKYBOX,
+ BG_SKY,
BG_CANVAS,
BG_KEEP,
BG_MAX
@@ -74,14 +74,14 @@ private:
RID environment;
BGMode bg_mode;
- Ref<SkyBox> bg_skybox;
- float bg_skybox_scale;
+ Ref<Sky> bg_sky;
+ float bg_sky_scale;
Color bg_color;
float bg_energy;
int bg_canvas_max_layer;
Color ambient_color;
float ambient_energy;
- float ambient_skybox_contribution;
+ float ambient_sky_contribution;
ToneMapper tone_mapper;
float tonemap_exposure;
@@ -144,24 +144,24 @@ protected:
public:
void set_background(BGMode p_bg);
- void set_skybox(const Ref<SkyBox> &p_skybox);
- void set_skybox_scale(float p_scale);
+ void set_sky(const Ref<Sky> &p_sky);
+ void set_sky_scale(float p_scale);
void set_bg_color(const Color &p_color);
void set_bg_energy(float p_energy);
void set_canvas_max_layer(int p_max_layer);
void set_ambient_light_color(const Color &p_color);
void set_ambient_light_energy(float p_energy);
- void set_ambient_light_skybox_contribution(float p_energy);
+ void set_ambient_light_sky_contribution(float p_energy);
BGMode get_background() const;
- Ref<SkyBox> get_skybox() const;
- float get_skybox_scale() const;
+ Ref<Sky> get_sky() const;
+ float get_sky_scale() const;
Color get_bg_color() const;
float get_bg_energy() const;
int get_canvas_max_layer() const;
Color get_ambient_light_color() const;
float get_ambient_light_energy() const;
- float get_ambient_light_skybox_contribution() const;
+ float get_ambient_light_sky_contribution() const;
void set_tonemapper(ToneMapper p_tone_mapper);
ToneMapper get_tonemapper() const;
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index ab3e143e60..4846d84b33 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -982,10 +982,15 @@ void Mesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("surface_get_material:Material", "surf_idx"), &Mesh::surface_get_material);
ClassDB::bind_method(D_METHOD("surface_set_name", "surf_idx", "name"), &Mesh::surface_set_name);
ClassDB::bind_method(D_METHOD("surface_get_name", "surf_idx"), &Mesh::surface_get_name);
+ ClassDB::bind_method(D_METHOD("create_trimesh_shape:Shape"), &Mesh::create_trimesh_shape);
+ ClassDB::bind_method(D_METHOD("create_convex_shape:Shape"), &Mesh::create_convex_shape);
+ ClassDB::bind_method(D_METHOD("create_outline:Mesh", "margin"), &Mesh::create_outline);
ClassDB::bind_method(D_METHOD("center_geometry"), &Mesh::center_geometry);
ClassDB::set_method_flags(get_class_static(), _scs_create("center_geometry"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
ClassDB::bind_method(D_METHOD("regen_normalmaps"), &Mesh::regen_normalmaps);
ClassDB::set_method_flags(get_class_static(), _scs_create("regen_normalmaps"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(D_METHOD("get_faces"), &Mesh::get_faces);
+ ClassDB::bind_method(D_METHOD("generate_triangle_mesh:TriangleMesh"), &Mesh::generate_triangle_mesh);
ClassDB::bind_method(D_METHOD("set_custom_aabb", "aabb"), &Mesh::set_custom_aabb);
ClassDB::bind_method(D_METHOD("get_custom_aabb"), &Mesh::get_custom_aabb);
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp
index 241675569f..59ade4a729 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky_box.cpp
@@ -30,22 +30,22 @@
#include "sky_box.h"
#include "io/image_loader.h"
-void SkyBox::set_radiance_size(RadianceSize p_size) {
+void Sky::set_radiance_size(RadianceSize p_size) {
ERR_FAIL_INDEX(p_size, RADIANCE_SIZE_MAX);
radiance_size = p_size;
_radiance_changed();
}
-SkyBox::RadianceSize SkyBox::get_radiance_size() const {
+Sky::RadianceSize Sky::get_radiance_size() const {
return radiance_size;
}
-void SkyBox::_bind_methods() {
+void Sky::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_radiance_size", "size"), &SkyBox::set_radiance_size);
- ClassDB::bind_method(D_METHOD("get_radiance_size"), &SkyBox::get_radiance_size);
+ ClassDB::bind_method(D_METHOD("set_radiance_size", "size"), &Sky::set_radiance_size);
+ ClassDB::bind_method(D_METHOD("get_radiance_size"), &Sky::get_radiance_size);
ADD_PROPERTY(PropertyInfo(Variant::INT, "radiance_size", PROPERTY_HINT_ENUM, "256,512,1024,2048"), "set_radiance_size", "get_radiance_size");
@@ -56,123 +56,59 @@ void SkyBox::_bind_methods() {
BIND_CONSTANT(RADIANCE_SIZE_MAX);
}
-SkyBox::SkyBox() {
+Sky::Sky() {
radiance_size = RADIANCE_SIZE_512;
}
/////////////////////////////////////////
-void ImageSkyBox::_radiance_changed() {
+void PanoramaSky::_radiance_changed() {
- if (cube_map_valid) {
+ if (panorama.is_valid()) {
static const int size[RADIANCE_SIZE_MAX] = {
256, 512, 1024, 2048
};
- VS::get_singleton()->skybox_set_texture(sky_box, cube_map, size[get_radiance_size()]);
+ VS::get_singleton()->sky_set_texture(sky, panorama->get_rid(), size[get_radiance_size()]);
}
}
-void ImageSkyBox::set_image_path(ImagePath p_image, const String &p_path) {
+void PanoramaSky::set_panorama(const Ref<Texture> &p_panorama) {
- ERR_FAIL_INDEX(p_image, IMAGE_PATH_MAX);
- image_path[p_image] = p_path;
+ panorama = p_panorama;
- bool all_ok = true;
- for (int i = 0; i < IMAGE_PATH_MAX; i++) {
- if (image_path[i] == String()) {
- all_ok = false;
- }
- }
+ if (panorama.is_valid()) {
- cube_map_valid = false;
-
- if (all_ok) {
-
- Image images[IMAGE_PATH_MAX];
- int w = 0, h = 0;
- Image::Format format;
-
- for (int i = 0; i < IMAGE_PATH_MAX; i++) {
- Error err = ImageLoader::load_image(image_path[i], &images[i]);
- if (err) {
- ERR_PRINTS("Error loading image for skybox: " + image_path[i]);
- return;
- }
-
- if (i == 0) {
- w = images[0].get_width();
- h = images[0].get_height();
- format = images[0].get_format();
- } else {
- if (images[i].get_width() != w || images[i].get_height() != h || images[i].get_format() != format) {
- ERR_PRINTS("Image size mismatch (" + itos(images[i].get_width()) + "," + itos(images[i].get_height()) + ":" + Image::get_format_name(images[i].get_format()) + " when it should be " + itos(w) + "," + itos(h) + ":" + Image::get_format_name(format) + "): " + image_path[i]);
- return;
- }
- }
- }
-
- VS::get_singleton()->texture_allocate(cube_map, w, h, format, VS::TEXTURE_FLAG_FILTER | VS::TEXTURE_FLAG_CUBEMAP | VS::TEXTURE_FLAG_MIPMAPS);
- for (int i = 0; i < IMAGE_PATH_MAX; i++) {
- VS::get_singleton()->texture_set_data(cube_map, images[i], VS::CubeMapSide(i));
- }
-
- cube_map_valid = true;
_radiance_changed();
+
+ } else {
+ VS::get_singleton()->sky_set_texture(sky, RID(), 0);
}
}
-String ImageSkyBox::get_image_path(ImagePath p_image) const {
+Ref<Texture> PanoramaSky::get_panorama() const {
- ERR_FAIL_INDEX_V(p_image, IMAGE_PATH_MAX, String());
- return image_path[p_image];
+ return panorama;
}
-RID ImageSkyBox::get_rid() const {
+RID PanoramaSky::get_rid() const {
- return sky_box;
+ return sky;
}
-void ImageSkyBox::_bind_methods() {
+void PanoramaSky::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_image_path", "image", "path"), &ImageSkyBox::set_image_path);
- ClassDB::bind_method(D_METHOD("get_image_path", "image"), &ImageSkyBox::get_image_path);
-
- List<String> extensions;
- ImageLoader::get_recognized_extensions(&extensions);
- String hints;
- for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
- if (hints != String()) {
- hints += ",";
- }
- hints += "*." + E->get();
- }
+ ClassDB::bind_method(D_METHOD("set_panorama", "texture:Texture"), &PanoramaSky::set_panorama);
+ ClassDB::bind_method(D_METHOD("get_panorama:Texture"), &PanoramaSky::get_panorama);
- ADD_GROUP("Image Path", "image_path_");
- ADD_PROPERTYI(PropertyInfo(Variant::STRING, "image_path_negative_x", PROPERTY_HINT_FILE, hints), "set_image_path", "get_image_path", IMAGE_PATH_NEGATIVE_X);
- ADD_PROPERTYI(PropertyInfo(Variant::STRING, "image_path_positive_x", PROPERTY_HINT_FILE, hints), "set_image_path", "get_image_path", IMAGE_PATH_POSITIVE_X);
- ADD_PROPERTYI(PropertyInfo(Variant::STRING, "image_path_negative_y", PROPERTY_HINT_FILE, hints), "set_image_path", "get_image_path", IMAGE_PATH_NEGATIVE_Y);
- ADD_PROPERTYI(PropertyInfo(Variant::STRING, "image_path_positive_y", PROPERTY_HINT_FILE, hints), "set_image_path", "get_image_path", IMAGE_PATH_POSITIVE_Y);
- ADD_PROPERTYI(PropertyInfo(Variant::STRING, "image_path_negative_z", PROPERTY_HINT_FILE, hints), "set_image_path", "get_image_path", IMAGE_PATH_NEGATIVE_Z);
- ADD_PROPERTYI(PropertyInfo(Variant::STRING, "image_path_positive_z", PROPERTY_HINT_FILE, hints), "set_image_path", "get_image_path", IMAGE_PATH_POSITIVE_Z);
-
- BIND_CONSTANT(IMAGE_PATH_NEGATIVE_X);
- BIND_CONSTANT(IMAGE_PATH_POSITIVE_X);
- BIND_CONSTANT(IMAGE_PATH_NEGATIVE_Y);
- BIND_CONSTANT(IMAGE_PATH_POSITIVE_Y);
- BIND_CONSTANT(IMAGE_PATH_NEGATIVE_Z);
- BIND_CONSTANT(IMAGE_PATH_POSITIVE_Z);
- BIND_CONSTANT(IMAGE_PATH_MAX);
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "panorama", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_panorama", "get_panorama");
}
-ImageSkyBox::ImageSkyBox() {
+PanoramaSky::PanoramaSky() {
- cube_map = VS::get_singleton()->texture_create();
- sky_box = VS::get_singleton()->skybox_create();
- cube_map_valid = false;
+ sky = VS::get_singleton()->sky_create();
}
-ImageSkyBox::~ImageSkyBox() {
+PanoramaSky::~PanoramaSky() {
- VS::get_singleton()->free(cube_map);
- VS::get_singleton()->free(sky_box);
+ VS::get_singleton()->free(sky);
}
diff --git a/scene/resources/sky_box.h b/scene/resources/sky_box.h
index f748ac1e2d..afbfb3019e 100644
--- a/scene/resources/sky_box.h
+++ b/scene/resources/sky_box.h
@@ -27,13 +27,13 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SKYBOX_H
-#define SKYBOX_H
+#ifndef Sky_H
+#define Sky_H
#include "scene/resources/texture.h"
-class SkyBox : public Resource {
- GDCLASS(SkyBox, Resource);
+class Sky : public Resource {
+ GDCLASS(Sky, Resource);
public:
enum RadianceSize {
@@ -54,13 +54,13 @@ protected:
public:
void set_radiance_size(RadianceSize p_size);
RadianceSize get_radiance_size() const;
- SkyBox();
+ Sky();
};
-VARIANT_ENUM_CAST(SkyBox::RadianceSize)
+VARIANT_ENUM_CAST(Sky::RadianceSize)
-class ImageSkyBox : public SkyBox {
- GDCLASS(ImageSkyBox, SkyBox);
+class PanoramaSky : public Sky {
+ GDCLASS(PanoramaSky, Sky);
public:
enum ImagePath {
@@ -74,26 +74,23 @@ public:
};
private:
- RID cube_map;
- RID sky_box;
- bool cube_map_valid;
-
- String image_path[IMAGE_PATH_MAX];
+ RID sky;
+ Ref<Texture> panorama;
protected:
static void _bind_methods();
virtual void _radiance_changed();
public:
- void set_image_path(ImagePath p_image, const String &p_path);
- String get_image_path(ImagePath p_image) const;
+ void set_panorama(const Ref<Texture> &p_panorama);
+ Ref<Texture> get_panorama() const;
virtual RID get_rid() const;
- ImageSkyBox();
- ~ImageSkyBox();
+ PanoramaSky();
+ ~PanoramaSky();
};
-VARIANT_ENUM_CAST(ImageSkyBox::ImagePath)
+VARIANT_ENUM_CAST(PanoramaSky::ImagePath)
-#endif // SKYBOX_H
+#endif // Sky_H
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 13529c8572..b665de2de1 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -297,6 +297,15 @@ int StyleBoxFlat::get_border_size() const {
return border_size;
}
+void StyleBoxFlat::_set_additional_border_size(Margin p_margin, int p_size) {
+ additional_border_size[p_margin] = p_size;
+ emit_changed();
+}
+
+int StyleBoxFlat::_get_additional_border_size(Margin p_margin) const {
+ return additional_border_size[p_margin];
+}
+
void StyleBoxFlat::set_border_blend(bool p_blend) {
blend = p_blend;
@@ -357,6 +366,12 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
if (draw_center)
vs->canvas_item_add_rect(p_canvas_item, Rect2(r.pos, r.size), bg_color);
+
+ Rect2i r_add = p_rect;
+ vs->canvas_item_add_rect(p_canvas_item, Rect2(Point2i(r_add.pos.x - additional_border_size[MARGIN_LEFT], r_add.pos.y - additional_border_size[MARGIN_TOP]), Size2(r_add.size.width + additional_border_size[MARGIN_LEFT] + additional_border_size[MARGIN_RIGHT], additional_border_size[MARGIN_TOP])), light_color);
+ vs->canvas_item_add_rect(p_canvas_item, Rect2(Point2i(r_add.pos.x - additional_border_size[MARGIN_LEFT], r_add.pos.y), Size2(additional_border_size[MARGIN_LEFT], r_add.size.height)), light_color);
+ vs->canvas_item_add_rect(p_canvas_item, Rect2(Point2i(r_add.pos.x + r_add.size.width, r_add.pos.y), Size2(additional_border_size[MARGIN_RIGHT], r_add.size.height)), dark_color);
+ vs->canvas_item_add_rect(p_canvas_item, Rect2(Point2i(r_add.pos.x - additional_border_size[MARGIN_LEFT], r_add.pos.y + r_add.size.height), Size2(r_add.size.width + additional_border_size[MARGIN_LEFT] + additional_border_size[MARGIN_RIGHT], additional_border_size[MARGIN_BOTTOM])), dark_color);
}
float StyleBoxFlat::get_style_margin(Margin p_margin) const {
@@ -394,6 +409,10 @@ StyleBoxFlat::StyleBoxFlat() {
draw_center = true;
blend = true;
border_size = 0;
+ additional_border_size[0] = 0;
+ additional_border_size[1] = 0;
+ additional_border_size[2] = 0;
+ additional_border_size[3] = 0;
}
StyleBoxFlat::~StyleBoxFlat() {
}
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index e14a536879..bbb2444bd7 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -123,6 +123,7 @@ class StyleBoxFlat : public StyleBox {
Color dark_color;
int border_size;
+ int additional_border_size[4];
bool draw_center;
bool blend;
@@ -143,6 +144,9 @@ public:
void set_border_size(int p_size);
int get_border_size() const;
+ void _set_additional_border_size(Margin p_margin, int p_size);
+ int _get_additional_border_size(Margin p_margin) const;
+
void set_border_blend(bool p_blend);
bool get_border_blend() const;
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index f0ac30a76e..bc8deb501e 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -91,9 +91,10 @@ void ImageTexture::reload_from_file() {
return;
uint32_t flags = get_flags();
- Image img;
+ Ref<Image> img;
+ img.instance();
- Error err = ImageLoader::load_image(path, &img);
+ Error err = ImageLoader::load_image(path, img);
ERR_FAIL_COND(err != OK);
create_from_image(img, flags);
@@ -101,7 +102,7 @@ void ImageTexture::reload_from_file() {
bool ImageTexture::_set(const StringName &p_name, const Variant &p_value) {
- if (p_name == "image" && p_value.get_type() == Variant::IMAGE)
+ if (p_name == "image")
create_from_image(p_value, flags);
else if (p_name == "flags")
if (w * h == 0)
@@ -155,7 +156,7 @@ void ImageTexture::_get_property_list(List<PropertyInfo> *p_list) const {
}
p_list->push_back(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter,Anisotropic,sRGB,Mirrored Repeat"));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "image", img_hint, String::num(lossy_storage_quality)));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "size", PROPERTY_HINT_NONE, ""));
p_list->push_back(PropertyInfo(Variant::INT, "storage", PROPERTY_HINT_ENUM, "Uncompressed,Compress Lossy,Compress Lossless"));
p_list->push_back(PropertyInfo(Variant::REAL, "lossy_quality", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
@@ -167,8 +168,9 @@ void ImageTexture::_reload_hook(const RID &p_hook) {
if (!path.is_resource_file())
return;
- Image img;
- Error err = ImageLoader::load_image(path, &img);
+ Ref<Image> img;
+ img.instance();
+ Error err = ImageLoader::load_image(path, img);
ERR_FAIL_COND(err != OK);
@@ -185,14 +187,14 @@ void ImageTexture::create(int p_width, int p_height, Image::Format p_format, uin
w = p_width;
h = p_height;
}
-void ImageTexture::create_from_image(const Image &p_image, uint32_t p_flags) {
+void ImageTexture::create_from_image(const Ref<Image> &p_image, uint32_t p_flags) {
flags = p_flags;
- w = p_image.get_width();
- h = p_image.get_height();
- format = p_image.get_format();
+ w = p_image->get_width();
+ h = p_image->get_height();
+ format = p_image->get_format();
- VisualServer::get_singleton()->texture_allocate(texture, p_image.get_width(), p_image.get_height(), p_image.get_format(), p_flags);
+ VisualServer::get_singleton()->texture_allocate(texture, p_image->get_width(), p_image->get_height(), p_image->get_format(), p_flags);
VisualServer::get_singleton()->texture_set_data(texture, p_image);
_change_notify();
}
@@ -220,12 +222,13 @@ Image::Format ImageTexture::get_format() const {
void ImageTexture::load(const String &p_path) {
- Image img;
- img.load(p_path);
+ Ref<Image> img;
+ img.instance();
+ img->load(p_path);
create_from_image(img);
}
-void ImageTexture::set_data(const Image &p_image) {
+void ImageTexture::set_data(const Ref<Image> &p_image) {
VisualServer::get_singleton()->texture_set_data(texture, p_image);
@@ -237,7 +240,7 @@ void ImageTexture::_resource_path_changed() {
String path = get_path();
}
-Image ImageTexture::get_data() const {
+Ref<Image> ImageTexture::get_data() const {
return VisualServer::get_singleton()->texture_get_data(texture);
}
@@ -257,42 +260,6 @@ RID ImageTexture::get_rid() const {
return texture;
}
-void ImageTexture::fix_alpha_edges() {
-
- if (format == Image::FORMAT_RGBA8 /*&& !(flags&FLAG_CUBEMAP)*/) {
-
- Image img = get_data();
- img.fix_alpha_edges();
- set_data(img);
- }
-}
-
-void ImageTexture::premultiply_alpha() {
-
- if (format == Image::FORMAT_RGBA8 /*&& !(flags&FLAG_CUBEMAP)*/) {
-
- Image img = get_data();
- img.premultiply_alpha();
- set_data(img);
- }
-}
-
-void ImageTexture::normal_to_xy() {
-
- Image img = get_data();
- img.normalmap_to_xy();
- create_from_image(img, flags);
-}
-
-void ImageTexture::shrink_x2_and_keep_size() {
-
- Size2 sizeov = get_size();
- Image img = get_data();
- img.resize(img.get_width() / 2, img.get_height() / 2, Image::INTERPOLATE_BILINEAR);
- create_from_image(img, flags);
- set_size_override(sizeov);
-}
-
bool ImageTexture::has_alpha() const {
return (format == Image::FORMAT_LA8 || format == Image::FORMAT_RGBA8);
@@ -358,7 +325,8 @@ float ImageTexture::get_lossy_storage_quality() const {
void ImageTexture::_set_data(Dictionary p_data) {
- Image img = p_data["image"];
+ Ref<Image> img = p_data["image"];
+ ERR_FAIL_COND(!img.is_valid());
uint32_t flags = p_data["flags"];
create_from_image(img, flags);
@@ -372,25 +340,17 @@ void ImageTexture::_set_data(Dictionary p_data) {
void ImageTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("create", "width", "height", "format", "flags"), &ImageTexture::create, DEFVAL(FLAGS_DEFAULT));
- ClassDB::bind_method(D_METHOD("create_from_image", "image", "flags"), &ImageTexture::create_from_image, DEFVAL(FLAGS_DEFAULT));
+ ClassDB::bind_method(D_METHOD("create_from_image", "image:Image", "flags"), &ImageTexture::create_from_image, DEFVAL(FLAGS_DEFAULT));
ClassDB::bind_method(D_METHOD("get_format"), &ImageTexture::get_format);
ClassDB::bind_method(D_METHOD("load", "path"), &ImageTexture::load);
- ClassDB::bind_method(D_METHOD("set_data", "image"), &ImageTexture::set_data);
- ClassDB::bind_method(D_METHOD("get_data", "cube_side"), &ImageTexture::get_data);
+ ClassDB::bind_method(D_METHOD("set_data", "image:Image"), &ImageTexture::set_data);
+ ClassDB::bind_method(D_METHOD("get_data:Image", "cube_side"), &ImageTexture::get_data);
ClassDB::bind_method(D_METHOD("set_storage", "mode"), &ImageTexture::set_storage);
ClassDB::bind_method(D_METHOD("get_storage"), &ImageTexture::get_storage);
ClassDB::bind_method(D_METHOD("set_lossy_storage_quality", "quality"), &ImageTexture::set_lossy_storage_quality);
ClassDB::bind_method(D_METHOD("get_lossy_storage_quality"), &ImageTexture::get_lossy_storage_quality);
- ClassDB::bind_method(D_METHOD("fix_alpha_edges"), &ImageTexture::fix_alpha_edges);
- ClassDB::bind_method(D_METHOD("premultiply_alpha"), &ImageTexture::premultiply_alpha);
- ClassDB::bind_method(D_METHOD("normal_to_xy"), &ImageTexture::normal_to_xy);
- ClassDB::bind_method(D_METHOD("shrink_x2_and_keep_size"), &ImageTexture::shrink_x2_and_keep_size);
ClassDB::bind_method(D_METHOD("set_size_override", "size"), &ImageTexture::set_size_override);
- ClassDB::set_method_flags(get_class_static(), _scs_create("fix_alpha_edges"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
- ClassDB::set_method_flags(get_class_static(), _scs_create("premultiply_alpha"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
- ClassDB::set_method_flags(get_class_static(), _scs_create("normal_to_xy"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
- ClassDB::set_method_flags(get_class_static(), _scs_create("shrink_x2_and_keep_size"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR);
ClassDB::bind_method(D_METHOD("_reload_hook", "rid"), &ImageTexture::_reload_hook);
BIND_CONSTANT(STORAGE_RAW);
@@ -442,7 +402,9 @@ Image::Format StreamTexture::get_format() const {
return format;
}
-Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Image &image, int p_size_limit) {
+Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit) {
+
+ ERR_FAIL_COND_V(image.is_null(), ERR_INVALID_PARAMETER);
FileAccess *f = FileAccess::open(p_path, FileAccess::READ);
ERR_FAIL_COND_V(!f, ERR_CANT_OPEN);
@@ -509,7 +471,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
}
//mipmaps need to be read independently, they will be later combined
- Vector<Image> mipmap_images;
+ Vector<Ref<Image> > mipmap_images;
int total_size = 0;
for (int i = 0; i < mipmaps; i++) {
@@ -525,18 +487,19 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
f->get_buffer(w.ptr(), size);
}
- Image img;
+ Ref<Image> img;
if (df & FORMAT_BIT_LOSSLESS) {
img = Image::lossless_unpacker(pv);
} else {
img = Image::lossy_unpacker(pv);
}
- if (img.empty()) {
+ if (img.is_null()) {
memdelete(f);
- ERR_FAIL_COND_V(img.empty(), ERR_FILE_CORRUPT);
+ ERR_FAIL_COND_V(img->empty(), ERR_FILE_CORRUPT);
}
- total_size += img.get_data().size();
+
+ total_size += img->get_data().size();
mipmap_images.push_back(img);
}
@@ -560,7 +523,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
int ofs = 0;
for (int i = 0; i < mipmap_images.size(); i++) {
- PoolVector<uint8_t> id = mipmap_images[i].get_data();
+ PoolVector<uint8_t> id = mipmap_images[i]->get_data();
int len = id.size();
PoolVector<uint8_t>::Read r = id.read();
copymem(&w[ofs], r.ptr(), len);
@@ -568,7 +531,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
}
}
- image = Image(sw, sh, true, mipmap_images[0].get_format(), img_data);
+ image->create(sw, sh, true, mipmap_images[0]->get_format(), img_data);
return OK;
}
@@ -591,7 +554,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
memdelete(f);
- image = Image(tw, th, false, format, img_data);
+ image->create(tw, th, false, format, img_data);
return OK;
} else {
@@ -637,7 +600,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
}
}
- image = Image(sw, sh, true, format, img_data);
+ image->create(sw, sh, true, format, img_data);
return OK;
}
@@ -649,19 +612,20 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
Error StreamTexture::load(const String &p_path) {
int lw, lh, lflags;
- Image image;
+ Ref<Image> image;
+ image.instance();
Error err = _load_data(p_path, lw, lh, lflags, image);
if (err)
return err;
- VS::get_singleton()->texture_allocate(texture, image.get_width(), image.get_height(), image.get_format(), lflags);
+ VS::get_singleton()->texture_allocate(texture, image->get_width(), image->get_height(), image->get_format(), lflags);
VS::get_singleton()->texture_set_data(texture, image);
w = lw;
h = lh;
flags = lflags;
path_to_file = p_path;
- format = image.get_format();
+ format = image->get_format();
return OK;
}
@@ -707,7 +671,7 @@ bool StreamTexture::has_alpha() const {
return false;
}
-Image StreamTexture::get_data() const {
+Ref<Image> StreamTexture::get_data() const {
return VS::get_singleton()->texture_get_data(texture);
}
@@ -1175,25 +1139,25 @@ uint32_t CubeMap::get_flags() const {
return flags;
}
-void CubeMap::set_side(Side p_side, const Image &p_image) {
+void CubeMap::set_side(Side p_side, const Ref<Image> &p_image) {
- ERR_FAIL_COND(p_image.empty());
+ ERR_FAIL_COND(p_image->empty());
ERR_FAIL_INDEX(p_side, 6);
if (!_is_valid()) {
- format = p_image.get_format();
- w = p_image.get_width();
- h = p_image.get_height();
- VS::get_singleton()->texture_allocate(cubemap, w, h, p_image.get_format(), flags | VS::TEXTURE_FLAG_CUBEMAP);
+ format = p_image->get_format();
+ w = p_image->get_width();
+ h = p_image->get_height();
+ VS::get_singleton()->texture_allocate(cubemap, w, h, p_image->get_format(), flags | VS::TEXTURE_FLAG_CUBEMAP);
}
VS::get_singleton()->texture_set_data(cubemap, p_image, VS::CubeMapSide(p_side));
valid[p_side] = true;
}
-Image CubeMap::get_side(Side p_side) const {
+Ref<Image> CubeMap::get_side(Side p_side) const {
if (!valid[p_side])
- return Image();
+ return Ref<Image>();
return VS::get_singleton()->texture_get_data(cubemap, VS::CubeMapSide(p_side));
}
@@ -1306,14 +1270,12 @@ void CubeMap::_get_property_list(List<PropertyInfo> *p_list) const {
}
p_list->push_back(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter"));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "side/left", img_hint, String::num(lossy_storage_quality)));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "side/right", img_hint, String::num(lossy_storage_quality)));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "side/bottom", img_hint, String::num(lossy_storage_quality)));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "side/top", img_hint, String::num(lossy_storage_quality)));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "side/front", img_hint, String::num(lossy_storage_quality)));
- p_list->push_back(PropertyInfo(Variant::IMAGE, "side/back", img_hint, String::num(lossy_storage_quality)));
- p_list->push_back(PropertyInfo(Variant::INT, "storage", PROPERTY_HINT_ENUM, "Uncompressed,Compress Lossy,Compress Lossless", PROPERTY_USAGE_EDITOR));
- p_list->push_back(PropertyInfo(Variant::REAL, "lossy_quality", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "side/left", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "side/right", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "side/bottom", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "side/top", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "side/front", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "side/back", PROPERTY_HINT_RESOURCE_TYPE, "Image"));
}
void CubeMap::_bind_methods() {
@@ -1603,7 +1565,7 @@ void CurveTexture::set_points(const PoolVector<Vector2> &p_points) {
}
}
- Image image(width, 1, false, Image::FORMAT_RF, data);
+ Ref<Image> image = memnew(Image(width, 1, false, Image::FORMAT_RF, data));
VS::get_singleton()->texture_allocate(texture, width, 1, Image::FORMAT_RF, VS::TEXTURE_FLAG_FILTER);
VS::get_singleton()->texture_set_data(texture, image);
@@ -1715,7 +1677,7 @@ void GradientTexture::_update() {
}
}
- Image image(width, 1, false, Image::FORMAT_RGBA8, data);
+ Ref<Image> image = memnew(Image(width, 1, false, Image::FORMAT_RGBA8, data));
VS::get_singleton()->texture_allocate(texture, width, 1, Image::FORMAT_RGBA8, VS::TEXTURE_FLAG_FILTER);
VS::get_singleton()->texture_set_data(texture, image);
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index a6ea163813..07416529ae 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -73,7 +73,7 @@ public:
virtual void draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false) const;
virtual bool get_rect_region(const Rect2 &p_rect, const Rect2 &p_src_rect, Rect2 &r_rect, Rect2 &r_src_rect) const;
- virtual Image get_data() const { return Image(); }
+ virtual Ref<Image> get_data() const { return Ref<Image>(); }
Texture();
};
@@ -116,14 +116,14 @@ protected:
public:
void create(int p_width, int p_height, Image::Format p_format, uint32_t p_flags = FLAGS_DEFAULT);
- void create_from_image(const Image &p_image, uint32_t p_flags = FLAGS_DEFAULT);
+ void create_from_image(const Ref<Image> &p_image, uint32_t p_flags = FLAGS_DEFAULT);
void set_flags(uint32_t p_flags);
uint32_t get_flags() const;
Image::Format get_format() const;
void load(const String &p_path);
- void set_data(const Image &p_image);
- Image get_data() const;
+ void set_data(const Ref<Image> &p_image);
+ Ref<Image> get_data() const;
int get_width() const;
int get_height() const;
@@ -140,11 +140,6 @@ public:
void set_lossy_storage_quality(float p_lossy_storage_quality);
float get_lossy_storage_quality() const;
- void fix_alpha_edges();
- void premultiply_alpha();
- void normal_to_xy();
- void shrink_x2_and_keep_size();
-
void set_size_override(const Size2 &p_size);
virtual void set_path(const String &p_path, bool p_take_over = false);
@@ -175,7 +170,7 @@ public:
};
private:
- Error _load_data(const String &p_path, int &tw, int &th, int &flags, Image &image, int p_size_limit = 0);
+ Error _load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit = 0);
String path_to_file;
RID texture;
Image::Format format;
@@ -212,7 +207,7 @@ public:
virtual bool has_alpha() const;
virtual void set_flags(uint32_t p_flags);
- virtual Image get_data() const;
+ virtual Ref<Image> get_data() const;
StreamTexture();
~StreamTexture();
@@ -370,8 +365,8 @@ protected:
public:
void set_flags(uint32_t p_flags);
uint32_t get_flags() const;
- void set_side(Side p_side, const Image &p_image);
- Image get_side(Side p_side) const;
+ void set_side(Side p_side, const Ref<Image> &p_image);
+ Ref<Image> get_side(Side p_side) const;
Image::Format get_format() const;
int get_width() const;
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index ff679bc15f..c51dcd1a3b 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -52,12 +52,12 @@ public:
virtual RID environment_create() = 0;
virtual void environment_set_background(RID p_env, VS::EnvironmentBG p_bg) = 0;
- virtual void environment_set_skybox(RID p_env, RID p_skybox) = 0;
- virtual void environment_set_skybox_scale(RID p_env, float p_scale) = 0;
+ virtual void environment_set_sky(RID p_env, RID p_sky) = 0;
+ virtual void environment_set_sky_scale(RID p_env, float p_scale) = 0;
virtual void environment_set_bg_color(RID p_env, const Color &p_color) = 0;
virtual void environment_set_bg_energy(RID p_env, float p_energy) = 0;
virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) = 0;
- virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_skybox_contribution = 0.0) = 0;
+ virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_sky_contribution = 0.0) = 0;
virtual void environment_set_dof_blur_near(RID p_env, bool p_enable, float p_distance, float p_transition, float p_far_amount, VS::EnvironmentDOFBlurQuality p_quality) = 0;
virtual void environment_set_dof_blur_far(RID p_env, bool p_enable, float p_distance, float p_transition, float p_far_amount, VS::EnvironmentDOFBlurQuality p_quality) = 0;
@@ -163,11 +163,12 @@ public:
virtual RID texture_create() = 0;
virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT) = 0;
- virtual void texture_set_data(RID p_texture, const Image &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) = 0;
- virtual Image texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const = 0;
+ virtual void texture_set_data(RID p_texture, const Ref<Image> &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) = 0;
+ virtual Ref<Image> texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const = 0;
virtual void texture_set_flags(RID p_texture, uint32_t p_flags) = 0;
virtual uint32_t texture_get_flags(RID p_texture) const = 0;
virtual Image::Format texture_get_format(RID p_texture) const = 0;
+ virtual uint32_t texture_get_texid(RID p_texture) const = 0;
virtual uint32_t texture_get_width(RID p_texture) const = 0;
virtual uint32_t texture_get_height(RID p_texture) const = 0;
virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) = 0;
@@ -186,10 +187,10 @@ public:
virtual void textures_keep_original(bool p_enable) = 0;
- /* SKYBOX API */
+ /* SKY API */
- virtual RID skybox_create() = 0;
- virtual void skybox_set_texture(RID p_skybox, RID p_cube_map, int p_radiance_size) = 0;
+ virtual RID sky_create() = 0;
+ virtual void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) = 0;
/* SHADER API */
@@ -931,7 +932,7 @@ public:
virtual RasterizerCanvas *get_canvas() = 0;
virtual RasterizerScene *get_scene() = 0;
- virtual void set_boot_image(const Image &p_image, const Color &p_color, bool p_scale) = 0;
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) = 0;
virtual void initialize() = 0;
virtual void begin_frame() = 0;
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 5ba975d193..2fdff29f0a 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -121,7 +121,7 @@ int VisualServerRaster::get_render_info(RenderInfo p_info) {
/* TESTING */
-void VisualServerRaster::set_boot_image(const Image &p_image, const Color &p_color, bool p_scale) {
+void VisualServerRaster::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
redraw_request();
VSG::rasterizer->set_boot_image(p_image, p_color, p_scale);
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 7de497d529..957af7b9dd 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -623,11 +623,12 @@ public:
BIND0R(RID, texture_create)
BIND5(texture_allocate, RID, int, int, Image::Format, uint32_t)
- BIND3(texture_set_data, RID, const Image &, CubeMapSide)
- BIND2RC(Image, texture_get_data, RID, CubeMapSide)
+ BIND3(texture_set_data, RID, const Ref<Image> &, CubeMapSide)
+ BIND2RC(Ref<Image>, texture_get_data, RID, CubeMapSide)
BIND2(texture_set_flags, RID, uint32_t)
BIND1RC(uint32_t, texture_get_flags, RID)
BIND1RC(Image::Format, texture_get_format, RID)
+ BIND1RC(uint32_t, texture_get_texid, RID)
BIND1RC(uint32_t, texture_get_width, RID)
BIND1RC(uint32_t, texture_get_height, RID)
BIND3(texture_set_size_override, RID, int, int)
@@ -643,10 +644,10 @@ public:
BIND1(textures_keep_original, bool)
- /* SKYBOX API */
+ /* SKY API */
- BIND0R(RID, skybox_create)
- BIND3(skybox_set_texture, RID, RID, int)
+ BIND0R(RID, sky_create)
+ BIND3(sky_set_texture, RID, RID, int)
/* SHADER API */
@@ -931,8 +932,8 @@ public:
BIND0R(RID, environment_create)
BIND2(environment_set_background, RID, EnvironmentBG)
- BIND2(environment_set_skybox, RID, RID)
- BIND2(environment_set_skybox_scale, RID, float)
+ BIND2(environment_set_sky, RID, RID)
+ BIND2(environment_set_sky_scale, RID, float)
BIND2(environment_set_bg_color, RID, const Color &)
BIND2(environment_set_bg_energy, RID, float)
BIND2(environment_set_canvas_max_layer, RID, int)
@@ -1109,7 +1110,7 @@ public:
/* TESTING */
- virtual void set_boot_image(const Image &p_image, const Color &p_color, bool p_scale);
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale);
virtual void set_default_clear_color(const Color &p_color);
virtual bool has_feature(Features p_feature) const;
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 5a7ae93a31..5df1ca456b 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -68,10 +68,11 @@ VisualServer *VisualServer::create() {
return NULL;
}
-RID VisualServer::texture_create_from_image(const Image &p_image, uint32_t p_flags) {
+RID VisualServer::texture_create_from_image(const Ref<Image> &p_image, uint32_t p_flags) {
+ ERR_FAIL_COND_V(!p_image.is_valid(), RID());
RID texture = texture_create();
- texture_allocate(texture, p_image.get_width(), p_image.get_height(), p_image.get_format(), p_flags); //if it has mipmaps, use, else generate
+ texture_allocate(texture, p_image->get_width(), p_image->get_height(), p_image->get_format(), p_flags); //if it has mipmaps, use, else generate
ERR_FAIL_COND_V(!texture.is_valid(), texture);
texture_set_data(texture, p_image);
@@ -120,12 +121,12 @@ RID VisualServer::get_test_texture() {
}
}
- Image data(TEST_TEXTURE_SIZE, TEST_TEXTURE_SIZE, false, Image::FORMAT_RGB8, test_data);
+ Ref<Image> data = memnew(Image(TEST_TEXTURE_SIZE, TEST_TEXTURE_SIZE, false, Image::FORMAT_RGB8, test_data));
test_texture = texture_create_from_image(data);
return test_texture;
-};
+}
void VisualServer::_free_internal_rids() {
@@ -324,7 +325,7 @@ RID VisualServer::get_white_texture() {
for (int i = 0; i < 16 * 3; i++)
w[i] = 255;
}
- Image white(4, 4, 0, Image::FORMAT_RGB8, wt);
+ Ref<Image> white = memnew(Image(4, 4, 0, Image::FORMAT_RGB8, wt));
white_texture = texture_create();
texture_allocate(white_texture, 4, 4, Image::FORMAT_RGB8);
texture_set_data(white_texture, white);
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 7accc7d904..aa98d47455 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -32,6 +32,7 @@
#include "bsp_tree.h"
#include "geometry.h"
+#include "image.h"
#include "math_2d.h"
#include "object.h"
#include "rid.h"
@@ -106,13 +107,14 @@ public:
};
virtual RID texture_create() = 0;
- RID texture_create_from_image(const Image &p_image, uint32_t p_flags = TEXTURE_FLAGS_DEFAULT); // helper
+ RID texture_create_from_image(const Ref<Image> &p_image, uint32_t p_flags = TEXTURE_FLAGS_DEFAULT); // helper
virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = TEXTURE_FLAGS_DEFAULT) = 0;
- virtual void texture_set_data(RID p_texture, const Image &p_image, CubeMapSide p_cube_side = CUBEMAP_LEFT) = 0;
- virtual Image texture_get_data(RID p_texture, CubeMapSide p_cube_side = CUBEMAP_LEFT) const = 0;
+ virtual void texture_set_data(RID p_texture, const Ref<Image> &p_image, CubeMapSide p_cube_side = CUBEMAP_LEFT) = 0;
+ virtual Ref<Image> texture_get_data(RID p_texture, CubeMapSide p_cube_side = CUBEMAP_LEFT) const = 0;
virtual void texture_set_flags(RID p_texture, uint32_t p_flags) = 0;
virtual uint32_t texture_get_flags(RID p_texture) const = 0;
virtual Image::Format texture_get_format(RID p_texture) const = 0;
+ virtual uint32_t texture_get_texid(RID p_texture) const = 0;
virtual uint32_t texture_get_width(RID p_texture) const = 0;
virtual uint32_t texture_get_height(RID p_texture) const = 0;
virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) = 0;
@@ -139,10 +141,10 @@ public:
virtual void textures_keep_original(bool p_enable) = 0;
- /* SKYBOX API */
+ /* SKY API */
- virtual RID skybox_create() = 0;
- virtual void skybox_set_texture(RID p_skybox, RID p_cube_map, int p_radiance_size) = 0;
+ virtual RID sky_create() = 0;
+ virtual void sky_set_texture(RID p_sky, RID p_cube_map, int p_radiance_size) = 0;
/* SHADER API */
@@ -587,19 +589,19 @@ public:
ENV_BG_CLEAR_COLOR,
ENV_BG_COLOR,
- ENV_BG_SKYBOX,
+ ENV_BG_SKY,
ENV_BG_CANVAS,
ENV_BG_KEEP,
ENV_BG_MAX
};
virtual void environment_set_background(RID p_env, EnvironmentBG p_bg) = 0;
- virtual void environment_set_skybox(RID p_env, RID p_skybox) = 0;
- virtual void environment_set_skybox_scale(RID p_env, float p_scale) = 0;
+ virtual void environment_set_sky(RID p_env, RID p_sky) = 0;
+ virtual void environment_set_sky_scale(RID p_env, float p_scale) = 0;
virtual void environment_set_bg_color(RID p_env, const Color &p_color) = 0;
virtual void environment_set_bg_energy(RID p_env, float p_energy) = 0;
virtual void environment_set_canvas_max_layer(RID p_env, int p_max_layer) = 0;
- virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_skybox_contribution = 0.0) = 0;
+ virtual void environment_set_ambient_light(RID p_env, const Color &p_color, float p_energy = 1.0, float p_sky_contribution = 0.0) = 0;
//set default SSAO options
//set default SSR options
@@ -884,7 +886,7 @@ public:
virtual void mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data);
virtual void mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes);
- virtual void set_boot_image(const Image &p_image, const Color &p_color, bool p_scale) = 0;
+ virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) = 0;
virtual void set_default_clear_color(const Color &p_color) = 0;
enum Features {