本网站可以出售:只需60000元直接拥有。QQ:939804642
您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ADD_SIGNAL函数代码示例

51自学网 2021-06-01 19:33:37
  C++
这篇教程C++ ADD_SIGNAL函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ADD_SIGNAL函数的典型用法代码示例。如果您正苦于以下问题:C++ ADD_SIGNAL函数的具体用法?C++ ADD_SIGNAL怎么用?C++ ADD_SIGNAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ADD_SIGNAL函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ADD_PROPERTY

void VisibilityNotifier2D::_bind_methods(){	ClassDB::bind_method(_MD("set_rect","rect"),&VisibilityNotifier2D::set_rect);	ClassDB::bind_method(_MD("get_rect"),&VisibilityNotifier2D::get_rect);	ClassDB::bind_method(_MD("is_on_screen"),&VisibilityNotifier2D::is_on_screen);	ADD_PROPERTY( PropertyInfo(Variant::RECT2,"rect"),_SCS("set_rect"),_SCS("get_rect"));	ADD_SIGNAL( MethodInfo("enter_viewport",PropertyInfo(Variant::OBJECT,"viewport",PROPERTY_HINT_RESOURCE_TYPE,"Viewport")) );	ADD_SIGNAL( MethodInfo("exit_viewport",PropertyInfo(Variant::OBJECT,"viewport",PROPERTY_HINT_RESOURCE_TYPE,"Viewport")) );	ADD_SIGNAL( MethodInfo("enter_screen"));	ADD_SIGNAL( MethodInfo("exit_screen"));}
开发者ID:lonesurvivor,项目名称:godot,代码行数:13,


示例2: ADD_PROPERTY

void VisibilityNotifier::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_aabb", "rect"), &VisibilityNotifier::set_aabb);	ClassDB::bind_method(D_METHOD("get_aabb"), &VisibilityNotifier::get_aabb);	ClassDB::bind_method(D_METHOD("is_on_screen"), &VisibilityNotifier::is_on_screen);	ADD_PROPERTY(PropertyInfo(Variant::AABB, "aabb"), "set_aabb", "get_aabb");	ADD_SIGNAL(MethodInfo("camera_entered", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera")));	ADD_SIGNAL(MethodInfo("camera_exited", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera")));	ADD_SIGNAL(MethodInfo("screen_entered"));	ADD_SIGNAL(MethodInfo("screen_exited"));}
开发者ID:93i,项目名称:godot,代码行数:13,


示例3: ADD_SIGNAL

void Sprite::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&Sprite::set_texture);	ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&Sprite::get_texture);	ObjectTypeDB::bind_method(_MD("set_centered","centered"),&Sprite::set_centered);	ObjectTypeDB::bind_method(_MD("is_centered"),&Sprite::is_centered);	ObjectTypeDB::bind_method(_MD("set_offset","offset"),&Sprite::set_offset);	ObjectTypeDB::bind_method(_MD("get_offset"),&Sprite::get_offset);	ObjectTypeDB::bind_method(_MD("set_flip_h","flip_h"),&Sprite::set_flip_h);	ObjectTypeDB::bind_method(_MD("is_flipped_h"),&Sprite::is_flipped_h);	ObjectTypeDB::bind_method(_MD("set_flip_v","flip_v"),&Sprite::set_flip_v);	ObjectTypeDB::bind_method(_MD("is_flipped_v"),&Sprite::is_flipped_v);	ObjectTypeDB::bind_method(_MD("set_region","enabled"),&Sprite::set_region);	ObjectTypeDB::bind_method(_MD("is_region"),&Sprite::is_region);	ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Sprite::set_region_rect);	ObjectTypeDB::bind_method(_MD("get_region_rect"),&Sprite::get_region_rect);	ObjectTypeDB::bind_method(_MD("set_frame","frame"),&Sprite::set_frame);	ObjectTypeDB::bind_method(_MD("get_frame"),&Sprite::get_frame);	ObjectTypeDB::bind_method(_MD("set_vframes","vframes"),&Sprite::set_vframes);	ObjectTypeDB::bind_method(_MD("get_vframes"),&Sprite::get_vframes);	ObjectTypeDB::bind_method(_MD("set_hframes","hframes"),&Sprite::set_hframes);	ObjectTypeDB::bind_method(_MD("get_hframes"),&Sprite::get_hframes);	ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&Sprite::set_modulate);	ObjectTypeDB::bind_method(_MD("get_modulate"),&Sprite::get_modulate);	ADD_SIGNAL(MethodInfo("frame_changed"));	ADD_SIGNAL(MethodInfo("texture_changed"));	ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture"));	ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered"));	ADD_PROPERTYNZ( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset"));	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "flip_h"), _SCS("set_flip_h"),_SCS("is_flipped_h"));	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "flip_v"), _SCS("set_flip_v"),_SCS("is_flipped_v"));	ADD_PROPERTYNO( PropertyInfo( Variant::INT, "vframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_vframes"),_SCS("get_vframes"));	ADD_PROPERTYNO( PropertyInfo( Variant::INT, "hframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_hframes"),_SCS("get_hframes"));	ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame"));	ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate"));	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "region"), _SCS("set_region"),_SCS("is_region"));	ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));}
开发者ID:03050903,项目名称:godot,代码行数:51,


示例4: ADD_SIGNAL

void ScenesDock::_bind_methods() {	ObjectTypeDB::bind_method(_MD("_update_tree"),&ScenesDock::_update_tree);	ObjectTypeDB::bind_method(_MD("_rescan"),&ScenesDock::_rescan);	ObjectTypeDB::bind_method(_MD("_favorites_toggled"),&ScenesDock::_favorites_toggled);	ObjectTypeDB::bind_method(_MD("_favorite_toggled"),&ScenesDock::_favorite_toggled);	ObjectTypeDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed);	ObjectTypeDB::bind_method(_MD("_open_pressed"),&ScenesDock::_open_pressed);	ObjectTypeDB::bind_method(_MD("_save_favorites"),&ScenesDock::_save_favorites);	ADD_SIGNAL(MethodInfo("instance"));	ADD_SIGNAL(MethodInfo("open"));}
开发者ID:NosicLin,项目名称:godot,代码行数:14,


示例5: ADD_SIGNAL

void CodeTextEditor::_bind_methods() {	ClassDB::bind_method("_text_editor_gui_input", &CodeTextEditor::_text_editor_gui_input);	ClassDB::bind_method("_line_col_changed", &CodeTextEditor::_line_col_changed);	ClassDB::bind_method("_text_changed", &CodeTextEditor::_text_changed);	ClassDB::bind_method("_on_settings_change", &CodeTextEditor::_on_settings_change);	ClassDB::bind_method("_text_changed_idle_timeout", &CodeTextEditor::_text_changed_idle_timeout);	ClassDB::bind_method("_code_complete_timer_timeout", &CodeTextEditor::_code_complete_timer_timeout);	ClassDB::bind_method("_complete_request", &CodeTextEditor::_complete_request);	ClassDB::bind_method("_font_resize_timeout", &CodeTextEditor::_font_resize_timeout);	ADD_SIGNAL(MethodInfo("validate_script"));	ADD_SIGNAL(MethodInfo("load_theme_settings"));}
开发者ID:jejung,项目名称:godot,代码行数:14,


示例6: ADD_SIGNAL

void GraphEdit::_bind_methods() {	ClassDB::bind_method(D_METHOD("connect_node:Error", "from", "from_port", "to", "to_port"), &GraphEdit::connect_node);	ClassDB::bind_method(D_METHOD("is_node_connected", "from", "from_port", "to", "to_port"), &GraphEdit::is_node_connected);	ClassDB::bind_method(D_METHOD("disconnect_node", "from", "from_port", "to", "to_port"), &GraphEdit::disconnect_node);	ClassDB::bind_method(D_METHOD("get_connection_list"), &GraphEdit::_get_connection_list);	ClassDB::bind_method(D_METHOD("get_scroll_ofs"), &GraphEdit::get_scroll_ofs);	ClassDB::bind_method(D_METHOD("set_scroll_ofs", "ofs"), &GraphEdit::set_scroll_ofs);	ClassDB::bind_method(D_METHOD("set_zoom", "p_zoom"), &GraphEdit::set_zoom);	ClassDB::bind_method(D_METHOD("get_zoom"), &GraphEdit::get_zoom);	ClassDB::bind_method(D_METHOD("set_snap", "pixels"), &GraphEdit::set_snap);	ClassDB::bind_method(D_METHOD("get_snap"), &GraphEdit::get_snap);	ClassDB::bind_method(D_METHOD("set_use_snap", "enable"), &GraphEdit::set_use_snap);	ClassDB::bind_method(D_METHOD("is_using_snap"), &GraphEdit::is_using_snap);	ClassDB::bind_method(D_METHOD("set_right_disconnects", "enable"), &GraphEdit::set_right_disconnects);	ClassDB::bind_method(D_METHOD("is_right_disconnects_enabled"), &GraphEdit::is_right_disconnects_enabled);	ClassDB::bind_method(D_METHOD("_graph_node_moved"), &GraphEdit::_graph_node_moved);	ClassDB::bind_method(D_METHOD("_graph_node_raised"), &GraphEdit::_graph_node_raised);	ClassDB::bind_method(D_METHOD("_top_layer_input"), &GraphEdit::_top_layer_input);	ClassDB::bind_method(D_METHOD("_top_layer_draw"), &GraphEdit::_top_layer_draw);	ClassDB::bind_method(D_METHOD("_scroll_moved"), &GraphEdit::_scroll_moved);	ClassDB::bind_method(D_METHOD("_zoom_minus"), &GraphEdit::_zoom_minus);	ClassDB::bind_method(D_METHOD("_zoom_reset"), &GraphEdit::_zoom_reset);	ClassDB::bind_method(D_METHOD("_zoom_plus"), &GraphEdit::_zoom_plus);	ClassDB::bind_method(D_METHOD("_snap_toggled"), &GraphEdit::_snap_toggled);	ClassDB::bind_method(D_METHOD("_snap_value_changed"), &GraphEdit::_snap_value_changed);	ClassDB::bind_method(D_METHOD("_gui_input"), &GraphEdit::_gui_input);	ClassDB::bind_method(D_METHOD("_update_scroll_offset"), &GraphEdit::_update_scroll_offset);	ClassDB::bind_method(D_METHOD("_connections_layer_draw"), &GraphEdit::_connections_layer_draw);	ClassDB::bind_method(D_METHOD("set_selected", "node"), &GraphEdit::set_selected);	ADD_SIGNAL(MethodInfo("connection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));	ADD_SIGNAL(MethodInfo("disconnection_request", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::STRING, "to"), PropertyInfo(Variant::INT, "to_slot")));	ADD_SIGNAL(MethodInfo("popup_request", PropertyInfo(Variant::VECTOR2, "p_position")));	ADD_SIGNAL(MethodInfo("duplicate_nodes_request"));	ADD_SIGNAL(MethodInfo("node_selected", PropertyInfo(Variant::OBJECT, "node")));	ADD_SIGNAL(MethodInfo("connection_to_empty", PropertyInfo(Variant::STRING, "from"), PropertyInfo(Variant::INT, "from_slot"), PropertyInfo(Variant::VECTOR2, "release_pos")));	ADD_SIGNAL(MethodInfo("delete_nodes_request"));	ADD_SIGNAL(MethodInfo("_begin_node_move"));	ADD_SIGNAL(MethodInfo("_end_node_move"));	ADD_SIGNAL(MethodInfo("scroll_offset_changed", PropertyInfo(Variant::VECTOR2, "ofs")));}
开发者ID:MattUV,项目名称:godot,代码行数:50,


示例7: ADD_SIGNAL

void EditorFileSystem::_bind_methods() {	ClassDB::bind_method(D_METHOD("get_filesystem"), &EditorFileSystem::get_filesystem);	ClassDB::bind_method(D_METHOD("is_scanning"), &EditorFileSystem::is_scanning);	ClassDB::bind_method(D_METHOD("get_scanning_progress"), &EditorFileSystem::get_scanning_progress);	ClassDB::bind_method(D_METHOD("scan"), &EditorFileSystem::scan);	ClassDB::bind_method(D_METHOD("scan_sources"), &EditorFileSystem::scan_changes);	ClassDB::bind_method(D_METHOD("update_file", "path"), &EditorFileSystem::update_file);	ClassDB::bind_method(D_METHOD("get_filesystem_path", "path"), &EditorFileSystem::get_filesystem_path);	ClassDB::bind_method(D_METHOD("get_file_type", "path"), &EditorFileSystem::get_file_type);	ADD_SIGNAL(MethodInfo("filesystem_changed"));	ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist")));}
开发者ID:rrrfffrrr,项目名称:godot,代码行数:14,


示例8: BIND_VMETHOD

void BaseButton::_bind_methods() {	ClassDB::bind_method(D_METHOD("_gui_input"), &BaseButton::_gui_input);	ClassDB::bind_method(D_METHOD("_unhandled_input"), &BaseButton::_unhandled_input);	ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &BaseButton::set_pressed);	ClassDB::bind_method(D_METHOD("is_pressed"), &BaseButton::is_pressed);	ClassDB::bind_method(D_METHOD("is_hovered"), &BaseButton::is_hovered);	ClassDB::bind_method(D_METHOD("set_toggle_mode", "enabled"), &BaseButton::set_toggle_mode);	ClassDB::bind_method(D_METHOD("is_toggle_mode"), &BaseButton::is_toggle_mode);	ClassDB::bind_method(D_METHOD("set_disabled", "disabled"), &BaseButton::set_disabled);	ClassDB::bind_method(D_METHOD("is_disabled"), &BaseButton::is_disabled);	ClassDB::bind_method(D_METHOD("set_action_mode", "mode"), &BaseButton::set_action_mode);	ClassDB::bind_method(D_METHOD("get_action_mode"), &BaseButton::get_action_mode);	ClassDB::bind_method(D_METHOD("set_button_mask", "mask"), &BaseButton::set_button_mask);	ClassDB::bind_method(D_METHOD("get_button_mask"), &BaseButton::get_button_mask);	ClassDB::bind_method(D_METHOD("get_draw_mode"), &BaseButton::get_draw_mode);	ClassDB::bind_method(D_METHOD("set_enabled_focus_mode", "mode"), &BaseButton::set_enabled_focus_mode);	ClassDB::bind_method(D_METHOD("get_enabled_focus_mode"), &BaseButton::get_enabled_focus_mode);	ClassDB::bind_method(D_METHOD("set_shortcut", "shortcut"), &BaseButton::set_shortcut);	ClassDB::bind_method(D_METHOD("get_shortcut"), &BaseButton::get_shortcut);	ClassDB::bind_method(D_METHOD("set_button_group", "button_group"), &BaseButton::set_button_group);	ClassDB::bind_method(D_METHOD("get_button_group"), &BaseButton::get_button_group);	BIND_VMETHOD(MethodInfo("_pressed"));	BIND_VMETHOD(MethodInfo("_toggled", PropertyInfo(Variant::BOOL, "button_pressed")));	ADD_SIGNAL(MethodInfo("pressed"));	ADD_SIGNAL(MethodInfo("button_up"));	ADD_SIGNAL(MethodInfo("button_down"));	ADD_SIGNAL(MethodInfo("toggled", PropertyInfo(Variant::BOOL, "button_pressed")));	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "disabled"), "set_disabled", "is_disabled");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "toggle_mode"), "set_toggle_mode", "is_toggle_mode");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");	ADD_PROPERTYNO(PropertyInfo(Variant::INT, "action_mode", PROPERTY_HINT_ENUM, "Button Press,Button Release"), "set_action_mode", "get_action_mode");	ADD_PROPERTYNO(PropertyInfo(Variant::INT, "button_mask", PROPERTY_HINT_FLAGS, "Mouse Left, Mouse Right, Mouse Middle"), "set_button_mask", "get_button_mask");	ADD_PROPERTY(PropertyInfo(Variant::INT, "enabled_focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_enabled_focus_mode", "get_enabled_focus_mode");	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shortcut", PROPERTY_HINT_RESOURCE_TYPE, "ShortCut"), "set_shortcut", "get_shortcut");	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "group", PROPERTY_HINT_RESOURCE_TYPE, "ButtonGroup"), "set_button_group", "get_button_group");	BIND_ENUM_CONSTANT(DRAW_NORMAL);	BIND_ENUM_CONSTANT(DRAW_PRESSED);	BIND_ENUM_CONSTANT(DRAW_HOVER);	BIND_ENUM_CONSTANT(DRAW_DISABLED);	BIND_ENUM_CONSTANT(DRAW_HOVER_PRESSED);	BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_PRESS);	BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_RELEASE);}
开发者ID:93i,项目名称:godot,代码行数:50,


示例9: DEFVAL

void Popup::_bind_methods() {	ClassDB::bind_method(D_METHOD("popup_centered", "size"), &Popup::popup_centered, DEFVAL(Size2()));	ClassDB::bind_method(D_METHOD("popup_centered_ratio", "ratio"), &Popup::popup_centered_ratio, DEFVAL(0.75));	ClassDB::bind_method(D_METHOD("popup_centered_minsize", "minsize"), &Popup::popup_centered_minsize, DEFVAL(Size2()));	ClassDB::bind_method(D_METHOD("popup", "bounds"), &Popup::popup, DEFVAL(Rect2()));	ClassDB::bind_method(D_METHOD("set_exclusive", "enable"), &Popup::set_exclusive);	ClassDB::bind_method(D_METHOD("is_exclusive"), &Popup::is_exclusive);	ADD_SIGNAL(MethodInfo("about_to_show"));	ADD_SIGNAL(MethodInfo("popup_hide"));	ADD_GROUP("Popup", "popup_");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "popup_exclusive"), "set_exclusive", "is_exclusive");	BIND_CONSTANT(NOTIFICATION_POST_POPUP);	BIND_CONSTANT(NOTIFICATION_POPUP_HIDE);}
开发者ID:Max-Might,项目名称:godot,代码行数:15,


示例10: DEFVAL

void WebSocketServer::_bind_methods() {	ClassDB::bind_method(D_METHOD("is_listening"), &WebSocketServer::is_listening);	ClassDB::bind_method(D_METHOD("listen", "port", "protocols", "gd_mp_api"), &WebSocketServer::listen, DEFVAL(PoolVector<String>()), DEFVAL(false));	ClassDB::bind_method(D_METHOD("stop"), &WebSocketServer::stop);	ClassDB::bind_method(D_METHOD("has_peer", "id"), &WebSocketServer::has_peer);	ClassDB::bind_method(D_METHOD("get_peer_address", "id"), &WebSocketServer::get_peer_address);	ClassDB::bind_method(D_METHOD("get_peer_port", "id"), &WebSocketServer::get_peer_port);	ClassDB::bind_method(D_METHOD("disconnect_peer", "id", "code", "reason"), &WebSocketServer::disconnect_peer, DEFVAL(1000), DEFVAL(""));	ADD_SIGNAL(MethodInfo("client_close_request", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "code"), PropertyInfo(Variant::STRING, "reason")));	ADD_SIGNAL(MethodInfo("client_disconnected", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::BOOL, "was_clean_close")));	ADD_SIGNAL(MethodInfo("client_connected", PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::STRING, "protocol")));	ADD_SIGNAL(MethodInfo("data_received", PropertyInfo(Variant::INT, "id")));}
开发者ID:93i,项目名称:godot,代码行数:15,


示例11: DEFVAL

void AnimationNode::_bind_methods() {	ClassDB::bind_method(D_METHOD("get_input_count"), &AnimationNode::get_input_count);	ClassDB::bind_method(D_METHOD("get_input_name", "input"), &AnimationNode::get_input_name);	ClassDB::bind_method(D_METHOD("add_input", "name"), &AnimationNode::add_input);	ClassDB::bind_method(D_METHOD("remove_input", "index"), &AnimationNode::remove_input);	ClassDB::bind_method(D_METHOD("set_filter_path", "path", "enable"), &AnimationNode::set_filter_path);	ClassDB::bind_method(D_METHOD("is_path_filtered", "path"), &AnimationNode::is_path_filtered);	ClassDB::bind_method(D_METHOD("set_filter_enabled", "enable"), &AnimationNode::set_filter_enabled);	ClassDB::bind_method(D_METHOD("is_filter_enabled"), &AnimationNode::is_filter_enabled);	ClassDB::bind_method(D_METHOD("_set_filters", "filters"), &AnimationNode::_set_filters);	ClassDB::bind_method(D_METHOD("_get_filters"), &AnimationNode::_get_filters);	ClassDB::bind_method(D_METHOD("blend_animation", "animation", "time", "delta", "seeked", "blend"), &AnimationNode::blend_animation);	ClassDB::bind_method(D_METHOD("blend_node", "name", "node", "time", "seek", "blend", "filter", "optimize"), &AnimationNode::blend_node, DEFVAL(FILTER_IGNORE), DEFVAL(true));	ClassDB::bind_method(D_METHOD("blend_input", "input_index", "time", "seek", "blend", "filter", "optimize"), &AnimationNode::blend_input, DEFVAL(FILTER_IGNORE), DEFVAL(true));	ClassDB::bind_method(D_METHOD("set_parameter", "name", "value"), &AnimationNode::set_parameter);	ClassDB::bind_method(D_METHOD("get_parameter", "name"), &AnimationNode::get_parameter);	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filter_enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_filter_enabled", "is_filter_enabled");	ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "filters", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_filters", "_get_filters");	BIND_VMETHOD(MethodInfo(Variant::DICTIONARY, "get_child_nodes"));	BIND_VMETHOD(MethodInfo(Variant::ARRAY, "get_parameter_list"));	BIND_VMETHOD(MethodInfo(Variant::OBJECT, "get_child_by_name", PropertyInfo(Variant::STRING, "name")));	{		MethodInfo mi = MethodInfo(Variant::NIL, "get_parameter_default_value", PropertyInfo(Variant::STRING, "name"));		mi.return_val.usage = PROPERTY_USAGE_NIL_IS_VARIANT;		BIND_VMETHOD(mi);	}	BIND_VMETHOD(MethodInfo("process", PropertyInfo(Variant::REAL, "time"), PropertyInfo(Variant::BOOL, "seek")));	BIND_VMETHOD(MethodInfo(Variant::STRING, "get_caption"));	BIND_VMETHOD(MethodInfo(Variant::STRING, "has_filter"));	ADD_SIGNAL(MethodInfo("removed_from_graph"));	ADD_SIGNAL(MethodInfo("tree_changed"));	BIND_ENUM_CONSTANT(FILTER_IGNORE);	BIND_ENUM_CONSTANT(FILTER_PASS);	BIND_ENUM_CONSTANT(FILTER_STOP);	BIND_ENUM_CONSTANT(FILTER_BLEND);}
开发者ID:Valentactive,项目名称:godot,代码行数:48,


示例12: ADD_SIGNAL

void FileDialog::_bind_methods() {		ObjectTypeDB::bind_method(_MD("_tree_selected"),&FileDialog::_tree_selected);	ObjectTypeDB::bind_method(_MD("_tree_db_selected"),&FileDialog::_tree_dc_selected);	ObjectTypeDB::bind_method(_MD("_dir_entered"),&FileDialog::_dir_entered);	ObjectTypeDB::bind_method(_MD("_file_entered"),&FileDialog::_file_entered);	ObjectTypeDB::bind_method(_MD("_action_pressed"),&FileDialog::_action_pressed);	ObjectTypeDB::bind_method(_MD("_cancel_pressed"),&FileDialog::_cancel_pressed);	ObjectTypeDB::bind_method(_MD("_filter_selected"),&FileDialog::_filter_selected);	ObjectTypeDB::bind_method(_MD("_save_confirm_pressed"),&FileDialog::_save_confirm_pressed);		ObjectTypeDB::bind_method(_MD("clear_filters"),&FileDialog::clear_filters);	ObjectTypeDB::bind_method(_MD("add_filter","filter"),&FileDialog::add_filter);	ObjectTypeDB::bind_method(_MD("get_current_dir"),&FileDialog::get_current_dir);	ObjectTypeDB::bind_method(_MD("get_current_file"),&FileDialog::get_current_file);	ObjectTypeDB::bind_method(_MD("get_current_path"),&FileDialog::get_current_path);	ObjectTypeDB::bind_method(_MD("set_current_dir","dir"),&FileDialog::set_current_dir);	ObjectTypeDB::bind_method(_MD("set_current_file","file"),&FileDialog::set_current_file);	ObjectTypeDB::bind_method(_MD("set_current_path","path"),&FileDialog::set_current_path);	ObjectTypeDB::bind_method(_MD("set_mode","mode"),&FileDialog::set_mode);	ObjectTypeDB::bind_method(_MD("get_mode"),&FileDialog::get_mode);	ObjectTypeDB::bind_method(_MD("get_vbox:VBoxContainer"),&FileDialog::get_vbox);	ObjectTypeDB::bind_method(_MD("set_access","access"),&FileDialog::set_access);	ObjectTypeDB::bind_method(_MD("get_access"),&FileDialog::get_access);	ObjectTypeDB::bind_method(_MD("set_show_hidden_files"),&FileDialog::set_show_hidden_files);	ObjectTypeDB::bind_method(_MD("is_showing_hidden_files"),&FileDialog::is_showing_hidden_files);	ObjectTypeDB::bind_method(_MD("_select_drive"),&FileDialog::_select_drive);	ObjectTypeDB::bind_method(_MD("_make_dir"),&FileDialog::_make_dir);	ObjectTypeDB::bind_method(_MD("_make_dir_confirm"),&FileDialog::_make_dir_confirm);	ObjectTypeDB::bind_method(_MD("_update_file_list"),&FileDialog::update_file_list);	ObjectTypeDB::bind_method(_MD("_update_dir"),&FileDialog::update_dir);	ObjectTypeDB::bind_method(_MD("invalidate"),&FileDialog::invalidate);	ADD_SIGNAL(MethodInfo("file_selected",PropertyInfo( Variant::STRING,"path")));	ADD_SIGNAL(MethodInfo("files_selected",PropertyInfo( Variant::STRING_ARRAY,"paths")));	ADD_SIGNAL(MethodInfo("dir_selected",PropertyInfo( Variant::STRING,"dir")));	BIND_CONSTANT( MODE_OPEN_FILE );	BIND_CONSTANT( MODE_OPEN_FILES );	BIND_CONSTANT( MODE_OPEN_DIR );	BIND_CONSTANT( MODE_SAVE_FILE );	BIND_CONSTANT( ACCESS_RESOURCES );	BIND_CONSTANT( ACCESS_USERDATA );	BIND_CONSTANT( ACCESS_FILESYSTEM );}
开发者ID:zz676,项目名称:godot,代码行数:48,


示例13: DEFVAL

void AnimatedSprite::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_sprite_frames", "sprite_frames"), &AnimatedSprite::set_sprite_frames);	ClassDB::bind_method(D_METHOD("get_sprite_frames"), &AnimatedSprite::get_sprite_frames);	ClassDB::bind_method(D_METHOD("set_animation", "animation"), &AnimatedSprite::set_animation);	ClassDB::bind_method(D_METHOD("get_animation"), &AnimatedSprite::get_animation);	ClassDB::bind_method(D_METHOD("_set_playing", "playing"), &AnimatedSprite::_set_playing);	ClassDB::bind_method(D_METHOD("_is_playing"), &AnimatedSprite::_is_playing);	ClassDB::bind_method(D_METHOD("play", "anim"), &AnimatedSprite::play, DEFVAL(StringName()));	ClassDB::bind_method(D_METHOD("stop"), &AnimatedSprite::stop);	ClassDB::bind_method(D_METHOD("is_playing"), &AnimatedSprite::is_playing);	ClassDB::bind_method(D_METHOD("set_centered", "centered"), &AnimatedSprite::set_centered);	ClassDB::bind_method(D_METHOD("is_centered"), &AnimatedSprite::is_centered);	ClassDB::bind_method(D_METHOD("set_offset", "offset"), &AnimatedSprite::set_offset);	ClassDB::bind_method(D_METHOD("get_offset"), &AnimatedSprite::get_offset);	ClassDB::bind_method(D_METHOD("set_flip_h", "flip_h"), &AnimatedSprite::set_flip_h);	ClassDB::bind_method(D_METHOD("is_flipped_h"), &AnimatedSprite::is_flipped_h);	ClassDB::bind_method(D_METHOD("set_flip_v", "flip_v"), &AnimatedSprite::set_flip_v);	ClassDB::bind_method(D_METHOD("is_flipped_v"), &AnimatedSprite::is_flipped_v);	ClassDB::bind_method(D_METHOD("set_frame", "frame"), &AnimatedSprite::set_frame);	ClassDB::bind_method(D_METHOD("get_frame"), &AnimatedSprite::get_frame);	ClassDB::bind_method(D_METHOD("set_speed_scale", "speed_scale"), &AnimatedSprite::set_speed_scale);	ClassDB::bind_method(D_METHOD("get_speed_scale"), &AnimatedSprite::get_speed_scale);	ClassDB::bind_method(D_METHOD("_res_changed"), &AnimatedSprite::_res_changed);	ADD_SIGNAL(MethodInfo("frame_changed"));	ADD_SIGNAL(MethodInfo("animation_finished"));	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");	ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation");	ADD_PROPERTY(PropertyInfo(Variant::INT, "frame", PROPERTY_HINT_SPRITE_FRAME), "set_frame", "get_frame");	ADD_PROPERTY(PropertyInfo(Variant::REAL, "speed_scale"), "set_speed_scale", "get_speed_scale");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v");}
开发者ID:UgisBrekis,项目名称:godot,代码行数:48,


示例14: DEFVAL

void AnimatedSprite3D::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_sprite_frames", "sprite_frames"), &AnimatedSprite3D::set_sprite_frames);	ClassDB::bind_method(D_METHOD("get_sprite_frames"), &AnimatedSprite3D::get_sprite_frames);	ClassDB::bind_method(D_METHOD("set_animation", "animation"), &AnimatedSprite3D::set_animation);	ClassDB::bind_method(D_METHOD("get_animation"), &AnimatedSprite3D::get_animation);	ClassDB::bind_method(D_METHOD("_set_playing", "playing"), &AnimatedSprite3D::_set_playing);	ClassDB::bind_method(D_METHOD("_is_playing"), &AnimatedSprite3D::_is_playing);	ClassDB::bind_method(D_METHOD("play", "anim"), &AnimatedSprite3D::play, DEFVAL(StringName()));	ClassDB::bind_method(D_METHOD("stop"), &AnimatedSprite3D::stop);	ClassDB::bind_method(D_METHOD("is_playing"), &AnimatedSprite3D::is_playing);	ClassDB::bind_method(D_METHOD("set_frame", "frame"), &AnimatedSprite3D::set_frame);	ClassDB::bind_method(D_METHOD("get_frame"), &AnimatedSprite3D::get_frame);	ClassDB::bind_method(D_METHOD("_res_changed"), &AnimatedSprite3D::_res_changed);	ADD_SIGNAL(MethodInfo("frame_changed"));	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE, "SpriteFrames"), "set_sprite_frames", "get_sprite_frames");	ADD_PROPERTY(PropertyInfo(Variant::STRING, "animation"), "set_animation", "get_animation");	ADD_PROPERTY(PropertyInfo(Variant::INT, "frame", PROPERTY_HINT_SPRITE_FRAME), "set_frame", "get_frame");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");}
开发者ID:SaracenOne,项目名称:godot,代码行数:27,


示例15: ADD_SIGNAL

void EditorImportAnimationOptions::_bind_methods() {	ObjectTypeDB::bind_method("_changed",&EditorImportAnimationOptions::_changed);//	ObjectTypeDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp);	ADD_SIGNAL(MethodInfo("changed"));}
开发者ID:9cat,项目名称:godot,代码行数:7,


示例16: ADD_SIGNAL

void SceneTreeDialog::_bind_methods() {	ObjectTypeDB::bind_method("_select",&SceneTreeDialog::_select);	ObjectTypeDB::bind_method("_cancel",&SceneTreeDialog::_cancel);	ADD_SIGNAL( MethodInfo("selected",PropertyInfo(Variant::NODE_PATH,"path")));}
开发者ID:WalasPrime,项目名称:godot,代码行数:7,


示例17: ADD_SIGNAL

void EditorLog::_bind_methods() {	ClassDB::bind_method(D_METHOD("_clear_request"), &EditorLog::_clear_request);	ClassDB::bind_method("_override_logger_styles", &EditorLog::_override_logger_styles);	//ClassDB::bind_method(D_METHOD("_dragged"),&EditorLog::_dragged );	ADD_SIGNAL(MethodInfo("clear_request"));}
开发者ID:MattUV,项目名称:godot,代码行数:7,


示例18: ADD_SIGNAL

void EditorLog::_bind_methods() {	ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );	//ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );	ADD_SIGNAL( MethodInfo("clear_request"));}
开发者ID:AutonomicStudios,项目名称:godot,代码行数:7,


示例19: ADD_SIGNAL

void Timer::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_wait_time", "time_sec"), &Timer::set_wait_time);	ClassDB::bind_method(D_METHOD("get_wait_time"), &Timer::get_wait_time);	ClassDB::bind_method(D_METHOD("set_one_shot", "enable"), &Timer::set_one_shot);	ClassDB::bind_method(D_METHOD("is_one_shot"), &Timer::is_one_shot);	ClassDB::bind_method(D_METHOD("set_autostart", "enable"), &Timer::set_autostart);	ClassDB::bind_method(D_METHOD("has_autostart"), &Timer::has_autostart);	ClassDB::bind_method(D_METHOD("start"), &Timer::start);	ClassDB::bind_method(D_METHOD("stop"), &Timer::stop);	ClassDB::bind_method(D_METHOD("set_paused", "paused"), &Timer::set_paused);	ClassDB::bind_method(D_METHOD("is_paused"), &Timer::is_paused);	ClassDB::bind_method(D_METHOD("is_stopped"), &Timer::is_stopped);	ClassDB::bind_method(D_METHOD("get_time_left"), &Timer::get_time_left);	ClassDB::bind_method(D_METHOD("set_timer_process_mode", "mode"), &Timer::set_timer_process_mode);	ClassDB::bind_method(D_METHOD("get_timer_process_mode"), &Timer::get_timer_process_mode);	ADD_SIGNAL(MethodInfo("timeout"));	ADD_PROPERTY(PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_timer_process_mode", "get_timer_process_mode");	ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.01,4096,0.01"), "set_wait_time", "get_wait_time");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");	BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS);	BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);}
开发者ID:KelinciFX,项目名称:godot,代码行数:34,


示例20: DEFVAL

void InspectorDock::_bind_methods() {	ClassDB::bind_method("_menu_option", &InspectorDock::_menu_option);	ClassDB::bind_method("update_keying", &InspectorDock::update_keying);	ClassDB::bind_method("_property_keyed", &InspectorDock::_property_keyed);	ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed);	ClassDB::bind_method("_new_resource", &InspectorDock::_new_resource);	ClassDB::bind_method("_resource_file_selected", &InspectorDock::_resource_file_selected);	ClassDB::bind_method("_open_resource_selector", &InspectorDock::_open_resource_selector);	ClassDB::bind_method("_unref_resource", &InspectorDock::_unref_resource);	ClassDB::bind_method("_paste_resource", &InspectorDock::_paste_resource);	ClassDB::bind_method("_copy_resource", &InspectorDock::_copy_resource);	ClassDB::bind_method("_select_history", &InspectorDock::_select_history);	ClassDB::bind_method("_prepare_history", &InspectorDock::_prepare_history);	ClassDB::bind_method("_resource_created", &InspectorDock::_resource_created);	ClassDB::bind_method("_resource_selected", &InspectorDock::_resource_selected, DEFVAL(""));	ClassDB::bind_method("_menu_collapseall", &InspectorDock::_menu_collapseall);	ClassDB::bind_method("_menu_expandall", &InspectorDock::_menu_expandall);	ClassDB::bind_method("_warning_pressed", &InspectorDock::_warning_pressed);	ClassDB::bind_method("_edit_forward", &InspectorDock::_edit_forward);	ClassDB::bind_method("_edit_back", &InspectorDock::_edit_back);	ADD_SIGNAL(MethodInfo("request_help"));}
开发者ID:RandomShaper,项目名称:godot,代码行数:26,


示例21: ADD_SIGNAL

void Timer::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_wait_time","time_sec"),&Timer::set_wait_time);	ObjectTypeDB::bind_method(_MD("get_wait_time"),&Timer::get_wait_time);	ObjectTypeDB::bind_method(_MD("set_one_shot","enable"),&Timer::set_one_shot);	ObjectTypeDB::bind_method(_MD("is_one_shot"),&Timer::is_one_shot);	ObjectTypeDB::bind_method(_MD("set_autostart","enable"),&Timer::set_autostart);	ObjectTypeDB::bind_method(_MD("has_autostart"),&Timer::has_autostart);	ObjectTypeDB::bind_method(_MD("start"),&Timer::start);	ObjectTypeDB::bind_method(_MD("stop"),&Timer::stop);	ObjectTypeDB::bind_method(_MD("get_time_left"),&Timer::get_time_left);	ObjectTypeDB::bind_method(_MD("set_timer_process_mode", "mode"), &Timer::set_timer_process_mode);	ObjectTypeDB::bind_method(_MD("get_timer_process_mode"), &Timer::get_timer_process_mode);	ADD_SIGNAL( MethodInfo("timeout") );	ADD_PROPERTY( PropertyInfo(Variant::INT, "process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_timer_process_mode"), _SCS("get_timer_process_mode") );	ADD_PROPERTY( PropertyInfo(Variant::REAL, "wait_time", PROPERTY_HINT_EXP_RANGE, "0.01,4096,0.01" ), _SCS("set_wait_time"), _SCS("get_wait_time") );	ADD_PROPERTY( PropertyInfo(Variant::BOOL, "one_shot" ), _SCS("set_one_shot"), _SCS("is_one_shot") );	ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autostart" ), _SCS("set_autostart"), _SCS("has_autostart") );	BIND_CONSTANT( TIMER_PROCESS_FIXED );	BIND_CONSTANT( TIMER_PROCESS_IDLE );}
开发者ID:AwsomeGameEngine,项目名称:godot,代码行数:30,


示例22: DEFVAL

void Input::_bind_methods() {	ObjectTypeDB::bind_method(_MD("is_key_pressed","scancode"),&Input::is_key_pressed);	ObjectTypeDB::bind_method(_MD("is_mouse_button_pressed","button"),&Input::is_mouse_button_pressed);	ObjectTypeDB::bind_method(_MD("is_joy_button_pressed","device","button"),&Input::is_joy_button_pressed);	ObjectTypeDB::bind_method(_MD("is_action_pressed","action"),&Input::is_action_pressed);	ObjectTypeDB::bind_method(_MD("add_joy_mapping","mapping", "update_existing"),&Input::add_joy_mapping, DEFVAL(false));	ObjectTypeDB::bind_method(_MD("remove_joy_mapping","guid"),&Input::remove_joy_mapping);	ObjectTypeDB::bind_method(_MD("is_joy_known","device"),&Input::is_joy_known);	ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis);	ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name);	ObjectTypeDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid);	ObjectTypeDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks);	ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength);	ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration);	ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));	ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);	ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer);	ObjectTypeDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer);	//ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want	ObjectTypeDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed);	ObjectTypeDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask);	ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode);	ObjectTypeDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode);	ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos);	ObjectTypeDB::bind_method(_MD("action_press","action"),&Input::action_press);	ObjectTypeDB::bind_method(_MD("action_release","action"),&Input::action_release);	ObjectTypeDB::bind_method(_MD("set_custom_mouse_cursor","image:Texture","hotspot"),&Input::set_custom_mouse_cursor,DEFVAL(Vector2()));	BIND_CONSTANT( MOUSE_MODE_VISIBLE );	BIND_CONSTANT( MOUSE_MODE_HIDDEN );	BIND_CONSTANT( MOUSE_MODE_CAPTURED );	ADD_SIGNAL( MethodInfo("joy_connection_changed", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "connected")) );}
开发者ID:Censacrof,项目名称:godot,代码行数:35,


示例23: BIND_CONSTANT

void ButtonArray::_bind_methods() {    ObjectTypeDB::bind_method(_MD("add_button","text","tooltip"),&ButtonArray::add_button,DEFVAL(""));    ObjectTypeDB::bind_method(_MD("add_icon_button","icon:Texture","text","tooltip"),&ButtonArray::add_icon_button,DEFVAL(""),DEFVAL(""));    ObjectTypeDB::bind_method(_MD("set_button_text","button_idx","text"),&ButtonArray::set_button_text);    ObjectTypeDB::bind_method(_MD("set_button_tooltip","button_idx","text"),&ButtonArray::set_button_tooltip);    ObjectTypeDB::bind_method(_MD("set_button_icon","button_idx","icon:Texture"),&ButtonArray::set_button_icon);    ObjectTypeDB::bind_method(_MD("get_button_text","button_idx"),&ButtonArray::get_button_text);    ObjectTypeDB::bind_method(_MD("get_button_tooltip","button_idx"),&ButtonArray::get_button_tooltip);    ObjectTypeDB::bind_method(_MD("get_button_icon:Texture","button_idx"),&ButtonArray::get_button_icon);    ObjectTypeDB::bind_method(_MD("get_button_count"),&ButtonArray::get_button_count);    ObjectTypeDB::bind_method(_MD("set_flat","enabled"),&ButtonArray::set_flat);    ObjectTypeDB::bind_method(_MD("is_flat"),&ButtonArray::is_flat);    ObjectTypeDB::bind_method(_MD("get_selected"),&ButtonArray::get_selected);    ObjectTypeDB::bind_method(_MD("get_hovered"),&ButtonArray::get_hovered);    ObjectTypeDB::bind_method(_MD("set_selected","button_idx"),&ButtonArray::set_selected);    ObjectTypeDB::bind_method(_MD("erase_button","button_idx"),&ButtonArray::erase_button);    ObjectTypeDB::bind_method(_MD("clear"),&ButtonArray::clear);    ObjectTypeDB::bind_method(_MD("_input_event"),&ButtonArray::_input_event);    BIND_CONSTANT( ALIGN_BEGIN );    BIND_CONSTANT( ALIGN_CENTER );    BIND_CONSTANT( ALIGN_END );    BIND_CONSTANT( ALIGN_FILL );    BIND_CONSTANT( ALIGN_EXPAND_FILL );    ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flat" ), _SCS("set_flat"),_SCS("is_flat") );    ADD_SIGNAL( MethodInfo("button_selected",PropertyInfo(Variant::INT,"button_idx")));}
开发者ID:jay3d,项目名称:godot,代码行数:32,


示例24: DEFVAL

void OptionButton::_bind_methods() {	ClassDB::bind_method(D_METHOD("_selected"), &OptionButton::_selected);	ClassDB::bind_method(D_METHOD("add_item", "label", "id"), &OptionButton::add_item, DEFVAL(-1));	ClassDB::bind_method(D_METHOD("add_icon_item", "texture:Texture", "label", "id"), &OptionButton::add_icon_item);	ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &OptionButton::set_item_text);	ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "texture:Texture"), &OptionButton::set_item_icon);	ClassDB::bind_method(D_METHOD("set_item_disabled", "idx", "disabled"), &OptionButton::set_item_disabled);	ClassDB::bind_method(D_METHOD("set_item_ID", "idx", "id"), &OptionButton::set_item_ID);	ClassDB::bind_method(D_METHOD("set_item_metadata", "idx", "metadata"), &OptionButton::set_item_metadata);	ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &OptionButton::get_item_text);	ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &OptionButton::get_item_icon);	ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &OptionButton::get_item_ID);	ClassDB::bind_method(D_METHOD("get_item_metadata", "idx"), &OptionButton::get_item_metadata);	ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &OptionButton::is_item_disabled);	ClassDB::bind_method(D_METHOD("get_item_count"), &OptionButton::get_item_count);	ClassDB::bind_method(D_METHOD("add_separator"), &OptionButton::add_separator);	ClassDB::bind_method(D_METHOD("clear"), &OptionButton::clear);	ClassDB::bind_method(D_METHOD("select", "idx"), &OptionButton::select);	ClassDB::bind_method(D_METHOD("get_selected"), &OptionButton::get_selected);	ClassDB::bind_method(D_METHOD("get_selected_ID"), &OptionButton::get_selected_ID);	ClassDB::bind_method(D_METHOD("get_selected_metadata"), &OptionButton::get_selected_metadata);	ClassDB::bind_method(D_METHOD("remove_item", "idx"), &OptionButton::remove_item);	ClassDB::bind_method(D_METHOD("_select_int"), &OptionButton::_select_int);	ClassDB::bind_method(D_METHOD("_set_items"), &OptionButton::_set_items);	ClassDB::bind_method(D_METHOD("_get_items"), &OptionButton::_get_items);	ADD_PROPERTY(PropertyInfo(Variant::INT, "selected"), "_select_int", "get_selected");	ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "items", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_items", "_get_items");	ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "ID")));}
开发者ID:MattUV,项目名称:godot,代码行数:33,


示例25: ADD_SIGNAL

void ReparentDialog::_bind_methods() {	ClassDB::bind_method("_reparent",&ReparentDialog::_reparent);	ClassDB::bind_method("_cancel",&ReparentDialog::_cancel);	ADD_SIGNAL( MethodInfo("reparent",PropertyInfo(Variant::NODE_PATH,"path"),PropertyInfo(Variant::BOOL,"keep_global_xform")));}
开发者ID:lonesurvivor,项目名称:godot,代码行数:7,


示例26: ADD_SIGNAL

void NinePatchRect::_bind_methods() {	ClassDB::bind_method(_MD("set_texture","texture"), & NinePatchRect::set_texture );	ClassDB::bind_method(_MD("get_texture"), & NinePatchRect::get_texture );	ClassDB::bind_method(_MD("set_patch_margin","margin","value"), & NinePatchRect::set_patch_margin );	ClassDB::bind_method(_MD("get_patch_margin","margin"), & NinePatchRect::get_patch_margin );	ClassDB::bind_method(_MD("set_region_rect","rect"),&NinePatchRect::set_region_rect);	ClassDB::bind_method(_MD("get_region_rect"),&NinePatchRect::get_region_rect);	ClassDB::bind_method(_MD("set_draw_center","draw_center"), & NinePatchRect::set_draw_center );	ClassDB::bind_method(_MD("get_draw_center"), & NinePatchRect::get_draw_center );	ADD_SIGNAL(MethodInfo("texture_changed"));	ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") );	ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "draw_center"), _SCS("set_draw_center"),_SCS("get_draw_center") );	ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));	ADD_GROUP("Patch Margin","patch_margin_");	ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_left",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_LEFT );	ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_top",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_TOP );	ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_right",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_RIGHT );	ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin_bottom",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_BOTTOM );}
开发者ID:baekdahl,项目名称:godot,代码行数:25,


示例27: ADD_PROPERTY

void Sprite3D::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&Sprite3D::set_texture);	ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&Sprite3D::get_texture);	ObjectTypeDB::bind_method(_MD("set_region","enabled"),&Sprite3D::set_region);	ObjectTypeDB::bind_method(_MD("is_region"),&Sprite3D::is_region);	ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Sprite3D::set_region_rect);	ObjectTypeDB::bind_method(_MD("get_region_rect"),&Sprite3D::get_region_rect);	ObjectTypeDB::bind_method(_MD("set_frame","frame"),&Sprite3D::set_frame);	ObjectTypeDB::bind_method(_MD("get_frame"),&Sprite3D::get_frame);	ObjectTypeDB::bind_method(_MD("set_vframes","vframes"),&Sprite3D::set_vframes);	ObjectTypeDB::bind_method(_MD("get_vframes"),&Sprite3D::get_vframes);	ObjectTypeDB::bind_method(_MD("set_hframes","hframes"),&Sprite3D::set_hframes);	ObjectTypeDB::bind_method(_MD("get_hframes"),&Sprite3D::get_hframes);	ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture"));	ADD_PROPERTY( PropertyInfo( Variant::INT, "vframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_vframes"),_SCS("get_vframes"));	ADD_PROPERTY( PropertyInfo( Variant::INT, "hframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_hframes"),_SCS("get_hframes"));	ADD_PROPERTY( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame"));	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "region"), _SCS("set_region"),_SCS("is_region"));	ADD_PROPERTY( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));	ADD_SIGNAL(MethodInfo("frame_changed"));}
开发者ID:AutonomicStudios,项目名称:godot,代码行数:30,


示例28: ADD_PROPERTY

void Sprite3D::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_texture", "texture"), &Sprite3D::set_texture);	ClassDB::bind_method(D_METHOD("get_texture"), &Sprite3D::get_texture);	ClassDB::bind_method(D_METHOD("set_region", "enabled"), &Sprite3D::set_region);	ClassDB::bind_method(D_METHOD("is_region"), &Sprite3D::is_region);	ClassDB::bind_method(D_METHOD("set_region_rect", "rect"), &Sprite3D::set_region_rect);	ClassDB::bind_method(D_METHOD("get_region_rect"), &Sprite3D::get_region_rect);	ClassDB::bind_method(D_METHOD("set_frame", "frame"), &Sprite3D::set_frame);	ClassDB::bind_method(D_METHOD("get_frame"), &Sprite3D::get_frame);	ClassDB::bind_method(D_METHOD("set_vframes", "vframes"), &Sprite3D::set_vframes);	ClassDB::bind_method(D_METHOD("get_vframes"), &Sprite3D::get_vframes);	ClassDB::bind_method(D_METHOD("set_hframes", "hframes"), &Sprite3D::set_hframes);	ClassDB::bind_method(D_METHOD("get_hframes"), &Sprite3D::get_hframes);	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture");	ADD_GROUP("Animation", "");	ADD_PROPERTY(PropertyInfo(Variant::INT, "vframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_vframes", "get_vframes");	ADD_PROPERTY(PropertyInfo(Variant::INT, "hframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_hframes", "get_hframes");	ADD_PROPERTY(PropertyInfo(Variant::INT, "frame", PROPERTY_HINT_SPRITE_FRAME), "set_frame", "get_frame");	ADD_GROUP("Region", "region_");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "region_enabled"), "set_region", "is_region");	ADD_PROPERTY(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect");	ADD_SIGNAL(MethodInfo("frame_changed"));}
开发者ID:SaracenOne,项目名称:godot,代码行数:31,


示例29: ADD_SIGNAL

void ColorPickerButton::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_pick_color", "color"), &ColorPickerButton::set_pick_color);	ClassDB::bind_method(D_METHOD("get_pick_color"), &ColorPickerButton::get_pick_color);	ClassDB::bind_method(D_METHOD("get_picker"), &ColorPickerButton::get_picker);	ClassDB::bind_method(D_METHOD("get_popup"), &ColorPickerButton::get_popup);	ClassDB::bind_method(D_METHOD("set_edit_alpha", "show"), &ColorPickerButton::set_edit_alpha);	ClassDB::bind_method(D_METHOD("is_editing_alpha"), &ColorPickerButton::is_editing_alpha);	ClassDB::bind_method(D_METHOD("_color_changed"), &ColorPickerButton::_color_changed);	ClassDB::bind_method(D_METHOD("_modal_closed"), &ColorPickerButton::_modal_closed);	ADD_SIGNAL(MethodInfo("color_changed", PropertyInfo(Variant::COLOR, "color")));	ADD_SIGNAL(MethodInfo("popup_closed"));	ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_pick_color", "get_pick_color");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "edit_alpha"), "set_edit_alpha", "is_editing_alpha");}
开发者ID:ialex32x,项目名称:godot,代码行数:16,


示例30: BIND_CONSTANT

void ButtonArray::_bind_methods() {	ObjectTypeDB::bind_method(_MD("add_button","text"),&ButtonArray::add_button);	ObjectTypeDB::bind_method(_MD("add_icon_button","icon","text"),&ButtonArray::add_icon_button,DEFVAL(""));	ObjectTypeDB::bind_method(_MD("set_button_text","button","text"),&ButtonArray::set_button_text);	ObjectTypeDB::bind_method(_MD("set_button_icon","button","icon"),&ButtonArray::set_button_icon);	ObjectTypeDB::bind_method(_MD("get_button_text","button"),&ButtonArray::get_button_text);	ObjectTypeDB::bind_method(_MD("get_button_icon","button"),&ButtonArray::get_button_icon);	ObjectTypeDB::bind_method(_MD("get_button_count"),&ButtonArray::get_button_count);	ObjectTypeDB::bind_method(_MD("get_selected"),&ButtonArray::get_selected);	ObjectTypeDB::bind_method(_MD("get_hovered"),&ButtonArray::get_hovered);	ObjectTypeDB::bind_method(_MD("set_selected","button"),&ButtonArray::set_selected);	ObjectTypeDB::bind_method(_MD("erase_button","button"),&ButtonArray::erase_button);	ObjectTypeDB::bind_method(_MD("clear"),&ButtonArray::clear);	ObjectTypeDB::bind_method(_MD("_input_event"),&ButtonArray::_input_event);	BIND_CONSTANT( ALIGN_BEGIN );	BIND_CONSTANT( ALIGN_CENTER );	BIND_CONSTANT( ALIGN_END );	BIND_CONSTANT( ALIGN_FILL );	BIND_CONSTANT( ALIGN_EXPAND_FILL );	ADD_SIGNAL( MethodInfo("button_selected",PropertyInfo(Variant::INT,"button")));}
开发者ID:BradWBeer,项目名称:godot,代码行数:26,



注:本文中的ADD_SIGNAL函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ADD_STRING函数代码示例
C++ ADD_PROPERTYNZ函数代码示例
51自学网自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1