diff options
Diffstat (limited to 'scene/2d/canvas_item.cpp')
-rw-r--r-- | scene/2d/canvas_item.cpp | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 6e5885a410..3574a39940 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -135,10 +135,10 @@ Variant CanvasItemMaterial::get_shader_param(const StringName& p_param) const{ void CanvasItemMaterial::_bind_methods() { - ClassDB::bind_method(_MD("set_shader","shader:Shader"),&CanvasItemMaterial::set_shader); - ClassDB::bind_method(_MD("get_shader:Shader"),&CanvasItemMaterial::get_shader); - ClassDB::bind_method(_MD("set_shader_param","param","value"),&CanvasItemMaterial::set_shader_param); - ClassDB::bind_method(_MD("get_shader_param","param"),&CanvasItemMaterial::get_shader_param); + ClassDB::bind_method(D_METHOD("set_shader","shader:Shader"),&CanvasItemMaterial::set_shader); + ClassDB::bind_method(D_METHOD("get_shader:Shader"),&CanvasItemMaterial::get_shader); + ClassDB::bind_method(D_METHOD("set_shader_param","param","value"),&CanvasItemMaterial::set_shader_param); + ClassDB::bind_method(D_METHOD("get_shader_param","param"),&CanvasItemMaterial::get_shader_param); @@ -905,88 +905,88 @@ Vector2 CanvasItem::get_local_mouse_pos() const{ void CanvasItem::_bind_methods() { - ClassDB::bind_method(_MD("_toplevel_raise_self"),&CanvasItem::_toplevel_raise_self); - ClassDB::bind_method(_MD("_update_callback"),&CanvasItem::_update_callback); - - ClassDB::bind_method(_MD("edit_set_state","state"),&CanvasItem::edit_set_state); - ClassDB::bind_method(_MD("edit_get_state:Variant"),&CanvasItem::edit_get_state); - ClassDB::bind_method(_MD("edit_set_rect","rect"),&CanvasItem::edit_set_rect); - ClassDB::bind_method(_MD("edit_rotate","degrees"),&CanvasItem::edit_rotate); - - ClassDB::bind_method(_MD("get_item_rect"),&CanvasItem::get_item_rect); - ClassDB::bind_method(_MD("get_item_and_children_rect"),&CanvasItem::get_item_and_children_rect); - //ClassDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform); - - ClassDB::bind_method(_MD("get_canvas_item"),&CanvasItem::get_canvas_item); - - ClassDB::bind_method(_MD("set_visible"),&CanvasItem::set_visible); - ClassDB::bind_method(_MD("is_visible"),&CanvasItem::is_visible); - ClassDB::bind_method(_MD("is_visible_in_tree"),&CanvasItem::is_visible_in_tree); - ClassDB::bind_method(_MD("show"),&CanvasItem::show); - ClassDB::bind_method(_MD("hide"),&CanvasItem::hide); - - ClassDB::bind_method(_MD("update"),&CanvasItem::update); - - ClassDB::bind_method(_MD("set_as_toplevel","enable"),&CanvasItem::set_as_toplevel); - ClassDB::bind_method(_MD("is_set_as_toplevel"),&CanvasItem::is_set_as_toplevel); - - ClassDB::bind_method(_MD("set_light_mask","light_mask"),&CanvasItem::set_light_mask); - ClassDB::bind_method(_MD("get_light_mask"),&CanvasItem::get_light_mask); - - ClassDB::bind_method(_MD("set_modulate","modulate"),&CanvasItem::set_modulate); - ClassDB::bind_method(_MD("get_modulate"),&CanvasItem::get_modulate); - ClassDB::bind_method(_MD("set_self_modulate","self_modulate"),&CanvasItem::set_self_modulate); - ClassDB::bind_method(_MD("get_self_modulate"),&CanvasItem::get_self_modulate); - - ClassDB::bind_method(_MD("set_draw_behind_parent","enable"),&CanvasItem::set_draw_behind_parent); - ClassDB::bind_method(_MD("is_draw_behind_parent_enabled"),&CanvasItem::is_draw_behind_parent_enabled); - - ClassDB::bind_method(_MD("_set_on_top","on_top"),&CanvasItem::_set_on_top); - ClassDB::bind_method(_MD("_is_on_top"),&CanvasItem::_is_on_top); - //ClassDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform); - - ClassDB::bind_method(_MD("draw_line","from","to","color","width","antialiased"),&CanvasItem::draw_line,DEFVAL(1.0),DEFVAL(false)); - ClassDB::bind_method(_MD("draw_rect","rect","color"),&CanvasItem::draw_rect); - ClassDB::bind_method(_MD("draw_circle","pos","radius","color"),&CanvasItem::draw_circle); - ClassDB::bind_method(_MD("draw_texture","texture:Texture","pos","modulate"),&CanvasItem::draw_texture,DEFVAL(Color(1,1,1,1))); - ClassDB::bind_method(_MD("draw_texture_rect","texture:Texture","rect","tile","modulate","transpose"),&CanvasItem::draw_texture_rect,DEFVAL(Color(1,1,1)),DEFVAL(false)); - ClassDB::bind_method(_MD("draw_texture_rect_region","texture:Texture","rect","src_rect","modulate","transpose"),&CanvasItem::draw_texture_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false)); - ClassDB::bind_method(_MD("draw_style_box","style_box:StyleBox","rect"),&CanvasItem::draw_style_box); - ClassDB::bind_method(_MD("draw_primitive","points","colors","uvs","texture:Texture","width"),&CanvasItem::draw_primitive,DEFVAL(Variant()),DEFVAL(1.0)); - ClassDB::bind_method(_MD("draw_polygon","points","colors","uvs","texture:Texture"),&CanvasItem::draw_polygon,DEFVAL(PoolVector2Array()),DEFVAL(Variant())); - ClassDB::bind_method(_MD("draw_colored_polygon","points","color","uvs","texture:Texture"),&CanvasItem::draw_colored_polygon,DEFVAL(PoolVector2Array()),DEFVAL(Variant())); - ClassDB::bind_method(_MD("draw_string","font:Font","pos","text","modulate","clip_w"),&CanvasItem::draw_string,DEFVAL(Color(1,1,1)),DEFVAL(-1)); - ClassDB::bind_method(_MD("draw_char","font:Font","pos","char","next","modulate"),&CanvasItem::draw_char,DEFVAL(Color(1,1,1))); - - ClassDB::bind_method(_MD("draw_set_transform","pos","rot","scale"),&CanvasItem::draw_set_transform); - ClassDB::bind_method(_MD("draw_set_transform_matrix","xform"),&CanvasItem::draw_set_transform_matrix); - ClassDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform); - ClassDB::bind_method(_MD("get_global_transform"),&CanvasItem::get_global_transform); - ClassDB::bind_method(_MD("get_global_transform_with_canvas"),&CanvasItem::get_global_transform_with_canvas); - ClassDB::bind_method(_MD("get_viewport_transform"),&CanvasItem::get_viewport_transform); - ClassDB::bind_method(_MD("get_viewport_rect"),&CanvasItem::get_viewport_rect); - ClassDB::bind_method(_MD("get_canvas_transform"),&CanvasItem::get_canvas_transform); - ClassDB::bind_method(_MD("get_local_mouse_pos"),&CanvasItem::get_local_mouse_pos); - ClassDB::bind_method(_MD("get_global_mouse_pos"),&CanvasItem::get_global_mouse_pos); - ClassDB::bind_method(_MD("get_canvas"),&CanvasItem::get_canvas); - ClassDB::bind_method(_MD("get_world_2d"),&CanvasItem::get_world_2d); - //ClassDB::bind_method(_MD("get_viewport"),&CanvasItem::get_viewport); - - ClassDB::bind_method(_MD("set_material","material:CanvasItemMaterial"),&CanvasItem::set_material); - ClassDB::bind_method(_MD("get_material:CanvasItemMaterial"),&CanvasItem::get_material); - - ClassDB::bind_method(_MD("set_use_parent_material","enable"),&CanvasItem::set_use_parent_material); - ClassDB::bind_method(_MD("get_use_parent_material"),&CanvasItem::get_use_parent_material); - - ClassDB::bind_method(_MD("set_notify_local_transform","enable"),&CanvasItem::set_notify_local_transform); - ClassDB::bind_method(_MD("is_local_transform_notification_enabled"),&CanvasItem::is_local_transform_notification_enabled); - - ClassDB::bind_method(_MD("set_notify_transform","enable"),&CanvasItem::set_notify_transform); - ClassDB::bind_method(_MD("is_transform_notification_enabled"),&CanvasItem::is_transform_notification_enabled); - - ClassDB::bind_method(_MD("make_canvas_pos_local","screen_point"), + ClassDB::bind_method(D_METHOD("_toplevel_raise_self"),&CanvasItem::_toplevel_raise_self); + ClassDB::bind_method(D_METHOD("_update_callback"),&CanvasItem::_update_callback); + + ClassDB::bind_method(D_METHOD("edit_set_state","state"),&CanvasItem::edit_set_state); + ClassDB::bind_method(D_METHOD("edit_get_state:Variant"),&CanvasItem::edit_get_state); + ClassDB::bind_method(D_METHOD("edit_set_rect","rect"),&CanvasItem::edit_set_rect); + ClassDB::bind_method(D_METHOD("edit_rotate","degrees"),&CanvasItem::edit_rotate); + + ClassDB::bind_method(D_METHOD("get_item_rect"),&CanvasItem::get_item_rect); + ClassDB::bind_method(D_METHOD("get_item_and_children_rect"),&CanvasItem::get_item_and_children_rect); + //ClassDB::bind_method(D_METHOD("get_transform"),&CanvasItem::get_transform); + + ClassDB::bind_method(D_METHOD("get_canvas_item"),&CanvasItem::get_canvas_item); + + ClassDB::bind_method(D_METHOD("set_visible"),&CanvasItem::set_visible); + ClassDB::bind_method(D_METHOD("is_visible"),&CanvasItem::is_visible); + ClassDB::bind_method(D_METHOD("is_visible_in_tree"),&CanvasItem::is_visible_in_tree); + ClassDB::bind_method(D_METHOD("show"),&CanvasItem::show); + ClassDB::bind_method(D_METHOD("hide"),&CanvasItem::hide); + + ClassDB::bind_method(D_METHOD("update"),&CanvasItem::update); + + ClassDB::bind_method(D_METHOD("set_as_toplevel","enable"),&CanvasItem::set_as_toplevel); + ClassDB::bind_method(D_METHOD("is_set_as_toplevel"),&CanvasItem::is_set_as_toplevel); + + ClassDB::bind_method(D_METHOD("set_light_mask","light_mask"),&CanvasItem::set_light_mask); + ClassDB::bind_method(D_METHOD("get_light_mask"),&CanvasItem::get_light_mask); + + ClassDB::bind_method(D_METHOD("set_modulate","modulate"),&CanvasItem::set_modulate); + ClassDB::bind_method(D_METHOD("get_modulate"),&CanvasItem::get_modulate); + ClassDB::bind_method(D_METHOD("set_self_modulate","self_modulate"),&CanvasItem::set_self_modulate); + ClassDB::bind_method(D_METHOD("get_self_modulate"),&CanvasItem::get_self_modulate); + + ClassDB::bind_method(D_METHOD("set_draw_behind_parent","enable"),&CanvasItem::set_draw_behind_parent); + ClassDB::bind_method(D_METHOD("is_draw_behind_parent_enabled"),&CanvasItem::is_draw_behind_parent_enabled); + + ClassDB::bind_method(D_METHOD("_set_on_top","on_top"),&CanvasItem::_set_on_top); + ClassDB::bind_method(D_METHOD("_is_on_top"),&CanvasItem::_is_on_top); + //ClassDB::bind_method(D_METHOD("get_transform"),&CanvasItem::get_transform); + + ClassDB::bind_method(D_METHOD("draw_line","from","to","color","width","antialiased"),&CanvasItem::draw_line,DEFVAL(1.0),DEFVAL(false)); + ClassDB::bind_method(D_METHOD("draw_rect","rect","color"),&CanvasItem::draw_rect); + ClassDB::bind_method(D_METHOD("draw_circle","pos","radius","color"),&CanvasItem::draw_circle); + ClassDB::bind_method(D_METHOD("draw_texture","texture:Texture","pos","modulate"),&CanvasItem::draw_texture,DEFVAL(Color(1,1,1,1))); + ClassDB::bind_method(D_METHOD("draw_texture_rect","texture:Texture","rect","tile","modulate","transpose"),&CanvasItem::draw_texture_rect,DEFVAL(Color(1,1,1)),DEFVAL(false)); + ClassDB::bind_method(D_METHOD("draw_texture_rect_region","texture:Texture","rect","src_rect","modulate","transpose"),&CanvasItem::draw_texture_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false)); + ClassDB::bind_method(D_METHOD("draw_style_box","style_box:StyleBox","rect"),&CanvasItem::draw_style_box); + ClassDB::bind_method(D_METHOD("draw_primitive","points","colors","uvs","texture:Texture","width"),&CanvasItem::draw_primitive,DEFVAL(Variant()),DEFVAL(1.0)); + ClassDB::bind_method(D_METHOD("draw_polygon","points","colors","uvs","texture:Texture"),&CanvasItem::draw_polygon,DEFVAL(PoolVector2Array()),DEFVAL(Variant())); + ClassDB::bind_method(D_METHOD("draw_colored_polygon","points","color","uvs","texture:Texture"),&CanvasItem::draw_colored_polygon,DEFVAL(PoolVector2Array()),DEFVAL(Variant())); + ClassDB::bind_method(D_METHOD("draw_string","font:Font","pos","text","modulate","clip_w"),&CanvasItem::draw_string,DEFVAL(Color(1,1,1)),DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("draw_char","font:Font","pos","char","next","modulate"),&CanvasItem::draw_char,DEFVAL(Color(1,1,1))); + + ClassDB::bind_method(D_METHOD("draw_set_transform","pos","rot","scale"),&CanvasItem::draw_set_transform); + ClassDB::bind_method(D_METHOD("draw_set_transform_matrix","xform"),&CanvasItem::draw_set_transform_matrix); + ClassDB::bind_method(D_METHOD("get_transform"),&CanvasItem::get_transform); + ClassDB::bind_method(D_METHOD("get_global_transform"),&CanvasItem::get_global_transform); + ClassDB::bind_method(D_METHOD("get_global_transform_with_canvas"),&CanvasItem::get_global_transform_with_canvas); + ClassDB::bind_method(D_METHOD("get_viewport_transform"),&CanvasItem::get_viewport_transform); + ClassDB::bind_method(D_METHOD("get_viewport_rect"),&CanvasItem::get_viewport_rect); + ClassDB::bind_method(D_METHOD("get_canvas_transform"),&CanvasItem::get_canvas_transform); + ClassDB::bind_method(D_METHOD("get_local_mouse_pos"),&CanvasItem::get_local_mouse_pos); + ClassDB::bind_method(D_METHOD("get_global_mouse_pos"),&CanvasItem::get_global_mouse_pos); + ClassDB::bind_method(D_METHOD("get_canvas"),&CanvasItem::get_canvas); + ClassDB::bind_method(D_METHOD("get_world_2d"),&CanvasItem::get_world_2d); + //ClassDB::bind_method(D_METHOD("get_viewport"),&CanvasItem::get_viewport); + + ClassDB::bind_method(D_METHOD("set_material","material:CanvasItemMaterial"),&CanvasItem::set_material); + ClassDB::bind_method(D_METHOD("get_material:CanvasItemMaterial"),&CanvasItem::get_material); + + ClassDB::bind_method(D_METHOD("set_use_parent_material","enable"),&CanvasItem::set_use_parent_material); + ClassDB::bind_method(D_METHOD("get_use_parent_material"),&CanvasItem::get_use_parent_material); + + ClassDB::bind_method(D_METHOD("set_notify_local_transform","enable"),&CanvasItem::set_notify_local_transform); + ClassDB::bind_method(D_METHOD("is_local_transform_notification_enabled"),&CanvasItem::is_local_transform_notification_enabled); + + ClassDB::bind_method(D_METHOD("set_notify_transform","enable"),&CanvasItem::set_notify_transform); + ClassDB::bind_method(D_METHOD("is_transform_notification_enabled"),&CanvasItem::is_transform_notification_enabled); + + ClassDB::bind_method(D_METHOD("make_canvas_pos_local","screen_point"), &CanvasItem::make_canvas_pos_local); - ClassDB::bind_method(_MD("make_input_local","event"),&CanvasItem::make_input_local); + ClassDB::bind_method(D_METHOD("make_input_local","event"),&CanvasItem::make_input_local); BIND_VMETHOD(MethodInfo("_draw")); |