diff options
Diffstat (limited to 'scene/gui/patch_9_frame.cpp')
| -rw-r--r-- | scene/gui/patch_9_frame.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/scene/gui/patch_9_frame.cpp b/scene/gui/patch_9_frame.cpp index ed1abbade..06d58c49e 100644 --- a/scene/gui/patch_9_frame.cpp +++ b/scene/gui/patch_9_frame.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -68,16 +68,16 @@ Size2 Patch9Frame::get_minimum_size() const { 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 ); + ClassDB::bind_method(_MD("set_texture","texture"), & Patch9Frame::set_texture ); + ClassDB::bind_method(_MD("get_texture"), & Patch9Frame::get_texture ); + ClassDB::bind_method(_MD("set_modulate","modulate"), & Patch9Frame::set_modulate ); + ClassDB::bind_method(_MD("get_modulate"), & Patch9Frame::get_modulate ); + ClassDB::bind_method(_MD("set_patch_margin","margin","value"), & Patch9Frame::set_patch_margin ); + ClassDB::bind_method(_MD("get_patch_margin","margin"), & Patch9Frame::get_patch_margin ); + ClassDB::bind_method(_MD("set_region_rect","rect"),&Patch9Frame::set_region_rect); + ClassDB::bind_method(_MD("get_region_rect"),&Patch9Frame::get_region_rect); + ClassDB::bind_method(_MD("set_draw_center","draw_center"), & Patch9Frame::set_draw_center ); + ClassDB::bind_method(_MD("get_draw_center"), & Patch9Frame::get_draw_center ); ADD_SIGNAL(MethodInfo("texture_changed")); @@ -85,10 +85,12 @@ void Patch9Frame::_bind_methods() { 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 ); + + 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 ); } |
