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

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

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

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

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

示例1: 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_PROPERTYNZ(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_PROPERTYNZ(PropertyInfo(Variant::INT, "frame", PROPERTY_HINT_SPRITE_FRAME), "set_frame", "get_frame");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "playing"), "_set_playing", "_is_playing");}
开发者ID:93i,项目名称:godot,代码行数:27,


示例2: ADD_SIGNAL

void Patch9Frame::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_texture","texture"), & Patch9Frame::set_texture );	ObjectTypeDB::bind_method(_MD("get_texture"), & Patch9Frame::get_texture );	ObjectTypeDB::bind_method(_MD("set_modulate","modulate"), & Patch9Frame::set_modulate );	ObjectTypeDB::bind_method(_MD("get_modulate"), & Patch9Frame::get_modulate );	ObjectTypeDB::bind_method(_MD("set_patch_margin","margin","value"), & Patch9Frame::set_patch_margin );	ObjectTypeDB::bind_method(_MD("get_patch_margin","margin"), & Patch9Frame::get_patch_margin );	ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Patch9Frame::set_region_rect);	ObjectTypeDB::bind_method(_MD("get_region_rect"),&Patch9Frame::get_region_rect);	ObjectTypeDB::bind_method(_MD("set_draw_center","draw_center"), & Patch9Frame::set_draw_center );	ObjectTypeDB::bind_method(_MD("get_draw_center"), & Patch9Frame::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::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate") );	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_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:03050903,项目名称:godot,代码行数:26,


示例3: DEFVAL

void SpriteFrames::_bind_methods() {	ClassDB::bind_method(D_METHOD("add_animation", "anim"), &SpriteFrames::add_animation);	ClassDB::bind_method(D_METHOD("has_animation", "anim"), &SpriteFrames::has_animation);	ClassDB::bind_method(D_METHOD("remove_animation", "anim"), &SpriteFrames::remove_animation);	ClassDB::bind_method(D_METHOD("rename_animation", "anim", "newname"), &SpriteFrames::rename_animation);	ClassDB::bind_method(D_METHOD("get_animation_names"), &SpriteFrames::get_animation_names);	ClassDB::bind_method(D_METHOD("set_animation_speed", "anim", "speed"), &SpriteFrames::set_animation_speed);	ClassDB::bind_method(D_METHOD("get_animation_speed", "anim"), &SpriteFrames::get_animation_speed);	ClassDB::bind_method(D_METHOD("set_animation_loop", "anim", "loop"), &SpriteFrames::set_animation_loop);	ClassDB::bind_method(D_METHOD("get_animation_loop", "anim"), &SpriteFrames::get_animation_loop);	ClassDB::bind_method(D_METHOD("add_frame", "anim", "frame", "at_position"), &SpriteFrames::add_frame, DEFVAL(-1));	ClassDB::bind_method(D_METHOD("get_frame_count", "anim"), &SpriteFrames::get_frame_count);	ClassDB::bind_method(D_METHOD("get_frame", "anim", "idx"), &SpriteFrames::get_frame);	ClassDB::bind_method(D_METHOD("set_frame", "anim", "idx", "txt"), &SpriteFrames::set_frame);	ClassDB::bind_method(D_METHOD("remove_frame", "anim", "idx"), &SpriteFrames::remove_frame);	ClassDB::bind_method(D_METHOD("clear", "anim"), &SpriteFrames::clear);	ClassDB::bind_method(D_METHOD("clear_all"), &SpriteFrames::clear_all);	ClassDB::bind_method(D_METHOD("_set_frames"), &SpriteFrames::_set_frames);	ClassDB::bind_method(D_METHOD("_get_frames"), &SpriteFrames::_get_frames);	ADD_PROPERTYNZ(PropertyInfo(Variant::ARRAY, "frames", PROPERTY_HINT_NONE, "", 0), "_set_frames", "_get_frames"); //compatibility	ClassDB::bind_method(D_METHOD("_set_animations"), &SpriteFrames::_set_animations);	ClassDB::bind_method(D_METHOD("_get_animations"), &SpriteFrames::_get_animations);	ADD_PROPERTYNZ(PropertyInfo(Variant::ARRAY, "animations", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_animations", "_get_animations"); //compatibility}
开发者ID:ippan,项目名称:godot,代码行数:33,


示例4: ADD_PROPERTYNZ

void AnimatedSprite::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite::set_sprite_frames);	ObjectTypeDB::bind_method(_MD("get_sprite_frames:SpriteFrames"),&AnimatedSprite::get_sprite_frames);	ObjectTypeDB::bind_method(_MD("set_centered","centered"),&AnimatedSprite::set_centered);	ObjectTypeDB::bind_method(_MD("is_centered"),&AnimatedSprite::is_centered);	ObjectTypeDB::bind_method(_MD("set_offset","offset"),&AnimatedSprite::set_offset);	ObjectTypeDB::bind_method(_MD("get_offset"),&AnimatedSprite::get_offset);	ObjectTypeDB::bind_method(_MD("set_flip_h","flip_h"),&AnimatedSprite::set_flip_h);	ObjectTypeDB::bind_method(_MD("is_flipped_h"),&AnimatedSprite::is_flipped_h);	ObjectTypeDB::bind_method(_MD("set_flip_v","flip_v"),&AnimatedSprite::set_flip_v);	ObjectTypeDB::bind_method(_MD("is_flipped_v"),&AnimatedSprite::is_flipped_v);	ObjectTypeDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite::set_frame);	ObjectTypeDB::bind_method(_MD("get_frame"),&AnimatedSprite::get_frame);	ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&AnimatedSprite::set_modulate);	ObjectTypeDB::bind_method(_MD("get_modulate"),&AnimatedSprite::get_modulate);	ObjectTypeDB::bind_method(_MD("_res_changed"),&AnimatedSprite::_res_changed);	ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "frames",PROPERTY_HINT_RESOURCE_TYPE,"SpriteFrames"), _SCS("set_sprite_frames"),_SCS("get_sprite_frames"));	ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "frame"), _SCS("set_frame"),_SCS("get_frame"));	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered"));	ADD_PROPERTYNZ( PropertyInfo( Variant::VECTOR2, "offset"), _SCS("set_offset"),_SCS("get_offset"));	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flip_h"), _SCS("set_flip_h"),_SCS("is_flipped_h"));	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flip_v"), _SCS("set_flip_v"),_SCS("is_flipped_v"));	ADD_PROPERTY( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate"));}
开发者ID:0871087123,项目名称:godot,代码行数:35,


示例5: ADD_PROPERTYNZ

void SpriteFrames::_bind_methods() {	ObjectTypeDB::bind_method(_MD("add_animation","anim"),&SpriteFrames::add_animation);	ObjectTypeDB::bind_method(_MD("has_animation","anim"),&SpriteFrames::has_animation);	ObjectTypeDB::bind_method(_MD("remove_animation","anim"),&SpriteFrames::remove_animation);	ObjectTypeDB::bind_method(_MD("rename_animation","anim","newname"),&SpriteFrames::rename_animation);	ObjectTypeDB::bind_method(_MD("set_animation_speed","anim","speed"),&SpriteFrames::set_animation_speed);	ObjectTypeDB::bind_method(_MD("get_animation_speed","anim"),&SpriteFrames::get_animation_speed);	ObjectTypeDB::bind_method(_MD("set_animation_loop","anim","loop"),&SpriteFrames::set_animation_loop);	ObjectTypeDB::bind_method(_MD("get_animation_loop","anim"),&SpriteFrames::get_animation_loop);	ObjectTypeDB::bind_method(_MD("add_frame","frame","atpos"),&SpriteFrames::add_frame,DEFVAL(-1));	ObjectTypeDB::bind_method(_MD("add_frame","anim","frame","atpos"),&SpriteFrames::add_frame,DEFVAL(-1));	ObjectTypeDB::bind_method(_MD("get_frame_count","anim"),&SpriteFrames::get_frame_count);	ObjectTypeDB::bind_method(_MD("get_frame","anim","idx"),&SpriteFrames::get_frame);	ObjectTypeDB::bind_method(_MD("set_frame","anim","idx","txt"),&SpriteFrames::set_frame);	ObjectTypeDB::bind_method(_MD("remove_frame","anim","idx"),&SpriteFrames::remove_frame);	ObjectTypeDB::bind_method(_MD("clear","anim"),&SpriteFrames::clear);	ObjectTypeDB::bind_method(_MD("clear_all"),&SpriteFrames::clear_all);	ObjectTypeDB::bind_method(_MD("_set_frames"),&SpriteFrames::_set_frames);	ObjectTypeDB::bind_method(_MD("_get_frames"),&SpriteFrames::_get_frames);	ADD_PROPERTYNZ( PropertyInfo(Variant::ARRAY,"frames",PROPERTY_HINT_NONE,"",0),_SCS("_set_frames"),_SCS("_get_frames")); //compatibility	ObjectTypeDB::bind_method(_MD("_set_animations"),&SpriteFrames::_set_animations);	ObjectTypeDB::bind_method(_MD("_get_animations"),&SpriteFrames::_get_animations);	ADD_PROPERTYNZ( PropertyInfo(Variant::ARRAY,"animations",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_animations"),_SCS("_get_animations")); //compatibility}
开发者ID:AutonomicStudios,项目名称:godot,代码行数:35,


示例6: ADD_PROPERTYNZ

void NativeScript::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_class_name", "class_name"), &NativeScript::set_class_name);	ClassDB::bind_method(D_METHOD("get_class_name"), &NativeScript::get_class_name);	ClassDB::bind_method(D_METHOD("set_library", "library"), &NativeScript::set_library);	ClassDB::bind_method(D_METHOD("get_library"), &NativeScript::get_library);	ClassDB::bind_method(D_METHOD("set_script_class_name", "class_name"), &NativeScript::set_script_class_name);	ClassDB::bind_method(D_METHOD("get_script_class_name"), &NativeScript::get_script_class_name);	ClassDB::bind_method(D_METHOD("set_script_class_icon_path", "icon_path"), &NativeScript::set_script_class_icon_path);	ClassDB::bind_method(D_METHOD("get_script_class_icon_path"), &NativeScript::get_script_class_icon_path);	ClassDB::bind_method(D_METHOD("get_class_documentation"), &NativeScript::get_class_documentation);	ClassDB::bind_method(D_METHOD("get_method_documentation", "method"), &NativeScript::get_method_documentation);	ClassDB::bind_method(D_METHOD("get_signal_documentation", "signal_name"), &NativeScript::get_signal_documentation);	ClassDB::bind_method(D_METHOD("get_property_documentation", "path"), &NativeScript::get_property_documentation);	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "class_name"), "set_class_name", "get_class_name");	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "GDNativeLibrary"), "set_library", "get_library");	ADD_GROUP("Script Class", "script_class_");	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "script_class_name"), "set_script_class_name", "get_script_class_name");	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "script_class_icon_path", PROPERTY_HINT_FILE), "set_script_class_icon_path", "get_script_class_icon_path");	ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &NativeScript::_new, MethodInfo(Variant::OBJECT, "new"));}
开发者ID:93i,项目名称:godot,代码行数:25,


示例7: ADD_SIGNAL

void NinePatchRect::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_texture", "texture"), &NinePatchRect::set_texture);	ClassDB::bind_method(D_METHOD("get_texture"), &NinePatchRect::get_texture);	ClassDB::bind_method(D_METHOD("set_patch_margin", "margin", "value"), &NinePatchRect::set_patch_margin);	ClassDB::bind_method(D_METHOD("get_patch_margin", "margin"), &NinePatchRect::get_patch_margin);	ClassDB::bind_method(D_METHOD("set_region_rect", "rect"), &NinePatchRect::set_region_rect);	ClassDB::bind_method(D_METHOD("get_region_rect"), &NinePatchRect::get_region_rect);	ClassDB::bind_method(D_METHOD("set_draw_center", "draw_center"), &NinePatchRect::set_draw_center);	ClassDB::bind_method(D_METHOD("is_draw_center_enabled"), &NinePatchRect::is_draw_center_enabled);	ClassDB::bind_method(D_METHOD("set_h_axis_stretch_mode", "mode"), &NinePatchRect::set_h_axis_stretch_mode);	ClassDB::bind_method(D_METHOD("get_h_axis_stretch_mode"), &NinePatchRect::get_h_axis_stretch_mode);	ClassDB::bind_method(D_METHOD("set_v_axis_stretch_mode", "mode"), &NinePatchRect::set_v_axis_stretch_mode);	ClassDB::bind_method(D_METHOD("get_v_axis_stretch_mode"), &NinePatchRect::get_v_axis_stretch_mode);	ADD_SIGNAL(MethodInfo("texture_changed"));	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture");	ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "is_draw_center_enabled");	ADD_PROPERTYNZ(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect");	ADD_GROUP("Patch Margin", "patch_margin_");	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "patch_margin_left", PROPERTY_HINT_RANGE, "0,16384,1"), "set_patch_margin", "get_patch_margin", MARGIN_LEFT);	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "patch_margin_top", PROPERTY_HINT_RANGE, "0,16384,1"), "set_patch_margin", "get_patch_margin", MARGIN_TOP);	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "patch_margin_right", PROPERTY_HINT_RANGE, "0,16384,1"), "set_patch_margin", "get_patch_margin", MARGIN_RIGHT);	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "patch_margin_bottom", PROPERTY_HINT_RANGE, "0,16384,1"), "set_patch_margin", "get_patch_margin", MARGIN_BOTTOM);	ADD_GROUP("Axis Stretch", "axis_stretch_");	ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_horizontal", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_h_axis_stretch_mode", "get_h_axis_stretch_mode");	ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode");	BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_STRETCH);	BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE);	BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);}
开发者ID:KelinciFX,项目名称:godot,代码行数:34,


示例8: 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,


示例9: ADD_SIGNAL

void Sprite::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_texture", "texture"), &Sprite::set_texture);	ClassDB::bind_method(D_METHOD("get_texture"), &Sprite::get_texture);	ClassDB::bind_method(D_METHOD("set_normal_map", "normal_map"), &Sprite::set_normal_map);	ClassDB::bind_method(D_METHOD("get_normal_map"), &Sprite::get_normal_map);	ClassDB::bind_method(D_METHOD("set_centered", "centered"), &Sprite::set_centered);	ClassDB::bind_method(D_METHOD("is_centered"), &Sprite::is_centered);	ClassDB::bind_method(D_METHOD("set_offset", "offset"), &Sprite::set_offset);	ClassDB::bind_method(D_METHOD("get_offset"), &Sprite::get_offset);	ClassDB::bind_method(D_METHOD("set_flip_h", "flip_h"), &Sprite::set_flip_h);	ClassDB::bind_method(D_METHOD("is_flipped_h"), &Sprite::is_flipped_h);	ClassDB::bind_method(D_METHOD("set_flip_v", "flip_v"), &Sprite::set_flip_v);	ClassDB::bind_method(D_METHOD("is_flipped_v"), &Sprite::is_flipped_v);	ClassDB::bind_method(D_METHOD("set_region", "enabled"), &Sprite::set_region);	ClassDB::bind_method(D_METHOD("is_region"), &Sprite::is_region);	ClassDB::bind_method(D_METHOD("set_region_rect", "rect"), &Sprite::set_region_rect);	ClassDB::bind_method(D_METHOD("get_region_rect"), &Sprite::get_region_rect);	ClassDB::bind_method(D_METHOD("set_region_filter_clip", "enabled"), &Sprite::set_region_filter_clip);	ClassDB::bind_method(D_METHOD("is_region_filter_clip_enabled"), &Sprite::is_region_filter_clip_enabled);	ClassDB::bind_method(D_METHOD("set_frame", "frame"), &Sprite::set_frame);	ClassDB::bind_method(D_METHOD("get_frame"), &Sprite::get_frame);	ClassDB::bind_method(D_METHOD("set_vframes", "vframes"), &Sprite::set_vframes);	ClassDB::bind_method(D_METHOD("get_vframes"), &Sprite::get_vframes);	ClassDB::bind_method(D_METHOD("set_hframes", "hframes"), &Sprite::set_hframes);	ClassDB::bind_method(D_METHOD("get_hframes"), &Sprite::get_hframes);	ClassDB::bind_method(D_METHOD("get_rect"), &Sprite::get_rect);	ADD_SIGNAL(MethodInfo("frame_changed"));	ADD_SIGNAL(MethodInfo("texture_changed"));	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture");	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_normal_map", "get_normal_map");	ADD_GROUP("Offset", "");	ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "centered"), "set_centered", "is_centered");	ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "offset"), "set_offset", "get_offset");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "flip_h"), "set_flip_h", "is_flipped_h");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "flip_v"), "set_flip_v", "is_flipped_v");	ADD_GROUP("Animation", "");	ADD_PROPERTYNO(PropertyInfo(Variant::INT, "vframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_vframes", "get_vframes");	ADD_PROPERTYNO(PropertyInfo(Variant::INT, "hframes", PROPERTY_HINT_RANGE, "1,16384,1"), "set_hframes", "get_hframes");	ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "frame", PROPERTY_HINT_SPRITE_FRAME), "set_frame", "get_frame");	ADD_GROUP("Region", "region_");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "region_enabled"), "set_region", "is_region");	ADD_PROPERTYNZ(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "region_filter_clip"), "set_region_filter_clip", "is_region_filter_clip_enabled");}
开发者ID:Ranakhamis,项目名称:godot,代码行数:60,


示例10: ADD_PROPERTYNZ

void NativeScript::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_class_name", "class_name"), &NativeScript::set_class_name);	ClassDB::bind_method(D_METHOD("get_class_name"), &NativeScript::get_class_name);	ClassDB::bind_method(D_METHOD("set_library", "library"), &NativeScript::set_library);	ClassDB::bind_method(D_METHOD("get_library"), &NativeScript::get_library);	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "class_name"), "set_class_name", "get_class_name");	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "GDNativeLibrary"), "set_library", "get_library");	ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &NativeScript::_new, MethodInfo(Variant::OBJECT, "new"));}
开发者ID:KelinciFX,项目名称:godot,代码行数:12,


示例11: ADD_GROUP

void TextureProgress::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_under_texture", "tex"), &TextureProgress::set_under_texture);	ClassDB::bind_method(D_METHOD("get_under_texture"), &TextureProgress::get_under_texture);	ClassDB::bind_method(D_METHOD("set_progress_texture", "tex"), &TextureProgress::set_progress_texture);	ClassDB::bind_method(D_METHOD("get_progress_texture"), &TextureProgress::get_progress_texture);	ClassDB::bind_method(D_METHOD("set_over_texture", "tex"), &TextureProgress::set_over_texture);	ClassDB::bind_method(D_METHOD("get_over_texture"), &TextureProgress::get_over_texture);	ClassDB::bind_method(D_METHOD("set_fill_mode", "mode"), &TextureProgress::set_fill_mode);	ClassDB::bind_method(D_METHOD("get_fill_mode"), &TextureProgress::get_fill_mode);	ClassDB::bind_method(D_METHOD("set_radial_initial_angle", "mode"), &TextureProgress::set_radial_initial_angle);	ClassDB::bind_method(D_METHOD("get_radial_initial_angle"), &TextureProgress::get_radial_initial_angle);	ClassDB::bind_method(D_METHOD("set_radial_center_offset", "mode"), &TextureProgress::set_radial_center_offset);	ClassDB::bind_method(D_METHOD("get_radial_center_offset"), &TextureProgress::get_radial_center_offset);	ClassDB::bind_method(D_METHOD("set_fill_degrees", "mode"), &TextureProgress::set_fill_degrees);	ClassDB::bind_method(D_METHOD("get_fill_degrees"), &TextureProgress::get_fill_degrees);	ClassDB::bind_method(D_METHOD("set_stretch_margin", "margin", "value"), &TextureProgress::set_stretch_margin);	ClassDB::bind_method(D_METHOD("get_stretch_margin", "margin"), &TextureProgress::get_stretch_margin);	ClassDB::bind_method(D_METHOD("set_nine_patch_stretch", "stretch"), &TextureProgress::set_nine_patch_stretch);	ClassDB::bind_method(D_METHOD("get_nine_patch_stretch"), &TextureProgress::get_nine_patch_stretch);	ADD_GROUP("Textures", "texture_");	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_under", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_under_texture", "get_under_texture");	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_over", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_over_texture", "get_over_texture");	ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "texture_progress", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_progress_texture", "get_progress_texture");	ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "fill_mode", PROPERTY_HINT_ENUM, "Left to Right,Right to Left,Top to Bottom,Bottom to Top,Clockwise,Counter Clockwise"), "set_fill_mode", "get_fill_mode");	ADD_GROUP("Radial Fill", "radial_");	ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_initial_angle", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_radial_initial_angle", "get_radial_initial_angle");	ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset");	ADD_GROUP("Stretch", "stretch_");	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "nine_patch_stretch"), "set_nine_patch_stretch", "get_nine_patch_stretch");	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "stretch_margin_left", PROPERTY_HINT_RANGE, "0,16384,1"), "set_stretch_margin", "get_stretch_margin", MARGIN_LEFT);	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "stretch_margin_top", PROPERTY_HINT_RANGE, "0,16384,1"), "set_stretch_margin", "get_stretch_margin", MARGIN_TOP);	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "stretch_margin_right", PROPERTY_HINT_RANGE, "0,16384,1"), "set_stretch_margin", "get_stretch_margin", MARGIN_RIGHT);	ADD_PROPERTYINZ(PropertyInfo(Variant::INT, "stretch_margin_bottom", PROPERTY_HINT_RANGE, "0,16384,1"), "set_stretch_margin", "get_stretch_margin", MARGIN_BOTTOM);	BIND_ENUM_CONSTANT(FILL_LEFT_TO_RIGHT);	BIND_ENUM_CONSTANT(FILL_RIGHT_TO_LEFT);	BIND_ENUM_CONSTANT(FILL_TOP_TO_BOTTOM);	BIND_ENUM_CONSTANT(FILL_BOTTOM_TO_TOP);	BIND_ENUM_CONSTANT(FILL_CLOCKWISE);	BIND_ENUM_CONSTANT(FILL_COUNTER_CLOCKWISE);}
开发者ID:Warlaan,项目名称:godot,代码行数:52,


示例12: 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,


示例13: ADD_PROPERTYNZ

void Node2D::_bind_methods() {	ObjectTypeDB::bind_method(_MD("_get_rotd"),&Node2D::_get_rotd);	ObjectTypeDB::bind_method(_MD("_set_rotd"),&Node2D::_set_rotd);	ObjectTypeDB::bind_method(_MD("set_pos","pos"),&Node2D::set_pos);	ObjectTypeDB::bind_method(_MD("set_rot","rot"),&Node2D::set_rot);	ObjectTypeDB::bind_method(_MD("set_scale","scale"),&Node2D::set_scale);	ObjectTypeDB::bind_method(_MD("get_pos"),&Node2D::get_pos);	ObjectTypeDB::bind_method(_MD("get_rot"),&Node2D::get_rot);	ObjectTypeDB::bind_method(_MD("get_scale"),&Node2D::get_scale);	ObjectTypeDB::bind_method(_MD("rotate","radians"),&Node2D::rotate);	ObjectTypeDB::bind_method(_MD("move_local_x","delta","scaled"),&Node2D::move_x,DEFVAL(false));	ObjectTypeDB::bind_method(_MD("move_local_y","delta","scaled"),&Node2D::move_y,DEFVAL(false));	ObjectTypeDB::bind_method(_MD("translate","offset"),&Node2D::translate);	ObjectTypeDB::bind_method(_MD("global_translate","offset"),&Node2D::global_translate);	ObjectTypeDB::bind_method(_MD("scale","ratio"),&Node2D::scale);	ObjectTypeDB::bind_method(_MD("set_global_pos","pos"),&Node2D::set_global_pos);	ObjectTypeDB::bind_method(_MD("get_global_pos"),&Node2D::get_global_pos);	ObjectTypeDB::bind_method(_MD("set_transform","xform"),&Node2D::set_transform);	ObjectTypeDB::bind_method(_MD("set_global_transform","xform"),&Node2D::set_global_transform);	ObjectTypeDB::bind_method(_MD("look_at","point"),&Node2D::look_at);	ObjectTypeDB::bind_method(_MD("get_angle_to","point"),&Node2D::get_angle_to);	ObjectTypeDB::bind_method(_MD("set_z","z"),&Node2D::set_z);	ObjectTypeDB::bind_method(_MD("get_z"),&Node2D::get_z);	ObjectTypeDB::bind_method(_MD("set_z_as_relative","enable"),&Node2D::set_z_as_relative);	ObjectTypeDB::bind_method(_MD("is_z_relative"),&Node2D::is_z_relative);	ObjectTypeDB::bind_method(_MD("edit_set_pivot"),&Node2D::edit_set_pivot);	ObjectTypeDB::bind_method(_MD("get_relative_transform"),&Node2D::get_relative_transform);	ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"transform/pos"),_SCS("set_pos"),_SCS("get_pos"));	ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"transform/rot",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("_set_rotd"),_SCS("_get_rotd"));	ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2,"transform/scale"),_SCS("set_scale"),_SCS("get_scale"));	ADD_PROPERTYNZ(PropertyInfo(Variant::INT,"z/z",PROPERTY_HINT_RANGE,itos(VS::CANVAS_ITEM_Z_MIN)+","+itos(VS::CANVAS_ITEM_Z_MAX)+",1"),_SCS("set_z"),_SCS("get_z"));	ADD_PROPERTYNO(PropertyInfo(Variant::BOOL,"z/relative"),_SCS("set_z_as_relative"),_SCS("is_z_relative"));}
开发者ID:Ragar0ck,项目名称:godot,代码行数:49,


示例14: BIND_ENUM_CONSTANT

void LinkButton::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_text", "text"), &LinkButton::set_text);	ClassDB::bind_method(D_METHOD("get_text"), &LinkButton::get_text);	ClassDB::bind_method(D_METHOD("set_underline_mode", "underline_mode"), &LinkButton::set_underline_mode);	ClassDB::bind_method(D_METHOD("get_underline_mode"), &LinkButton::get_underline_mode);	BIND_ENUM_CONSTANT(UNDERLINE_MODE_ALWAYS);	BIND_ENUM_CONSTANT(UNDERLINE_MODE_ON_HOVER);	BIND_ENUM_CONSTANT(UNDERLINE_MODE_NEVER);	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");	ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "underline", PROPERTY_HINT_ENUM, "Always,On Hover,Never"), "set_underline_mode", "get_underline_mode");}
开发者ID:Ranakhamis,项目名称:godot,代码行数:15,


示例15: ADD_SIGNAL

void StyleBoxTexture::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&StyleBoxTexture::set_texture);	ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&StyleBoxTexture::get_texture);	ObjectTypeDB::bind_method(_MD("set_margin_size","margin","size"),&StyleBoxTexture::set_margin_size);	ObjectTypeDB::bind_method(_MD("get_margin_size","margin"),&StyleBoxTexture::get_margin_size);	ObjectTypeDB::bind_method(_MD("set_expand_margin_size","margin","size"),&StyleBoxTexture::set_expand_margin_size);	ObjectTypeDB::bind_method(_MD("get_expand_margin_size","margin"),&StyleBoxTexture::get_expand_margin_size);	ObjectTypeDB::bind_method(_MD("set_region_rect","region"),&StyleBoxTexture::set_region_rect);	ObjectTypeDB::bind_method(_MD("get_region_rect"),&StyleBoxTexture::get_region_rect);	ObjectTypeDB::bind_method(_MD("set_draw_center","enable"),&StyleBoxTexture::set_draw_center);	ObjectTypeDB::bind_method(_MD("get_draw_center"),&StyleBoxTexture::get_draw_center);	ADD_SIGNAL(MethodInfo("texture_changed"));	ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_texture"),_SCS("get_texture") );	ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect"));	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_LEFT );	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_RIGHT );	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_TOP);	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_BOTTOM );	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_LEFT );	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_RIGHT );	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_TOP );	ADD_PROPERTYI( PropertyInfo( Variant::REAL, "expand_margin/bottom", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_expand_margin_size"),_SCS("get_expand_margin_size"), MARGIN_BOTTOM );	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "draw_center" ) , _SCS("set_draw_center"),_SCS("get_draw_center"));}
开发者ID:03050903,项目名称:godot,代码行数:32,


示例16: BIND_CONSTANT

void LinkButton::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_text","text"),&LinkButton::set_text);	ObjectTypeDB::bind_method(_MD("get_text"),&LinkButton::get_text);	ObjectTypeDB::bind_method(_MD("set_underline_mode","underline_mode"),&LinkButton::set_underline_mode);	ObjectTypeDB::bind_method(_MD("get_underline_mode"),&LinkButton::get_underline_mode);	BIND_CONSTANT( 	UNDERLINE_MODE_ALWAYS );	BIND_CONSTANT( 	UNDERLINE_MODE_ON_HOVER );	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING,"text"), _SCS("set_text"), _SCS("get_text"));	ADD_PROPERTYNZ(PropertyInfo(Variant::INT,"underline",PROPERTY_HINT_ENUM,"Always,On Hover"), _SCS("set_underline_mode"), _SCS("get_underline_mode"));}
开发者ID:03050903,项目名称:godot,代码行数:16,


示例17: ADD_SIGNAL

void NetGameServer::_bind_methods() {	ADD_SIGNAL(MethodInfo(SIGNAL_CLIENT_CONNECT,PropertyInfo( Variant::INT,"id")));	ADD_SIGNAL(MethodInfo(SIGNAL_CLIENT_READY,PropertyInfo( Variant::INT,"id")));	ADD_SIGNAL(MethodInfo(SIGNAL_CLIENT_DISCONNECT,PropertyInfo( Variant::INT,"id")));	ADD_SIGNAL(MethodInfo(SIGNAL_UDP_PACKET,PropertyInfo(Variant::INT,"id"), PropertyInfo(Variant::INT,"cmd"), PropertyInfo(Variant::RAW_ARRAY,"pkt")));	ADD_SIGNAL(MethodInfo(SIGNAL_TCP_PACKET,PropertyInfo(Variant::INT,"id"), PropertyInfo(Variant::INT,"cmd"), PropertyInfo(Variant::RAW_ARRAY,"pkt")));	ADD_SIGNAL(MethodInfo(SIGNAL_AUTH_PACKET,PropertyInfo(Variant::INT,"id"), PropertyInfo(Variant::INT,"cmd"), PropertyInfo(Variant::RAW_ARRAY,"pkt")));	BIND_CONSTANT(PROCESS);	BIND_CONSTANT(FIXED);	BIND_CONSTANT(THREADED);	ObjectTypeDB::bind_method(_MD("start", "tcp_port", "udp_port"), &NetGameServer::start);	ObjectTypeDB::bind_method("stop", &NetGameServer::stop);	ObjectTypeDB::bind_method(_MD("put_udp_packet:Error", "id", "pkt", "cmd", "rt"),&NetGameServer::put_udp_packet,DEFVAL(0), DEFVAL(false));	ObjectTypeDB::bind_method(_MD("put_tcp_packet:Error", "id", "pkt", "cmd"),&NetGameServer::put_tcp_packet, DEFVAL(0));	ObjectTypeDB::bind_method(_MD("broadcast_udp:Error", "pkt", "cmd", "rt"),&NetGameServer::broadcast_udp,DEFVAL(0), DEFVAL(false));	ObjectTypeDB::bind_method(_MD("broadcast_tcp:Error", "pkt", "cmd"),&NetGameServer::broadcast_tcp, DEFVAL(0));	ObjectTypeDB::bind_method(_MD("auth_client", "id"),&NetGameServer::auth_client);	ObjectTypeDB::bind_method(_MD("kick_client", "id"),&NetGameServer::kick_client);	ObjectTypeDB::bind_method(_MD("set_signal_mode","mode"),&NetGameServer::set_signal_mode);	ObjectTypeDB::bind_method(_MD("get_signal_mode"),&NetGameServer::get_signal_mode);	ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"signal_mode",PROPERTY_HINT_ENUM,"Process,Fixed,Threaded"),_SCS("set_signal_mode"),_SCS("get_signal_mode"));}
开发者ID:Faless,项目名称:netgame-godot,代码行数:25,


示例18: ADD_SIGNAL

void Area2D::_bind_methods() {	ObjectTypeDB::bind_method(_MD("_body_enter_tree","id"),&Area2D::_body_enter_tree);	ObjectTypeDB::bind_method(_MD("_body_exit_tree","id"),&Area2D::_body_exit_tree);	ObjectTypeDB::bind_method(_MD("set_space_override_mode","enable"),&Area2D::set_space_override_mode);	ObjectTypeDB::bind_method(_MD("get_space_override_mode"),&Area2D::get_space_override_mode);	ObjectTypeDB::bind_method(_MD("set_gravity_is_point","enable"),&Area2D::set_gravity_is_point);	ObjectTypeDB::bind_method(_MD("is_gravity_a_point"),&Area2D::is_gravity_a_point);	ObjectTypeDB::bind_method(_MD("set_gravity_vector","vector"),&Area2D::set_gravity_vector);	ObjectTypeDB::bind_method(_MD("get_gravity_vector"),&Area2D::get_gravity_vector);	ObjectTypeDB::bind_method(_MD("set_gravity","gravity"),&Area2D::set_gravity);	ObjectTypeDB::bind_method(_MD("get_gravity"),&Area2D::get_gravity);	ObjectTypeDB::bind_method(_MD("set_density","density"),&Area2D::set_density);	ObjectTypeDB::bind_method(_MD("get_density"),&Area2D::get_density);	ObjectTypeDB::bind_method(_MD("set_priority","priority"),&Area2D::set_priority);	ObjectTypeDB::bind_method(_MD("get_priority"),&Area2D::get_priority);	ObjectTypeDB::bind_method(_MD("set_enable_monitoring","enable"),&Area2D::set_enable_monitoring);	ObjectTypeDB::bind_method(_MD("is_monitoring_enabled"),&Area2D::is_monitoring_enabled);	ObjectTypeDB::bind_method(_MD("get_overlapping_bodies"),&Area2D::get_overlapping_bodies);	ObjectTypeDB::bind_method(_MD("_body_inout"),&Area2D::_body_inout);	ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));	ADD_SIGNAL( MethodInfo("body_exit_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));	ADD_SIGNAL( MethodInfo("body_enter",PropertyInfo(Variant::OBJECT,"body")));	ADD_SIGNAL( MethodInfo("body_exit",PropertyInfo(Variant::OBJECT,"body")));	ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"space_override",PROPERTY_HINT_ENUM,"Disabled,Combine,Replace"),_SCS("set_space_override_mode"),_SCS("get_space_override_mode"));	ADD_PROPERTY( PropertyInfo(Variant::BOOL,"gravity_point"),_SCS("set_gravity_is_point"),_SCS("is_gravity_a_point"));	ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"gravity_vec"),_SCS("set_gravity_vector"),_SCS("get_gravity_vector"));	ADD_PROPERTY( PropertyInfo(Variant::REAL,"gravity",PROPERTY_HINT_RANGE,"-1024,1024,0.01"),_SCS("set_gravity"),_SCS("get_gravity"));	ADD_PROPERTY( PropertyInfo(Variant::REAL,"density",PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_density"),_SCS("get_density"));	ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"priority",PROPERTY_HINT_RANGE,"0,128,1"),_SCS("set_priority"),_SCS("get_priority"));	ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitoring"),_SCS("set_enable_monitoring"),_SCS("is_monitoring_enabled"));}
开发者ID:3miu,项目名称:godot,代码行数:45,


示例19: ADD_PROPERTYNZ

void GDNativeLibrary::_bind_methods() {	ClassDB::bind_method(D_METHOD("get_config_file"), &GDNativeLibrary::get_config_file);	ClassDB::bind_method(D_METHOD("get_current_library_path"), &GDNativeLibrary::get_current_library_path);	ClassDB::bind_method(D_METHOD("get_current_dependencies"), &GDNativeLibrary::get_current_dependencies);	ClassDB::bind_method(D_METHOD("should_load_once"), &GDNativeLibrary::should_load_once);	ClassDB::bind_method(D_METHOD("is_singleton"), &GDNativeLibrary::is_singleton);	ClassDB::bind_method(D_METHOD("get_symbol_prefix"), &GDNativeLibrary::get_symbol_prefix);	ClassDB::bind_method(D_METHOD("set_load_once", "load_once"), &GDNativeLibrary::set_load_once);	ClassDB::bind_method(D_METHOD("set_singleton", "singleton"), &GDNativeLibrary::set_singleton);	ClassDB::bind_method(D_METHOD("set_symbol_prefix", "symbol_prefix"), &GDNativeLibrary::set_symbol_prefix);	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "load_once"), "set_load_once", "should_load_once");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "singleton"), "set_singleton", "is_singleton");	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "symbol_prefix"), "set_symbol_prefix", "get_symbol_prefix");}
开发者ID:angjminer,项目名称:godot,代码行数:18,


示例20: ADD_PROPERTY

void Spatial::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_transform","local"), &Spatial::set_transform);	ObjectTypeDB::bind_method(_MD("get_transform"), &Spatial::get_transform);	ObjectTypeDB::bind_method(_MD("set_translation","translation"), &Spatial::set_translation);	ObjectTypeDB::bind_method(_MD("get_translation"), &Spatial::get_translation);	ObjectTypeDB::bind_method(_MD("set_rotation","rotation"), &Spatial::set_rotation);	ObjectTypeDB::bind_method(_MD("get_rotation"), &Spatial::get_rotation);	ObjectTypeDB::bind_method(_MD("set_scale","scale"), &Spatial::set_scale);	ObjectTypeDB::bind_method(_MD("get_scale"), &Spatial::get_scale);	ObjectTypeDB::bind_method(_MD("set_global_transform","global"), &Spatial::set_global_transform);	ObjectTypeDB::bind_method(_MD("get_global_transform"), &Spatial::get_global_transform);	ObjectTypeDB::bind_method(_MD("get_parent_spatial"), &Spatial::get_parent_spatial);	ObjectTypeDB::bind_method(_MD("set_ignore_transform_notification","enabled"), &Spatial::set_ignore_transform_notification);	ObjectTypeDB::bind_method(_MD("set_as_toplevel","enable"), &Spatial::set_as_toplevel);	ObjectTypeDB::bind_method(_MD("is_set_as_toplevel"), &Spatial::is_set_as_toplevel);	ObjectTypeDB::bind_method(_MD("_set_rotation_deg","rotation_deg"), &Spatial::_set_rotation_deg);	ObjectTypeDB::bind_method(_MD("_get_rotation_deg"), &Spatial::_get_rotation_deg);	ObjectTypeDB::bind_method(_MD("get_world:World"), &Spatial::get_world);#ifdef TOOLS_ENABLED	ObjectTypeDB::bind_method(_MD("_update_gizmo"), &Spatial::_update_gizmo);	ObjectTypeDB::bind_method(_MD("_set_import_transform"), &Spatial::set_import_transform);	ObjectTypeDB::bind_method(_MD("_get_import_transform"), &Spatial::get_import_transform);	ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"_import_transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_transform"),_SCS("_get_import_transform"));#endif	ObjectTypeDB::bind_method(_MD("update_gizmo"), &Spatial::update_gizmo);	ObjectTypeDB::bind_method(_MD("set_gizmo","gizmo:SpatialGizmo"), &Spatial::set_gizmo);	ObjectTypeDB::bind_method(_MD("get_gizmo:SpatialGizmo"), &Spatial::get_gizmo);	ObjectTypeDB::bind_method(_MD("show"), &Spatial::show);	ObjectTypeDB::bind_method(_MD("hide"), &Spatial::hide);	ObjectTypeDB::bind_method(_MD("is_visible"), &Spatial::is_visible);	ObjectTypeDB::bind_method(_MD("is_hidden"), &Spatial::is_hidden);	ObjectTypeDB::bind_method(_MD("_set_visible_"), &Spatial::_set_visible_);	ObjectTypeDB::bind_method(_MD("_is_visible_"), &Spatial::_is_visible_);	BIND_CONSTANT( NOTIFICATION_TRANSFORM_CHANGED );	BIND_CONSTANT( NOTIFICATION_ENTER_WORLD );	BIND_CONSTANT( NOTIFICATION_EXIT_WORLD );	BIND_CONSTANT( NOTIFICATION_VISIBILITY_CHANGED );	//ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/global",PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR ), _SCS("set_global_transform"), _SCS("get_global_transform") );	ADD_PROPERTYNZ( PropertyInfo(Variant::TRANSFORM,"transform/local",PROPERTY_HINT_NONE,""), _SCS("set_transform"), _SCS("get_transform") );	ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/translation",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_translation"), _SCS("get_translation") );	ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/rotation",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("_set_rotation_deg"), _SCS("_get_rotation_deg") );	ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/rotation_rad",PROPERTY_HINT_NONE,"",0), _SCS("set_rotation"), _SCS("get_rotation") );	ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"transform/scale",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_scale"), _SCS("get_scale") );	ADD_PROPERTY( PropertyInfo(Variant::BOOL,"visibility/visible"), _SCS("_set_visible_"), _SCS("_is_visible_") );	//ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/local"), _SCS("set_transform"), _SCS("get_transform") );	ADD_SIGNAL( MethodInfo("visibility_changed" ) );}
开发者ID:HiddenDark,项目名称:godot,代码行数:56,


示例21: ADD_PROPERTYNZ

void Mesh::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_lightmap_size_hint", "size"), &Mesh::set_lightmap_size_hint);	ClassDB::bind_method(D_METHOD("get_lightmap_size_hint"), &Mesh::get_lightmap_size_hint);	ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2, "lightmap_size_hint"), "set_lightmap_size_hint", "get_lightmap_size_hint");	BIND_ENUM_CONSTANT(PRIMITIVE_POINTS);	BIND_ENUM_CONSTANT(PRIMITIVE_LINES);	BIND_ENUM_CONSTANT(PRIMITIVE_LINE_STRIP);	BIND_ENUM_CONSTANT(PRIMITIVE_LINE_LOOP);	BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLES);	BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_STRIP);	BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_FAN);	BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_NORMALIZED);	BIND_ENUM_CONSTANT(BLEND_SHAPE_MODE_RELATIVE);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_VERTEX);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_NORMAL);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_TANGENT);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_COLOR);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV2);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS);	BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_BASE);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_VERTEX);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_NORMAL);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TANGENT);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_COLOR);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TEX_UV);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TEX_UV2);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_BONES);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_WEIGHTS);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_INDEX);	BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_2D_VERTICES);	BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_16_BIT_BONES);	BIND_ENUM_CONSTANT(ARRAY_COMPRESS_DEFAULT);	BIND_ENUM_CONSTANT(ARRAY_VERTEX);	BIND_ENUM_CONSTANT(ARRAY_NORMAL);	BIND_ENUM_CONSTANT(ARRAY_TANGENT);	BIND_ENUM_CONSTANT(ARRAY_COLOR);	BIND_ENUM_CONSTANT(ARRAY_TEX_UV);	BIND_ENUM_CONSTANT(ARRAY_TEX_UV2);	BIND_ENUM_CONSTANT(ARRAY_BONES);	BIND_ENUM_CONSTANT(ARRAY_WEIGHTS);	BIND_ENUM_CONSTANT(ARRAY_INDEX);	BIND_ENUM_CONSTANT(ARRAY_MAX);}
开发者ID:luchete80,项目名称:GodotGUI,代码行数:55,


示例22: ADD_PROPERTYNZ

void Button::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_text","text"),&Button::set_text);	ObjectTypeDB::bind_method(_MD("get_text"),&Button::get_text);	ObjectTypeDB::bind_method(_MD("set_button_icon","texture:Texture"),&Button::set_icon);	ObjectTypeDB::bind_method(_MD("get_button_icon:Texture"),&Button::get_icon);	ObjectTypeDB::bind_method(_MD("set_flat","enabled"),&Button::set_flat);	ObjectTypeDB::bind_method(_MD("set_clip_text","enabled"),&Button::set_clip_text);	ObjectTypeDB::bind_method(_MD("get_clip_text"),&Button::get_clip_text);	ObjectTypeDB::bind_method(_MD("set_text_align","align"),&Button::set_text_align);	ObjectTypeDB::bind_method(_MD("get_text_align"),&Button::get_text_align);	ObjectTypeDB::bind_method(_MD("is_flat"),&Button::is_flat);	ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "text", PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL ), _SCS("set_text"),_SCS("get_text") );	ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_button_icon"),_SCS("get_button_icon") );	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "flat" ), _SCS("set_flat"),_SCS("is_flat") );	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "clip_text" ), _SCS("set_clip_text"),_SCS("get_clip_text") );	ADD_PROPERTYNO( PropertyInfo( Variant::INT, "align",PROPERTY_HINT_ENUM,"Left,Center,Right" ), _SCS("set_text_align"),_SCS("get_text_align") );}
开发者ID:AwsomeGameEngine,项目名称:godot,代码行数:20,


示例23: ADD_PROPERTYNZ

void ViewportSprite::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_viewport_path","path"),&ViewportSprite::set_viewport_path);	ObjectTypeDB::bind_method(_MD("get_viewport_path"),&ViewportSprite::get_viewport_path);	ObjectTypeDB::bind_method(_MD("set_centered","centered"),&ViewportSprite::set_centered);	ObjectTypeDB::bind_method(_MD("is_centered"),&ViewportSprite::is_centered);	ObjectTypeDB::bind_method(_MD("set_offset","offset"),&ViewportSprite::set_offset);	ObjectTypeDB::bind_method(_MD("get_offset"),&ViewportSprite::get_offset);	ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&ViewportSprite::set_modulate);	ObjectTypeDB::bind_method(_MD("get_modulate"),&ViewportSprite::get_modulate);	ADD_PROPERTYNZ( PropertyInfo( Variant::NODE_PATH, "viewport"), _SCS("set_viewport_path"),_SCS("get_viewport_path"));	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_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate"));}
开发者ID:03050903,项目名称:godot,代码行数:20,


示例24: ADD_PROPERTYNZ

void GDNative::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_library", "library"), &GDNative::set_library);	ClassDB::bind_method(D_METHOD("get_library"), &GDNative::get_library);	ClassDB::bind_method(D_METHOD("initialize"), &GDNative::initialize);	ClassDB::bind_method(D_METHOD("terminate"), &GDNative::terminate);	ClassDB::bind_method(D_METHOD("call_native", "calling_type", "procedure_name", "arguments"), &GDNative::call_native);	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "GDNativeLibrary"), "set_library", "get_library");}
开发者ID:codingabc,项目名称:godot,代码行数:11,


示例25: BIND_VMETHOD

void BaseButton::_bind_methods() {	ClassDB::bind_method(_MD("_input_event"),&BaseButton::_input_event);	ClassDB::bind_method(_MD("_unhandled_input"),&BaseButton::_unhandled_input);	ClassDB::bind_method(_MD("set_pressed","pressed"),&BaseButton::set_pressed);	ClassDB::bind_method(_MD("is_pressed"),&BaseButton::is_pressed);	ClassDB::bind_method(_MD("is_hovered"),&BaseButton::is_hovered);	ClassDB::bind_method(_MD("set_toggle_mode","enabled"),&BaseButton::set_toggle_mode);	ClassDB::bind_method(_MD("is_toggle_mode"),&BaseButton::is_toggle_mode);	ClassDB::bind_method(_MD("set_disabled","disabled"),&BaseButton::set_disabled);	ClassDB::bind_method(_MD("is_disabled"),&BaseButton::is_disabled);	ClassDB::bind_method(_MD("set_click_on_press","enable"),&BaseButton::set_click_on_press);	ClassDB::bind_method(_MD("get_click_on_press"),&BaseButton::get_click_on_press);	ClassDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode);	ClassDB::bind_method(_MD("set_enabled_focus_mode","mode"),&BaseButton::set_enabled_focus_mode);	ClassDB::bind_method(_MD("get_enabled_focus_mode"),&BaseButton::get_enabled_focus_mode);	ClassDB::bind_method(_MD("set_shortcut","shortcut"),&BaseButton::set_shortcut);	ClassDB::bind_method(_MD("get_shortcut"),&BaseButton::get_shortcut);	BIND_VMETHOD(MethodInfo("_pressed"));	BIND_VMETHOD(MethodInfo("_toggled",PropertyInfo(Variant::BOOL,"pressed")));	ADD_SIGNAL( MethodInfo("pressed" ) );	ADD_SIGNAL( MethodInfo("released" ) );	ADD_SIGNAL( MethodInfo("button_up") );	ADD_SIGNAL( MethodInfo("button_down") );	ADD_SIGNAL( MethodInfo("toggled", PropertyInfo( Variant::BOOL,"pressed") ) );	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "disabled"), _SCS("set_disabled"), _SCS("is_disabled"));	ADD_PROPERTY( PropertyInfo( Variant::BOOL, "toggle_mode"), _SCS("set_toggle_mode"), _SCS("is_toggle_mode"));	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "is_pressed"), _SCS("set_pressed"), _SCS("is_pressed"));	ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "click_on_press"), _SCS("set_click_on_press"), _SCS("get_click_on_press"));	ADD_PROPERTY( PropertyInfo( Variant::INT,"enabled_focus_mode", PROPERTY_HINT_ENUM, "None,Click,All" ), _SCS("set_enabled_focus_mode"), _SCS("get_enabled_focus_mode") );	ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "shortcut",PROPERTY_HINT_RESOURCE_TYPE,"ShortCut"), _SCS("set_shortcut"), _SCS("get_shortcut"));	BIND_CONSTANT( DRAW_NORMAL );	BIND_CONSTANT( DRAW_PRESSED );	BIND_CONSTANT( DRAW_HOVER );	BIND_CONSTANT( DRAW_DISABLED );}
开发者ID:lonesurvivor,项目名称:godot,代码行数:41,


示例26: ADD_PROPERTYNZ

void CollisionShape2D::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_shape","shape"),&CollisionShape2D::set_shape);	ObjectTypeDB::bind_method(_MD("get_shape"),&CollisionShape2D::get_shape);	ObjectTypeDB::bind_method(_MD("_shape_changed"),&CollisionShape2D::_shape_changed);	ObjectTypeDB::bind_method(_MD("_add_to_collision_object"),&CollisionShape2D::_add_to_collision_object);	ObjectTypeDB::bind_method(_MD("set_trigger","enable"),&CollisionShape2D::set_trigger);	ObjectTypeDB::bind_method(_MD("is_trigger"),&CollisionShape2D::is_trigger);	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"shape",PROPERTY_HINT_RESOURCE_TYPE,"Shape2D"),_SCS("set_shape"),_SCS("get_shape"));	ADD_PROPERTY(PropertyInfo(Variant::BOOL,"trigger"),_SCS("set_trigger"),_SCS("is_trigger"));}
开发者ID:0871087123,项目名称:godot,代码行数:12,


示例27: DEFVAL

void Resource::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_path", "path"), &Resource::_set_path);	ClassDB::bind_method(D_METHOD("take_over_path", "path"), &Resource::_take_over_path);	ClassDB::bind_method(D_METHOD("get_path"), &Resource::get_path);	ClassDB::bind_method(D_METHOD("set_name", "name"), &Resource::set_name);	ClassDB::bind_method(D_METHOD("get_name"), &Resource::get_name);	ClassDB::bind_method(D_METHOD("get_rid"), &Resource::get_rid);	ClassDB::bind_method(D_METHOD("set_local_to_scene", "enable"), &Resource::set_local_to_scene);	ClassDB::bind_method(D_METHOD("is_local_to_scene"), &Resource::is_local_to_scene);	ClassDB::bind_method(D_METHOD("get_local_scene:Node"), &Resource::get_local_scene);	ClassDB::bind_method(D_METHOD("setup_local_to_scene"), &Resource::setup_local_to_scene);	ClassDB::bind_method(D_METHOD("duplicate", "subresources"), &Resource::duplicate, DEFVAL(false));	ADD_SIGNAL(MethodInfo("changed"));	ADD_GROUP("Resource", "resource_");	ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "resource_local_to_scene"), "set_local_to_scene", "is_local_to_scene");	ADD_PROPERTY(PropertyInfo(Variant::STRING, "resource_path", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_path", "get_path");	ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "resource_name"), "set_name", "get_name");	BIND_VMETHOD(MethodInfo("_setup_local_to_scene"));}
开发者ID:Zylann,项目名称:godot,代码行数:22,


示例28: ADD_PROPERTY

void TextureProgress::_bind_methods() {	ObjectTypeDB::bind_method(_MD("set_under_texture","tex"),&TextureProgress::set_under_texture);	ObjectTypeDB::bind_method(_MD("get_under_texture"),&TextureProgress::get_under_texture);	ObjectTypeDB::bind_method(_MD("set_progress_texture","tex"),&TextureProgress::set_progress_texture);	ObjectTypeDB::bind_method(_MD("get_progress_texture"),&TextureProgress::get_progress_texture);	ObjectTypeDB::bind_method(_MD("set_over_texture","tex"),&TextureProgress::set_over_texture);	ObjectTypeDB::bind_method(_MD("get_over_texture"),&TextureProgress::get_over_texture);	ObjectTypeDB::bind_method(_MD("set_fill_mode","mode"),&TextureProgress::set_fill_mode);	ObjectTypeDB::bind_method(_MD("get_fill_mode"), &TextureProgress::get_fill_mode);	ObjectTypeDB::bind_method(_MD("set_radial_initial_angle","mode"),&TextureProgress::set_radial_initial_angle);	ObjectTypeDB::bind_method(_MD("get_radial_initial_angle"), &TextureProgress::get_radial_initial_angle);		ObjectTypeDB::bind_method(_MD("set_radial_center_offset","mode"),&TextureProgress::set_radial_center_offset);	ObjectTypeDB::bind_method(_MD("get_radial_center_offset"), &TextureProgress::get_radial_center_offset);		ObjectTypeDB::bind_method(_MD("set_fill_degrees","mode"),&TextureProgress::set_fill_degrees);	ObjectTypeDB::bind_method(_MD("get_fill_degrees"), &TextureProgress::get_fill_degrees);	ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/under",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_under_texture"),_SCS("get_under_texture"));	ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/over",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_over_texture"),_SCS("get_over_texture"));	ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/progress",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_progress_texture"),_SCS("get_progress_texture"));	ADD_PROPERTYNZ( PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Left to Right,Right to Left,Top to Bottom,Bottom to Top,Clockwise,Counter Clockwise"),_SCS("set_fill_mode"),_SCS("get_fill_mode"));	ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"radial_fill/initial_angle",PROPERTY_HINT_RANGE,"0.0,360.0,0.1,slider"),_SCS("set_radial_initial_angle"),_SCS("get_radial_initial_angle"));	ADD_PROPERTYNZ( PropertyInfo(Variant::REAL,"radial_fill/fill_degrees",PROPERTY_HINT_RANGE,"0.0,360.0,0.1,slider"),_SCS("set_fill_degrees"),_SCS("get_fill_degrees"));	ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"radial_fill/center_offset"),_SCS("set_radial_center_offset"),_SCS("get_radial_center_offset"));	BIND_CONSTANT( FILL_LEFT_TO_RIGHT );	BIND_CONSTANT( FILL_RIGHT_TO_LEFT );	BIND_CONSTANT( FILL_TOP_TO_BOTTOM );	BIND_CONSTANT( FILL_BOTTOM_TO_TOP );	BIND_CONSTANT( FILL_CLOCKWISE );	BIND_CONSTANT( FILL_COUNTER_CLOCKWISE );}
开发者ID:AwsomeGameEngine,项目名称:godot,代码行数:39,


示例29: ADD_PROPERTYNZ

void GDNative::_bind_methods() {	ClassDB::bind_method(D_METHOD("set_library", "library"), &GDNative::set_library);	ClassDB::bind_method(D_METHOD("get_library"), &GDNative::get_library);	ClassDB::bind_method(D_METHOD("initialize"), &GDNative::initialize);	ClassDB::bind_method(D_METHOD("terminate"), &GDNative::terminate);	// TODO(karroffel): get_native_(raw_)call_types binding?	// TODO(karroffel): make this a varargs function?	ClassDB::bind_method(D_METHOD("call_native", "procedure_name", "arguments"), &GDNative::call_native);	ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "GDNativeLibrary"), "set_library", "get_library");}
开发者ID:GalanCM,项目名称:godot,代码行数:14,


示例30: ADD_PROPERTYNZ

void SpriteFrames::_bind_methods() {	ObjectTypeDB::bind_method(_MD("add_frame","frame","atpos"),&SpriteFrames::add_frame,DEFVAL(-1));	ObjectTypeDB::bind_method(_MD("get_frame_count"),&SpriteFrames::get_frame_count);	ObjectTypeDB::bind_method(_MD("get_frame","idx"),&SpriteFrames::get_frame);	ObjectTypeDB::bind_method(_MD("set_frame","idx","txt"),&SpriteFrames::set_frame);	ObjectTypeDB::bind_method(_MD("remove_frame","idx"),&SpriteFrames::remove_frame);	ObjectTypeDB::bind_method(_MD("clear"),&SpriteFrames::clear);	ObjectTypeDB::bind_method(_MD("_set_frames"),&SpriteFrames::_set_frames);	ObjectTypeDB::bind_method(_MD("_get_frames"),&SpriteFrames::_get_frames);	ADD_PROPERTYNZ( PropertyInfo(Variant::ARRAY,"frames",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_frames"),_SCS("_get_frames"));}
开发者ID:AMG194,项目名称:godot,代码行数:15,



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


C++ ADD_SIGNAL函数代码示例
C++ ADD_POINTERS函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。