diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2017-01-02 23:03:46 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-02 23:03:46 -0300 |
| commit | 118eed485e8f928a5a0dab530ae93211afa10525 (patch) | |
| tree | 83efb5cbcebb7046e5b64dfe1712475a7d3b7f14 /scene/gui | |
| parent | ce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (diff) | |
| download | redot-engine-118eed485e8f928a5a0dab530ae93211afa10525.tar.gz | |
ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
Diffstat (limited to 'scene/gui')
94 files changed, 980 insertions, 980 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 2dfc89dfd3..646bc70585 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -464,22 +464,22 @@ String BaseButton::get_tooltip(const Point2& p_pos) const { void BaseButton::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&BaseButton::_input_event); - ObjectTypeDB::bind_method(_MD("_unhandled_input"),&BaseButton::_unhandled_input); - ObjectTypeDB::bind_method(_MD("set_pressed","pressed"),&BaseButton::set_pressed); - ObjectTypeDB::bind_method(_MD("is_pressed"),&BaseButton::is_pressed); - ObjectTypeDB::bind_method(_MD("is_hovered"),&BaseButton::is_hovered); - ObjectTypeDB::bind_method(_MD("set_toggle_mode","enabled"),&BaseButton::set_toggle_mode); - ObjectTypeDB::bind_method(_MD("is_toggle_mode"),&BaseButton::is_toggle_mode); - ObjectTypeDB::bind_method(_MD("set_disabled","disabled"),&BaseButton::set_disabled); - ObjectTypeDB::bind_method(_MD("is_disabled"),&BaseButton::is_disabled); - ObjectTypeDB::bind_method(_MD("set_click_on_press","enable"),&BaseButton::set_click_on_press); - ObjectTypeDB::bind_method(_MD("get_click_on_press"),&BaseButton::get_click_on_press); - ObjectTypeDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode); - ObjectTypeDB::bind_method(_MD("set_enabled_focus_mode","mode"),&BaseButton::set_enabled_focus_mode); - ObjectTypeDB::bind_method(_MD("get_enabled_focus_mode"),&BaseButton::get_enabled_focus_mode); - ObjectTypeDB::bind_method(_MD("set_shortcut","shortcut"),&BaseButton::set_shortcut); - ObjectTypeDB::bind_method(_MD("get_shortcut"),&BaseButton::get_shortcut); + 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"))); diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index 1d97023856..6fbf11dedd 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -39,7 +39,7 @@ class ButtonGroup; class BaseButton : public Control { - OBJ_TYPE( BaseButton, Control ); + GDCLASS( BaseButton, Control ); bool toggle_mode; FocusMode enabled_focus_mode; diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 3547414799..531c3b0a00 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -301,9 +301,9 @@ BoxContainer::BoxContainer(bool p_vertical) { void BoxContainer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("add_spacer","begin"),&BoxContainer::add_spacer); - ObjectTypeDB::bind_method(_MD("get_alignment"),&BoxContainer::get_alignment); - ObjectTypeDB::bind_method(_MD("set_alignment","alignment"),&BoxContainer::set_alignment); + ClassDB::bind_method(_MD("add_spacer","begin"),&BoxContainer::add_spacer); + ClassDB::bind_method(_MD("get_alignment"),&BoxContainer::get_alignment); + ClassDB::bind_method(_MD("set_alignment","alignment"),&BoxContainer::set_alignment); BIND_CONSTANT( ALIGN_BEGIN ); BIND_CONSTANT( ALIGN_CENTER ); diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h index b137a5faaa..c428ec132c 100644 --- a/scene/gui/box_container.h +++ b/scene/gui/box_container.h @@ -33,7 +33,7 @@ class BoxContainer : public Container { - OBJ_TYPE(BoxContainer,Container); + GDCLASS(BoxContainer,Container); public: @@ -68,7 +68,7 @@ public: class HBoxContainer : public BoxContainer { - OBJ_TYPE(HBoxContainer,BoxContainer); + GDCLASS(HBoxContainer,BoxContainer); public: @@ -79,7 +79,7 @@ public: class MarginContainer; class VBoxContainer : public BoxContainer { - OBJ_TYPE(VBoxContainer,BoxContainer); + GDCLASS(VBoxContainer,BoxContainer); public: diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 6c0bcc7947..9c96adcbf2 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -215,16 +215,16 @@ Button::TextAlign Button::get_text_align() const { 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); + ClassDB::bind_method(_MD("set_text","text"),&Button::set_text); + ClassDB::bind_method(_MD("get_text"),&Button::get_text); + ClassDB::bind_method(_MD("set_button_icon","texture:Texture"),&Button::set_icon); + ClassDB::bind_method(_MD("get_button_icon:Texture"),&Button::get_icon); + ClassDB::bind_method(_MD("set_flat","enabled"),&Button::set_flat); + ClassDB::bind_method(_MD("set_clip_text","enabled"),&Button::set_clip_text); + ClassDB::bind_method(_MD("get_clip_text"),&Button::get_clip_text); + ClassDB::bind_method(_MD("set_text_align","align"),&Button::set_text_align); + ClassDB::bind_method(_MD("get_text_align"),&Button::get_text_align); + ClassDB::bind_method(_MD("is_flat"),&Button::is_flat); BIND_CONSTANT( ALIGN_LEFT ); BIND_CONSTANT( ALIGN_CENTER ); diff --git a/scene/gui/button.h b/scene/gui/button.h index 261ed0849c..408e31e111 100644 --- a/scene/gui/button.h +++ b/scene/gui/button.h @@ -35,7 +35,7 @@ */ class Button : public BaseButton { - OBJ_TYPE( Button, BaseButton ); + GDCLASS( Button, BaseButton ); public: diff --git a/scene/gui/button_array.cpp b/scene/gui/button_array.cpp index 1c8e216c39..d6b2c12a3a 100644 --- a/scene/gui/button_array.cpp +++ b/scene/gui/button_array.cpp @@ -527,24 +527,24 @@ void ButtonArray::get_translatable_strings(List<String> *p_strings) const { 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); + ClassDB::bind_method(_MD("add_button","text","tooltip"),&ButtonArray::add_button,DEFVAL("")); + ClassDB::bind_method(_MD("add_icon_button","icon:Texture","text","tooltip"),&ButtonArray::add_icon_button,DEFVAL(""),DEFVAL("")); + ClassDB::bind_method(_MD("set_button_text","button_idx","text"),&ButtonArray::set_button_text); + ClassDB::bind_method(_MD("set_button_tooltip","button_idx","text"),&ButtonArray::set_button_tooltip); + ClassDB::bind_method(_MD("set_button_icon","button_idx","icon:Texture"),&ButtonArray::set_button_icon); + ClassDB::bind_method(_MD("get_button_text","button_idx"),&ButtonArray::get_button_text); + ClassDB::bind_method(_MD("get_button_tooltip","button_idx"),&ButtonArray::get_button_tooltip); + ClassDB::bind_method(_MD("get_button_icon:Texture","button_idx"),&ButtonArray::get_button_icon); + ClassDB::bind_method(_MD("get_button_count"),&ButtonArray::get_button_count); + ClassDB::bind_method(_MD("set_flat","enabled"),&ButtonArray::set_flat); + ClassDB::bind_method(_MD("is_flat"),&ButtonArray::is_flat); + ClassDB::bind_method(_MD("get_selected"),&ButtonArray::get_selected); + ClassDB::bind_method(_MD("get_hovered"),&ButtonArray::get_hovered); + ClassDB::bind_method(_MD("set_selected","button_idx"),&ButtonArray::set_selected); + ClassDB::bind_method(_MD("erase_button","button_idx"),&ButtonArray::erase_button); + ClassDB::bind_method(_MD("clear"),&ButtonArray::clear); + + ClassDB::bind_method(_MD("_input_event"),&ButtonArray::_input_event); BIND_CONSTANT( ALIGN_BEGIN ); BIND_CONSTANT( ALIGN_CENTER ); diff --git a/scene/gui/button_array.h b/scene/gui/button_array.h index 7bd8929192..6df0f3b6a4 100644 --- a/scene/gui/button_array.h +++ b/scene/gui/button_array.h @@ -33,7 +33,7 @@ class ButtonArray : public Control { - OBJ_TYPE(ButtonArray, Control); + GDCLASS(ButtonArray, Control); public: enum Align { ALIGN_BEGIN, @@ -114,14 +114,14 @@ public: }; class HButtonArray : public ButtonArray { - OBJ_TYPE(HButtonArray,ButtonArray); + GDCLASS(HButtonArray,ButtonArray); public: HButtonArray() : ButtonArray(HORIZONTAL) {}; }; class VButtonArray : public ButtonArray { - OBJ_TYPE(VButtonArray,ButtonArray); + GDCLASS(VButtonArray,ButtonArray); public: VButtonArray() : ButtonArray(VERTICAL) {}; diff --git a/scene/gui/button_group.cpp b/scene/gui/button_group.cpp index 1c8192d585..8586296ba6 100644 --- a/scene/gui/button_group.cpp +++ b/scene/gui/button_group.cpp @@ -149,12 +149,12 @@ int ButtonGroup::get_pressed_button_index() const { void ButtonGroup::_bind_methods() { - ObjectTypeDB::bind_method(_MD("get_pressed_button:BaseButton"),&ButtonGroup::get_pressed_button); - ObjectTypeDB::bind_method(_MD("get_pressed_button_index"),&ButtonGroup::get_pressed_button_index); - ObjectTypeDB::bind_method(_MD("get_focused_button:BaseButton"),&ButtonGroup::get_focused_button); - ObjectTypeDB::bind_method(_MD("get_button_list"),&ButtonGroup::_get_button_list); - ObjectTypeDB::bind_method(_MD("_pressed"),&ButtonGroup::_pressed); - ObjectTypeDB::bind_method(_MD("set_pressed_button","button:BaseButton"),&ButtonGroup::_pressed); + ClassDB::bind_method(_MD("get_pressed_button:BaseButton"),&ButtonGroup::get_pressed_button); + ClassDB::bind_method(_MD("get_pressed_button_index"),&ButtonGroup::get_pressed_button_index); + ClassDB::bind_method(_MD("get_focused_button:BaseButton"),&ButtonGroup::get_focused_button); + ClassDB::bind_method(_MD("get_button_list"),&ButtonGroup::_get_button_list); + ClassDB::bind_method(_MD("_pressed"),&ButtonGroup::_pressed); + ClassDB::bind_method(_MD("set_pressed_button","button:BaseButton"),&ButtonGroup::_pressed); ADD_SIGNAL( MethodInfo("button_selected",PropertyInfo(Variant::OBJECT,"button",PROPERTY_HINT_RESOURCE_TYPE,"BaseButton"))); } diff --git a/scene/gui/button_group.h b/scene/gui/button_group.h index 3ec53247e1..e3380295e7 100644 --- a/scene/gui/button_group.h +++ b/scene/gui/button_group.h @@ -36,7 +36,7 @@ class BaseButton; class ButtonGroup : public BoxContainer { - OBJ_TYPE(ButtonGroup,BoxContainer); + GDCLASS(ButtonGroup,BoxContainer); Set<BaseButton*> buttons; diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp index 14721cbc23..4a42695c3a 100644 --- a/scene/gui/center_container.cpp +++ b/scene/gui/center_container.cpp @@ -92,8 +92,8 @@ void CenterContainer::_notification(int p_what) { void CenterContainer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_use_top_left","enable"),&CenterContainer::set_use_top_left); - ObjectTypeDB::bind_method(_MD("is_using_top_left"),&CenterContainer::is_using_top_left); + ClassDB::bind_method(_MD("set_use_top_left","enable"),&CenterContainer::set_use_top_left); + ClassDB::bind_method(_MD("is_using_top_left"),&CenterContainer::is_using_top_left); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"use_top_left"),_SCS("set_use_top_left"),_SCS("is_using_top_left")); } diff --git a/scene/gui/center_container.h b/scene/gui/center_container.h index 58ea9e5870..7acc14de19 100644 --- a/scene/gui/center_container.h +++ b/scene/gui/center_container.h @@ -34,7 +34,7 @@ class CenterContainer : public Container { - OBJ_TYPE( CenterContainer, Container ); + GDCLASS( CenterContainer, Container ); bool use_top_left; protected: diff --git a/scene/gui/check_box.h b/scene/gui/check_box.h index 631d46a9e7..6a4893936f 100644 --- a/scene/gui/check_box.h +++ b/scene/gui/check_box.h @@ -36,7 +36,7 @@ */ class CheckBox : public Button { - OBJ_TYPE( CheckBox, Button ); + GDCLASS( CheckBox, Button ); protected: diff --git a/scene/gui/check_button.h b/scene/gui/check_button.h index aa7190a371..1c5440a25d 100644 --- a/scene/gui/check_button.h +++ b/scene/gui/check_button.h @@ -36,7 +36,7 @@ */ class CheckButton : public Button { - OBJ_TYPE( CheckButton, Button ); + GDCLASS( CheckButton, Button ); protected: diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 6c212f60f0..05d455be2a 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -430,24 +430,24 @@ void ColorPicker::_screen_pick_pressed() void ColorPicker::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPicker::set_color); - ObjectTypeDB::bind_method(_MD("get_color"),&ColorPicker::get_color); - ObjectTypeDB::bind_method(_MD("set_raw_mode","mode"),&ColorPicker::set_raw_mode); - ObjectTypeDB::bind_method(_MD("is_raw_mode"),&ColorPicker::is_raw_mode); - ObjectTypeDB::bind_method(_MD("set_edit_alpha","show"),&ColorPicker::set_edit_alpha); - ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPicker::is_editing_alpha); - ObjectTypeDB::bind_method(_MD("add_preset"), &ColorPicker::add_preset); - ObjectTypeDB::bind_method(_MD("_value_changed"),&ColorPicker::_value_changed); - ObjectTypeDB::bind_method(_MD("_html_entered"),&ColorPicker::_html_entered); - ObjectTypeDB::bind_method(_MD("_text_type_toggled"),&ColorPicker::_text_type_toggled); - ObjectTypeDB::bind_method(_MD("_add_preset_pressed"), &ColorPicker::_add_preset_pressed); - ObjectTypeDB::bind_method(_MD("_screen_pick_pressed"), &ColorPicker::_screen_pick_pressed); - ObjectTypeDB::bind_method(_MD("_sample_draw"),&ColorPicker::_sample_draw); - ObjectTypeDB::bind_method(_MD("_hsv_draw"),&ColorPicker::_hsv_draw); - ObjectTypeDB::bind_method(_MD("_uv_input"),&ColorPicker::_uv_input); - ObjectTypeDB::bind_method(_MD("_w_input"),&ColorPicker::_w_input); - ObjectTypeDB::bind_method(_MD("_preset_input"),&ColorPicker::_preset_input); - ObjectTypeDB::bind_method(_MD("_screen_input"),&ColorPicker::_screen_input); + ClassDB::bind_method(_MD("set_color","color"),&ColorPicker::set_color); + ClassDB::bind_method(_MD("get_color"),&ColorPicker::get_color); + ClassDB::bind_method(_MD("set_raw_mode","mode"),&ColorPicker::set_raw_mode); + ClassDB::bind_method(_MD("is_raw_mode"),&ColorPicker::is_raw_mode); + ClassDB::bind_method(_MD("set_edit_alpha","show"),&ColorPicker::set_edit_alpha); + ClassDB::bind_method(_MD("is_editing_alpha"),&ColorPicker::is_editing_alpha); + ClassDB::bind_method(_MD("add_preset"), &ColorPicker::add_preset); + ClassDB::bind_method(_MD("_value_changed"),&ColorPicker::_value_changed); + ClassDB::bind_method(_MD("_html_entered"),&ColorPicker::_html_entered); + ClassDB::bind_method(_MD("_text_type_toggled"),&ColorPicker::_text_type_toggled); + ClassDB::bind_method(_MD("_add_preset_pressed"), &ColorPicker::_add_preset_pressed); + ClassDB::bind_method(_MD("_screen_pick_pressed"), &ColorPicker::_screen_pick_pressed); + ClassDB::bind_method(_MD("_sample_draw"),&ColorPicker::_sample_draw); + ClassDB::bind_method(_MD("_hsv_draw"),&ColorPicker::_hsv_draw); + ClassDB::bind_method(_MD("_uv_input"),&ColorPicker::_uv_input); + ClassDB::bind_method(_MD("_w_input"),&ColorPicker::_w_input); + ClassDB::bind_method(_MD("_preset_input"),&ColorPicker::_preset_input); + ClassDB::bind_method(_MD("_screen_input"),&ColorPicker::_screen_input); ADD_SIGNAL( MethodInfo("color_changed",PropertyInfo(Variant::COLOR,"color"))); } @@ -649,12 +649,12 @@ ColorPicker *ColorPickerButton::get_picker() { void ColorPickerButton::_bind_methods(){ - ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color); - ObjectTypeDB::bind_method(_MD("get_color"),&ColorPickerButton::get_color); - ObjectTypeDB::bind_method(_MD("get_picker:ColorPicker"),&ColorPickerButton::get_picker); - ObjectTypeDB::bind_method(_MD("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha); - ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha); - ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed); + ClassDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color); + ClassDB::bind_method(_MD("get_color"),&ColorPickerButton::get_color); + ClassDB::bind_method(_MD("get_picker:ColorPicker"),&ColorPickerButton::get_picker); + ClassDB::bind_method(_MD("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha); + ClassDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha); + ClassDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed); ADD_SIGNAL( MethodInfo("color_changed",PropertyInfo(Variant::COLOR,"color"))); ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color") ); diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h index 1b7f96acf5..557635ec4a 100644 --- a/scene/gui/color_picker.h +++ b/scene/gui/color_picker.h @@ -43,7 +43,7 @@ class ColorPicker : public BoxContainer { - OBJ_TYPE(ColorPicker,BoxContainer); + GDCLASS(ColorPicker,BoxContainer); private: @@ -113,7 +113,7 @@ public: class ColorPickerButton : public Button { - OBJ_TYPE(ColorPickerButton,Button); + GDCLASS(ColorPickerButton,Button); PopupPanel *popup; ColorPicker *picker; diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp index 7415aad0fd..195acebdfd 100644 --- a/scene/gui/color_ramp_edit.cpp +++ b/scene/gui/color_ramp_edit.cpp @@ -446,7 +446,7 @@ Vector<ColorRamp::Point>& ColorRampEdit::get_points() { } void ColorRampEdit::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&ColorRampEdit::_input_event); - ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorRampEdit::_color_changed); + ClassDB::bind_method(_MD("_input_event"),&ColorRampEdit::_input_event); + ClassDB::bind_method(_MD("_color_changed"),&ColorRampEdit::_color_changed); ADD_SIGNAL(MethodInfo("ramp_changed")); } diff --git a/scene/gui/color_ramp_edit.h b/scene/gui/color_ramp_edit.h index bbe8e2e6c3..c67a75e152 100644 --- a/scene/gui/color_ramp_edit.h +++ b/scene/gui/color_ramp_edit.h @@ -38,7 +38,7 @@ class ColorRampEdit : public Control { - OBJ_TYPE(ColorRampEdit,Control); + GDCLASS(ColorRampEdit,Control); PopupPanel *popup; ColorPicker *picker; @@ -73,7 +73,7 @@ public: /*class ColorRampEditPanel : public Panel { - OBJ_TYPE(ColorRampEditPanel, Panel ); + GDCLASS(ColorRampEditPanel, Panel ); };*/ diff --git a/scene/gui/color_rect.cpp b/scene/gui/color_rect.cpp index a0e4df66b5..fee96d1ca9 100644 --- a/scene/gui/color_rect.cpp +++ b/scene/gui/color_rect.cpp @@ -23,8 +23,8 @@ void ColorFrame::_notification(int p_what) { void ColorFrame::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_frame_color","color"),&ColorFrame::set_frame_color); - ObjectTypeDB::bind_method(_MD("get_frame_color"),&ColorFrame::get_frame_color); + ClassDB::bind_method(_MD("set_frame_color","color"),&ColorFrame::set_frame_color); + ClassDB::bind_method(_MD("get_frame_color"),&ColorFrame::get_frame_color); ADD_PROPERTY(PropertyInfo(Variant::COLOR,"color"),_SCS("set_frame_color"),_SCS("get_frame_color") ); } diff --git a/scene/gui/color_rect.h b/scene/gui/color_rect.h index 3816d44052..f313bbc4f9 100644 --- a/scene/gui/color_rect.h +++ b/scene/gui/color_rect.h @@ -4,7 +4,7 @@ #include "scene/gui/control.h" class ColorFrame : public Control { - OBJ_TYPE(ColorFrame,Control) + GDCLASS(ColorFrame,Control) Color color; protected: diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index 05523a3cb6..a5a5c61082 100644 --- a/scene/gui/container.cpp +++ b/scene/gui/container.cpp @@ -156,11 +156,11 @@ void Container::_notification(int p_what) { void Container::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_sort_children"),&Container::_sort_children); - ObjectTypeDB::bind_method(_MD("_child_minsize_changed"),&Container::_child_minsize_changed); + ClassDB::bind_method(_MD("_sort_children"),&Container::_sort_children); + ClassDB::bind_method(_MD("_child_minsize_changed"),&Container::_child_minsize_changed); - ObjectTypeDB::bind_method(_MD("queue_sort"),&Container::queue_sort); - ObjectTypeDB::bind_method(_MD("fit_child_in_rect","child:Control","rect"),&Container::fit_child_in_rect); + ClassDB::bind_method(_MD("queue_sort"),&Container::queue_sort); + ClassDB::bind_method(_MD("fit_child_in_rect","child:Control","rect"),&Container::fit_child_in_rect); BIND_CONSTANT( NOTIFICATION_SORT_CHILDREN ); ADD_SIGNAL(MethodInfo("sort_children")); diff --git a/scene/gui/container.h b/scene/gui/container.h index 23693a7fdf..bb47524972 100644 --- a/scene/gui/container.h +++ b/scene/gui/container.h @@ -33,7 +33,7 @@ class Container : public Control { - OBJ_TYPE(Container,Control); + GDCLASS(Container,Control); bool pending_sort; void _sort_children(); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 69e3c0a214..d9e3faeb9a 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -336,7 +336,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const { { List<StringName> names; - theme->get_icon_list(get_type_name(),&names); + theme->get_icon_list(get_class_name(),&names); for(List<StringName>::Element *E=names.front();E;E=E->next()) { uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE; @@ -348,7 +348,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const { } { List<StringName> names; - theme->get_shader_list(get_type_name(),&names); + theme->get_shader_list(get_class_name(),&names); for(List<StringName>::Element *E=names.front();E;E=E->next()) { uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE; @@ -360,7 +360,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const { } { List<StringName> names; - theme->get_stylebox_list(get_type_name(),&names); + theme->get_stylebox_list(get_class_name(),&names); for(List<StringName>::Element *E=names.front();E;E=E->next()) { uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE; @@ -372,7 +372,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const { } { List<StringName> names; - theme->get_font_list(get_type_name(),&names); + theme->get_font_list(get_class_name(),&names); for(List<StringName>::Element *E=names.front();E;E=E->next()) { uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE; @@ -384,7 +384,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const { } { List<StringName> names; - theme->get_color_list(get_type_name(),&names); + theme->get_color_list(get_class_name(),&names); for(List<StringName>::Element *E=names.front();E;E=E->next()) { uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE; @@ -396,7 +396,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const { } { List<StringName> names; - theme->get_constant_list(get_type_name(),&names); + theme->get_constant_list(get_class_name(),&names); for(List<StringName>::Element *E=names.front();E;E=E->next()) { uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE; @@ -822,7 +822,7 @@ Ref<Texture> Control::get_icon(const StringName& p_name,const StringName& p_type return *tex; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -852,7 +852,7 @@ Ref<Shader> Control::get_shader(const StringName& p_name,const StringName& p_typ return *sdr; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -881,7 +881,7 @@ Ref<StyleBox> Control::get_stylebox(const StringName& p_name,const StringName& p return *style; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -910,7 +910,7 @@ Ref<Font> Control::get_font(const StringName& p_name,const StringName& p_type) c return *font; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -941,7 +941,7 @@ Color Control::get_color(const StringName& p_name,const StringName& p_type) cons return *color; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -970,7 +970,7 @@ int Control::get_constant(const StringName& p_name,const StringName& p_type) con return *constant; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -1053,7 +1053,7 @@ bool Control::has_icon(const StringName& p_name,const StringName& p_type) const return true; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -1082,7 +1082,7 @@ bool Control::has_shader(const StringName &p_name, const StringName &p_type) con return true; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -1110,7 +1110,7 @@ bool Control::has_stylebox(const StringName& p_name,const StringName& p_type) co return true; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -1139,7 +1139,7 @@ bool Control::has_font(const StringName& p_name,const StringName& p_type) const } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -1168,7 +1168,7 @@ bool Control::has_color(const StringName& p_name, const StringName& p_type) cons return true; } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -1198,7 +1198,7 @@ bool Control::has_constant(const StringName& p_name,const StringName& p_type) co } - StringName type = p_type?p_type:get_type_name(); + StringName type = p_type?p_type:get_class_name(); // try with custom themes Control *theme_owner = data.theme_owner; @@ -2414,15 +2414,15 @@ void Control::get_argument_options(const StringName& p_function,int p_idx,List<S List<StringName> sn; String pf = p_function; if (pf=="add_color_override" || pf=="has_color" || pf=="has_color_override" || pf=="get_color") { - Theme::get_default()->get_color_list(get_type(),&sn); + Theme::get_default()->get_color_list(get_class(),&sn); } else if (pf=="add_style_override" || pf=="has_style" || pf=="has_style_override" || pf=="get_style") { - Theme::get_default()->get_stylebox_list(get_type(),&sn); + Theme::get_default()->get_stylebox_list(get_class(),&sn); } else if (pf=="add_font_override" || pf=="has_font" || pf=="has_font_override" || pf=="get_font") { - Theme::get_default()->get_font_list(get_type(),&sn); + Theme::get_default()->get_font_list(get_class(),&sn); } else if (pf=="add_constant_override" || pf=="has_constant" || pf=="has_constant_override" || pf=="get_constant") { - Theme::get_default()->get_constant_list(get_type(),&sn); + Theme::get_default()->get_constant_list(get_class(),&sn); } else if (pf=="add_color_override" || pf=="has_color" || pf=="has_color_override" || pf=="get_color") { - Theme::get_default()->get_color_list(get_type(),&sn); + Theme::get_default()->get_color_list(get_class(),&sn); } sn.sort_custom<StringName::AlphCompare>(); @@ -2438,125 +2438,125 @@ void Control::get_argument_options(const StringName& p_function,int p_idx,List<S void Control::_bind_methods() { -// ObjectTypeDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event); - ObjectTypeDB::bind_method(_MD("_size_changed"),&Control::_size_changed); - ObjectTypeDB::bind_method(_MD("_update_minimum_size"),&Control::_update_minimum_size); - - ObjectTypeDB::bind_method(_MD("accept_event"),&Control::accept_event); - ObjectTypeDB::bind_method(_MD("get_minimum_size"),&Control::get_minimum_size); - ObjectTypeDB::bind_method(_MD("get_combined_minimum_size"),&Control::get_combined_minimum_size); - ObjectTypeDB::bind_method(_MD("set_anchor","margin","anchor_mode","keep_margin"),&Control::set_anchor,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("_set_anchor","margin","anchor_mode"),&Control::_set_anchor); - ObjectTypeDB::bind_method(_MD("get_anchor","margin"),&Control::get_anchor); - ObjectTypeDB::bind_method(_MD("set_margin","margin","offset"),&Control::set_margin); - ObjectTypeDB::bind_method(_MD("set_anchor_and_margin","margin","anchor_mode","offset"),&Control::set_anchor_and_margin); - ObjectTypeDB::bind_method(_MD("set_begin","pos"),&Control::set_begin); - ObjectTypeDB::bind_method(_MD("set_end","pos"),&Control::set_end); - ObjectTypeDB::bind_method(_MD("set_pos","pos"),&Control::set_pos); - ObjectTypeDB::bind_method(_MD("set_size","size"),&Control::set_size); - ObjectTypeDB::bind_method(_MD("set_custom_minimum_size","size"),&Control::set_custom_minimum_size); - ObjectTypeDB::bind_method(_MD("set_global_pos","pos"),&Control::set_global_pos); - ObjectTypeDB::bind_method(_MD("set_rotation","radians"),&Control::set_rotation); - ObjectTypeDB::bind_method(_MD("set_rotation_deg","degrees"),&Control::set_rotation_deg); +// ClassDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event); + ClassDB::bind_method(_MD("_size_changed"),&Control::_size_changed); + ClassDB::bind_method(_MD("_update_minimum_size"),&Control::_update_minimum_size); + + ClassDB::bind_method(_MD("accept_event"),&Control::accept_event); + ClassDB::bind_method(_MD("get_minimum_size"),&Control::get_minimum_size); + ClassDB::bind_method(_MD("get_combined_minimum_size"),&Control::get_combined_minimum_size); + ClassDB::bind_method(_MD("set_anchor","margin","anchor_mode","keep_margin"),&Control::set_anchor,DEFVAL(false)); + ClassDB::bind_method(_MD("_set_anchor","margin","anchor_mode"),&Control::_set_anchor); + ClassDB::bind_method(_MD("get_anchor","margin"),&Control::get_anchor); + ClassDB::bind_method(_MD("set_margin","margin","offset"),&Control::set_margin); + ClassDB::bind_method(_MD("set_anchor_and_margin","margin","anchor_mode","offset"),&Control::set_anchor_and_margin); + ClassDB::bind_method(_MD("set_begin","pos"),&Control::set_begin); + ClassDB::bind_method(_MD("set_end","pos"),&Control::set_end); + ClassDB::bind_method(_MD("set_pos","pos"),&Control::set_pos); + ClassDB::bind_method(_MD("set_size","size"),&Control::set_size); + ClassDB::bind_method(_MD("set_custom_minimum_size","size"),&Control::set_custom_minimum_size); + ClassDB::bind_method(_MD("set_global_pos","pos"),&Control::set_global_pos); + ClassDB::bind_method(_MD("set_rotation","radians"),&Control::set_rotation); + ClassDB::bind_method(_MD("set_rotation_deg","degrees"),&Control::set_rotation_deg); // TODO: Obsolete this method (old name) properly (GH-4397) - ObjectTypeDB::bind_method(_MD("_set_rotation_deg","degrees"),&Control::_set_rotation_deg); - ObjectTypeDB::bind_method(_MD("set_scale","scale"),&Control::set_scale); - ObjectTypeDB::bind_method(_MD("get_margin","margin"),&Control::get_margin); - ObjectTypeDB::bind_method(_MD("get_begin"),&Control::get_begin); - ObjectTypeDB::bind_method(_MD("get_end"),&Control::get_end); - ObjectTypeDB::bind_method(_MD("get_pos"),&Control::get_pos); - ObjectTypeDB::bind_method(_MD("get_size"),&Control::get_size); - ObjectTypeDB::bind_method(_MD("get_rotation"),&Control::get_rotation); - ObjectTypeDB::bind_method(_MD("get_rotation_deg"),&Control::get_rotation_deg); + ClassDB::bind_method(_MD("_set_rotation_deg","degrees"),&Control::_set_rotation_deg); + ClassDB::bind_method(_MD("set_scale","scale"),&Control::set_scale); + ClassDB::bind_method(_MD("get_margin","margin"),&Control::get_margin); + ClassDB::bind_method(_MD("get_begin"),&Control::get_begin); + ClassDB::bind_method(_MD("get_end"),&Control::get_end); + ClassDB::bind_method(_MD("get_pos"),&Control::get_pos); + ClassDB::bind_method(_MD("get_size"),&Control::get_size); + ClassDB::bind_method(_MD("get_rotation"),&Control::get_rotation); + ClassDB::bind_method(_MD("get_rotation_deg"),&Control::get_rotation_deg); // TODO: Obsolete this method (old name) properly (GH-4397) - ObjectTypeDB::bind_method(_MD("_get_rotation_deg"),&Control::_get_rotation_deg); - ObjectTypeDB::bind_method(_MD("get_scale"),&Control::get_scale); - ObjectTypeDB::bind_method(_MD("get_custom_minimum_size"),&Control::get_custom_minimum_size); - ObjectTypeDB::bind_method(_MD("get_parent_area_size"),&Control::get_size); - ObjectTypeDB::bind_method(_MD("get_global_pos"),&Control::get_global_pos); - ObjectTypeDB::bind_method(_MD("get_rect"),&Control::get_rect); - ObjectTypeDB::bind_method(_MD("get_global_rect"),&Control::get_global_rect); - ObjectTypeDB::bind_method(_MD("set_area_as_parent_rect","margin"),&Control::set_area_as_parent_rect,DEFVAL(0)); - ObjectTypeDB::bind_method(_MD("show_modal","exclusive"),&Control::show_modal,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("set_focus_mode","mode"),&Control::set_focus_mode); - ObjectTypeDB::bind_method(_MD("get_focus_mode"),&Control::get_focus_mode); - ObjectTypeDB::bind_method(_MD("has_focus"),&Control::has_focus); - ObjectTypeDB::bind_method(_MD("grab_focus"),&Control::grab_focus); - ObjectTypeDB::bind_method(_MD("release_focus"),&Control::release_focus); - ObjectTypeDB::bind_method(_MD("get_focus_owner:Control"),&Control::get_focus_owner); + ClassDB::bind_method(_MD("_get_rotation_deg"),&Control::_get_rotation_deg); + ClassDB::bind_method(_MD("get_scale"),&Control::get_scale); + ClassDB::bind_method(_MD("get_custom_minimum_size"),&Control::get_custom_minimum_size); + ClassDB::bind_method(_MD("get_parent_area_size"),&Control::get_size); + ClassDB::bind_method(_MD("get_global_pos"),&Control::get_global_pos); + ClassDB::bind_method(_MD("get_rect"),&Control::get_rect); + ClassDB::bind_method(_MD("get_global_rect"),&Control::get_global_rect); + ClassDB::bind_method(_MD("set_area_as_parent_rect","margin"),&Control::set_area_as_parent_rect,DEFVAL(0)); + ClassDB::bind_method(_MD("show_modal","exclusive"),&Control::show_modal,DEFVAL(false)); + ClassDB::bind_method(_MD("set_focus_mode","mode"),&Control::set_focus_mode); + ClassDB::bind_method(_MD("get_focus_mode"),&Control::get_focus_mode); + ClassDB::bind_method(_MD("has_focus"),&Control::has_focus); + ClassDB::bind_method(_MD("grab_focus"),&Control::grab_focus); + ClassDB::bind_method(_MD("release_focus"),&Control::release_focus); + ClassDB::bind_method(_MD("get_focus_owner:Control"),&Control::get_focus_owner); - ObjectTypeDB::bind_method(_MD("set_h_size_flags","flags"),&Control::set_h_size_flags); - ObjectTypeDB::bind_method(_MD("get_h_size_flags"),&Control::get_h_size_flags); + ClassDB::bind_method(_MD("set_h_size_flags","flags"),&Control::set_h_size_flags); + ClassDB::bind_method(_MD("get_h_size_flags"),&Control::get_h_size_flags); - ObjectTypeDB::bind_method(_MD("set_stretch_ratio","ratio"),&Control::set_stretch_ratio); - ObjectTypeDB::bind_method(_MD("get_stretch_ratio"),&Control::get_stretch_ratio); + ClassDB::bind_method(_MD("set_stretch_ratio","ratio"),&Control::set_stretch_ratio); + ClassDB::bind_method(_MD("get_stretch_ratio"),&Control::get_stretch_ratio); - ObjectTypeDB::bind_method(_MD("set_v_size_flags","flags"),&Control::set_v_size_flags); - ObjectTypeDB::bind_method(_MD("get_v_size_flags"),&Control::get_v_size_flags); + ClassDB::bind_method(_MD("set_v_size_flags","flags"),&Control::set_v_size_flags); + ClassDB::bind_method(_MD("get_v_size_flags"),&Control::get_v_size_flags); - ObjectTypeDB::bind_method(_MD("set_theme","theme:Theme"),&Control::set_theme); - ObjectTypeDB::bind_method(_MD("get_theme:Theme"),&Control::get_theme); + ClassDB::bind_method(_MD("set_theme","theme:Theme"),&Control::set_theme); + ClassDB::bind_method(_MD("get_theme:Theme"),&Control::get_theme); - ObjectTypeDB::bind_method(_MD("add_icon_override","name","texture:Texture"),&Control::add_icon_override); - ObjectTypeDB::bind_method(_MD("add_shader_override","name","shader:Shader"),&Control::add_shader_override); - ObjectTypeDB::bind_method(_MD("add_style_override","name","stylebox:StyleBox"),&Control::add_style_override); - ObjectTypeDB::bind_method(_MD("add_font_override","name","font:Font"),&Control::add_font_override); - ObjectTypeDB::bind_method(_MD("add_color_override","name","color"),&Control::add_color_override); - ObjectTypeDB::bind_method(_MD("add_constant_override","name","constant"),&Control::add_constant_override); + ClassDB::bind_method(_MD("add_icon_override","name","texture:Texture"),&Control::add_icon_override); + ClassDB::bind_method(_MD("add_shader_override","name","shader:Shader"),&Control::add_shader_override); + ClassDB::bind_method(_MD("add_style_override","name","stylebox:StyleBox"),&Control::add_style_override); + ClassDB::bind_method(_MD("add_font_override","name","font:Font"),&Control::add_font_override); + ClassDB::bind_method(_MD("add_color_override","name","color"),&Control::add_color_override); + ClassDB::bind_method(_MD("add_constant_override","name","constant"),&Control::add_constant_override); - ObjectTypeDB::bind_method(_MD("get_icon:Texture","name","type"),&Control::get_icon,DEFVAL("")); - ObjectTypeDB::bind_method(_MD("get_stylebox:StyleBox","name","type"),&Control::get_stylebox,DEFVAL("")); - ObjectTypeDB::bind_method(_MD("get_font:Font","name","type"),&Control::get_font,DEFVAL("")); - ObjectTypeDB::bind_method(_MD("get_color","name","type"),&Control::get_color,DEFVAL("")); - ObjectTypeDB::bind_method(_MD("get_constant","name","type"),&Control::get_constant,DEFVAL("")); + ClassDB::bind_method(_MD("get_icon:Texture","name","type"),&Control::get_icon,DEFVAL("")); + ClassDB::bind_method(_MD("get_stylebox:StyleBox","name","type"),&Control::get_stylebox,DEFVAL("")); + ClassDB::bind_method(_MD("get_font:Font","name","type"),&Control::get_font,DEFVAL("")); + ClassDB::bind_method(_MD("get_color","name","type"),&Control::get_color,DEFVAL("")); + ClassDB::bind_method(_MD("get_constant","name","type"),&Control::get_constant,DEFVAL("")); - ObjectTypeDB::bind_method(_MD("has_icon_override", "name"), &Control::has_icon_override); - ObjectTypeDB::bind_method(_MD("has_stylebox_override", "name"), &Control::has_stylebox_override); - ObjectTypeDB::bind_method(_MD("has_font_override", "name"), &Control::has_font_override); - ObjectTypeDB::bind_method(_MD("has_color_override", "name"), &Control::has_color_override); - ObjectTypeDB::bind_method(_MD("has_constant_override", "name"), &Control::has_constant_override); + ClassDB::bind_method(_MD("has_icon_override", "name"), &Control::has_icon_override); + ClassDB::bind_method(_MD("has_stylebox_override", "name"), &Control::has_stylebox_override); + ClassDB::bind_method(_MD("has_font_override", "name"), &Control::has_font_override); + ClassDB::bind_method(_MD("has_color_override", "name"), &Control::has_color_override); + ClassDB::bind_method(_MD("has_constant_override", "name"), &Control::has_constant_override); - ObjectTypeDB::bind_method(_MD("has_icon", "name", "type"), &Control::has_icon, DEFVAL("")); - ObjectTypeDB::bind_method(_MD("has_stylebox", "name", "type"), &Control::has_stylebox, DEFVAL("")); - ObjectTypeDB::bind_method(_MD("has_font", "name", "type"), &Control::has_font, DEFVAL("")); - ObjectTypeDB::bind_method(_MD("has_color", "name", "type"), &Control::has_color, DEFVAL("")); - ObjectTypeDB::bind_method(_MD("has_constant", "name", "type"), &Control::has_constant, DEFVAL("")); + ClassDB::bind_method(_MD("has_icon", "name", "type"), &Control::has_icon, DEFVAL("")); + ClassDB::bind_method(_MD("has_stylebox", "name", "type"), &Control::has_stylebox, DEFVAL("")); + ClassDB::bind_method(_MD("has_font", "name", "type"), &Control::has_font, DEFVAL("")); + ClassDB::bind_method(_MD("has_color", "name", "type"), &Control::has_color, DEFVAL("")); + ClassDB::bind_method(_MD("has_constant", "name", "type"), &Control::has_constant, DEFVAL("")); - ObjectTypeDB::bind_method(_MD("get_parent_control:Control"),&Control::get_parent_control); + ClassDB::bind_method(_MD("get_parent_control:Control"),&Control::get_parent_control); - ObjectTypeDB::bind_method(_MD("set_tooltip","tooltip"),&Control::set_tooltip); - ObjectTypeDB::bind_method(_MD("get_tooltip","atpos"),&Control::get_tooltip,DEFVAL(Point2())); - ObjectTypeDB::bind_method(_MD("_get_tooltip"),&Control::_get_tooltip); + ClassDB::bind_method(_MD("set_tooltip","tooltip"),&Control::set_tooltip); + ClassDB::bind_method(_MD("get_tooltip","atpos"),&Control::get_tooltip,DEFVAL(Point2())); + ClassDB::bind_method(_MD("_get_tooltip"),&Control::_get_tooltip); - ObjectTypeDB::bind_method(_MD("set_default_cursor_shape","shape"),&Control::set_default_cursor_shape); - ObjectTypeDB::bind_method(_MD("get_default_cursor_shape"),&Control::get_default_cursor_shape); - ObjectTypeDB::bind_method(_MD("get_cursor_shape","pos"),&Control::get_cursor_shape,DEFVAL(Point2())); + ClassDB::bind_method(_MD("set_default_cursor_shape","shape"),&Control::set_default_cursor_shape); + ClassDB::bind_method(_MD("get_default_cursor_shape"),&Control::get_default_cursor_shape); + ClassDB::bind_method(_MD("get_cursor_shape","pos"),&Control::get_cursor_shape,DEFVAL(Point2())); - ObjectTypeDB::bind_method(_MD("set_focus_neighbour","margin","neighbour"),&Control::set_focus_neighbour); - ObjectTypeDB::bind_method(_MD("get_focus_neighbour","margin"),&Control::get_focus_neighbour); + ClassDB::bind_method(_MD("set_focus_neighbour","margin","neighbour"),&Control::set_focus_neighbour); + ClassDB::bind_method(_MD("get_focus_neighbour","margin"),&Control::get_focus_neighbour); - ObjectTypeDB::bind_method(_MD("set_ignore_mouse","ignore"),&Control::set_ignore_mouse); - ObjectTypeDB::bind_method(_MD("is_ignoring_mouse"),&Control::is_ignoring_mouse); + ClassDB::bind_method(_MD("set_ignore_mouse","ignore"),&Control::set_ignore_mouse); + ClassDB::bind_method(_MD("is_ignoring_mouse"),&Control::is_ignoring_mouse); - ObjectTypeDB::bind_method(_MD("force_drag","data","preview"),&Control::force_drag); + ClassDB::bind_method(_MD("force_drag","data","preview"),&Control::force_drag); - ObjectTypeDB::bind_method(_MD("set_stop_mouse","stop"),&Control::set_stop_mouse); - ObjectTypeDB::bind_method(_MD("is_stopping_mouse"),&Control::is_stopping_mouse); + ClassDB::bind_method(_MD("set_stop_mouse","stop"),&Control::set_stop_mouse); + ClassDB::bind_method(_MD("is_stopping_mouse"),&Control::is_stopping_mouse); - ObjectTypeDB::bind_method(_MD("grab_click_focus"),&Control::grab_click_focus); + ClassDB::bind_method(_MD("grab_click_focus"),&Control::grab_click_focus); - ObjectTypeDB::bind_method(_MD("set_drag_forwarding","target:Control"),&Control::set_drag_forwarding); - ObjectTypeDB::bind_method(_MD("set_drag_preview","control:Control"),&Control::set_drag_preview); + ClassDB::bind_method(_MD("set_drag_forwarding","target:Control"),&Control::set_drag_forwarding); + ClassDB::bind_method(_MD("set_drag_preview","control:Control"),&Control::set_drag_preview); - ObjectTypeDB::bind_method(_MD("warp_mouse","to_pos"),&Control::warp_mouse); + ClassDB::bind_method(_MD("warp_mouse","to_pos"),&Control::warp_mouse); - ObjectTypeDB::bind_method(_MD("minimum_size_changed"), &Control::minimum_size_changed); + ClassDB::bind_method(_MD("minimum_size_changed"), &Control::minimum_size_changed); - ObjectTypeDB::bind_method(_MD("_theme_changed"), &Control::_theme_changed); + ClassDB::bind_method(_MD("_theme_changed"), &Control::_theme_changed); - ObjectTypeDB::bind_method(_MD("_font_changed"), &Control::_font_changed); + ClassDB::bind_method(_MD("_font_changed"), &Control::_font_changed); BIND_VMETHOD(MethodInfo("_input_event",PropertyInfo(Variant::INPUT_EVENT,"event"))); BIND_VMETHOD(MethodInfo(Variant::VECTOR2,"get_minimum_size")); diff --git a/scene/gui/control.h b/scene/gui/control.h index 58aaa6d4f8..e19523a05b 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -46,7 +46,7 @@ class Panel; class Control : public CanvasItem { - OBJ_TYPE( Control, CanvasItem ); + GDCLASS( Control, CanvasItem ); OBJ_CATEGORY("GUI Nodes"); public: diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index ae5a51c3c5..01e2f352dd 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -141,11 +141,11 @@ TextureButton *WindowDialog::get_close_button() { void WindowDialog::_bind_methods() { - ObjectTypeDB::bind_method( _MD("_input_event"),&WindowDialog::_input_event); - ObjectTypeDB::bind_method( _MD("set_title","title"),&WindowDialog::set_title); - ObjectTypeDB::bind_method( _MD("get_title"),&WindowDialog::get_title); - ObjectTypeDB::bind_method( _MD("_closed"),&WindowDialog::_closed); - ObjectTypeDB::bind_method( _MD("get_close_button:TextureButton"),&WindowDialog::get_close_button); + ClassDB::bind_method( _MD("_input_event"),&WindowDialog::_input_event); + ClassDB::bind_method( _MD("set_title","title"),&WindowDialog::set_title); + ClassDB::bind_method( _MD("get_title"),&WindowDialog::get_title); + ClassDB::bind_method( _MD("_closed"),&WindowDialog::_closed); + ClassDB::bind_method( _MD("get_close_button:TextureButton"),&WindowDialog::get_close_button); ADD_PROPERTY( PropertyInfo(Variant::STRING,"window/title",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_title"),_SCS("get_title")); } @@ -359,19 +359,19 @@ Button* AcceptDialog::add_cancel(const String &p_cancel) { void AcceptDialog::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_ok"),&AcceptDialog::_ok_pressed); - ObjectTypeDB::bind_method(_MD("get_ok"),&AcceptDialog::get_ok); - ObjectTypeDB::bind_method(_MD("get_label"),&AcceptDialog::get_label); - ObjectTypeDB::bind_method(_MD("set_hide_on_ok","enabled"),&AcceptDialog::set_hide_on_ok); - ObjectTypeDB::bind_method(_MD("get_hide_on_ok"),&AcceptDialog::get_hide_on_ok); - ObjectTypeDB::bind_method(_MD("add_button:Button","text","right","action"),&AcceptDialog::add_button,DEFVAL(false),DEFVAL("")); - ObjectTypeDB::bind_method(_MD("add_cancel:Button","name"),&AcceptDialog::add_cancel); - ObjectTypeDB::bind_method(_MD("_builtin_text_entered"),&AcceptDialog::_builtin_text_entered); - ObjectTypeDB::bind_method(_MD("register_text_enter:LineEdit","line_edit"),&AcceptDialog::register_text_enter); - ObjectTypeDB::bind_method(_MD("_custom_action"),&AcceptDialog::_custom_action); - ObjectTypeDB::bind_method(_MD("set_text","text"),&AcceptDialog::set_text); - ObjectTypeDB::bind_method(_MD("get_text"),&AcceptDialog::get_text); - ObjectTypeDB::bind_method(_MD("set_child_rect","child:Control"),&AcceptDialog::set_child_rect); + ClassDB::bind_method(_MD("_ok"),&AcceptDialog::_ok_pressed); + ClassDB::bind_method(_MD("get_ok"),&AcceptDialog::get_ok); + ClassDB::bind_method(_MD("get_label"),&AcceptDialog::get_label); + ClassDB::bind_method(_MD("set_hide_on_ok","enabled"),&AcceptDialog::set_hide_on_ok); + ClassDB::bind_method(_MD("get_hide_on_ok"),&AcceptDialog::get_hide_on_ok); + ClassDB::bind_method(_MD("add_button:Button","text","right","action"),&AcceptDialog::add_button,DEFVAL(false),DEFVAL("")); + ClassDB::bind_method(_MD("add_cancel:Button","name"),&AcceptDialog::add_cancel); + ClassDB::bind_method(_MD("_builtin_text_entered"),&AcceptDialog::_builtin_text_entered); + ClassDB::bind_method(_MD("register_text_enter:LineEdit","line_edit"),&AcceptDialog::register_text_enter); + ClassDB::bind_method(_MD("_custom_action"),&AcceptDialog::_custom_action); + ClassDB::bind_method(_MD("set_text","text"),&AcceptDialog::set_text); + ClassDB::bind_method(_MD("get_text"),&AcceptDialog::get_text); + ClassDB::bind_method(_MD("set_child_rect","child:Control"),&AcceptDialog::set_child_rect); ADD_SIGNAL( MethodInfo("confirmed") ); ADD_SIGNAL( MethodInfo("custom_action",PropertyInfo(Variant::STRING,"action")) ); @@ -429,7 +429,7 @@ AcceptDialog::~AcceptDialog() void ConfirmationDialog::_bind_methods() { - ObjectTypeDB::bind_method(_MD("get_cancel:Button"),&ConfirmationDialog::get_cancel); + ClassDB::bind_method(_MD("get_cancel:Button"),&ConfirmationDialog::get_cancel); } Button *ConfirmationDialog::get_cancel() { diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index 2278ce0266..30a69634f3 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -42,7 +42,7 @@ class WindowDialog : public Popup { - OBJ_TYPE(WindowDialog,Popup); + GDCLASS(WindowDialog,Popup); TextureButton *close_button; String title; @@ -73,7 +73,7 @@ public: class PopupDialog : public Popup { - OBJ_TYPE(PopupDialog,Popup); + GDCLASS(PopupDialog,Popup); protected: void _notification(int p_what); @@ -89,7 +89,7 @@ class LineEdit; class AcceptDialog : public WindowDialog { - OBJ_TYPE(AcceptDialog,WindowDialog); + GDCLASS(AcceptDialog,WindowDialog); Control *child; HBoxContainer *hbc; @@ -150,7 +150,7 @@ public: class ConfirmationDialog : public AcceptDialog { - OBJ_TYPE(ConfirmationDialog,AcceptDialog); + GDCLASS(ConfirmationDialog,AcceptDialog); Button *cancel; protected: static void _bind_methods(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index fefac47830..4fe65fad75 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -686,41 +686,41 @@ bool FileDialog::default_show_hidden_files=false; void FileDialog::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_unhandled_input"),&FileDialog::_unhandled_input); - - 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("set_filters","filters"),&FileDialog::set_filters); - ObjectTypeDB::bind_method(_MD("get_filters"),&FileDialog::get_filters); - 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","show"),&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); + ClassDB::bind_method(_MD("_unhandled_input"),&FileDialog::_unhandled_input); + + ClassDB::bind_method(_MD("_tree_selected"),&FileDialog::_tree_selected); + ClassDB::bind_method(_MD("_tree_db_selected"),&FileDialog::_tree_dc_selected); + ClassDB::bind_method(_MD("_dir_entered"),&FileDialog::_dir_entered); + ClassDB::bind_method(_MD("_file_entered"),&FileDialog::_file_entered); + ClassDB::bind_method(_MD("_action_pressed"),&FileDialog::_action_pressed); + ClassDB::bind_method(_MD("_cancel_pressed"),&FileDialog::_cancel_pressed); + ClassDB::bind_method(_MD("_filter_selected"),&FileDialog::_filter_selected); + ClassDB::bind_method(_MD("_save_confirm_pressed"),&FileDialog::_save_confirm_pressed); + + ClassDB::bind_method(_MD("clear_filters"),&FileDialog::clear_filters); + ClassDB::bind_method(_MD("add_filter","filter"),&FileDialog::add_filter); + ClassDB::bind_method(_MD("set_filters","filters"),&FileDialog::set_filters); + ClassDB::bind_method(_MD("get_filters"),&FileDialog::get_filters); + ClassDB::bind_method(_MD("get_current_dir"),&FileDialog::get_current_dir); + ClassDB::bind_method(_MD("get_current_file"),&FileDialog::get_current_file); + ClassDB::bind_method(_MD("get_current_path"),&FileDialog::get_current_path); + ClassDB::bind_method(_MD("set_current_dir","dir"),&FileDialog::set_current_dir); + ClassDB::bind_method(_MD("set_current_file","file"),&FileDialog::set_current_file); + ClassDB::bind_method(_MD("set_current_path","path"),&FileDialog::set_current_path); + ClassDB::bind_method(_MD("set_mode","mode"),&FileDialog::set_mode); + ClassDB::bind_method(_MD("get_mode"),&FileDialog::get_mode); + ClassDB::bind_method(_MD("get_vbox:VBoxContainer"),&FileDialog::get_vbox); + ClassDB::bind_method(_MD("set_access","access"),&FileDialog::set_access); + ClassDB::bind_method(_MD("get_access"),&FileDialog::get_access); + ClassDB::bind_method(_MD("set_show_hidden_files","show"),&FileDialog::set_show_hidden_files); + ClassDB::bind_method(_MD("is_showing_hidden_files"),&FileDialog::is_showing_hidden_files); + ClassDB::bind_method(_MD("_select_drive"),&FileDialog::_select_drive); + ClassDB::bind_method(_MD("_make_dir"),&FileDialog::_make_dir); + ClassDB::bind_method(_MD("_make_dir_confirm"),&FileDialog::_make_dir_confirm); + ClassDB::bind_method(_MD("_update_file_list"),&FileDialog::update_file_list); + ClassDB::bind_method(_MD("_update_dir"),&FileDialog::update_dir); + + ClassDB::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"))); @@ -868,11 +868,11 @@ FileDialog::~FileDialog() { void LineEditFileChooser::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_browse"),&LineEditFileChooser::_browse); - ObjectTypeDB::bind_method(_MD("_chosen"),&LineEditFileChooser::_chosen); - ObjectTypeDB::bind_method(_MD("get_button:Button"),&LineEditFileChooser::get_button); - ObjectTypeDB::bind_method(_MD("get_line_edit:LineEdit"),&LineEditFileChooser::get_line_edit); - ObjectTypeDB::bind_method(_MD("get_file_dialog:FileDialog"),&LineEditFileChooser::get_file_dialog); + ClassDB::bind_method(_MD("_browse"),&LineEditFileChooser::_browse); + ClassDB::bind_method(_MD("_chosen"),&LineEditFileChooser::_chosen); + ClassDB::bind_method(_MD("get_button:Button"),&LineEditFileChooser::get_button); + ClassDB::bind_method(_MD("get_line_edit:LineEdit"),&LineEditFileChooser::get_line_edit); + ClassDB::bind_method(_MD("get_file_dialog:FileDialog"),&LineEditFileChooser::get_file_dialog); } diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index 2f57771a84..653b38e40d 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -42,7 +42,7 @@ */ class FileDialog : public ConfirmationDialog { - OBJ_TYPE( FileDialog, ConfirmationDialog ); + GDCLASS( FileDialog, ConfirmationDialog ); public: @@ -167,7 +167,7 @@ public: class LineEditFileChooser : public HBoxContainer { - OBJ_TYPE( LineEditFileChooser, HBoxContainer ); + GDCLASS( LineEditFileChooser, HBoxContainer ); Button *button; LineEdit *line_edit; FileDialog *dialog; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 30a56662f6..b7fb64b400 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -1202,44 +1202,44 @@ void GraphEdit::_snap_value_changed(double) { void GraphEdit::_bind_methods() { - ObjectTypeDB::bind_method(_MD("connect_node:Error","from","from_port","to","to_port"),&GraphEdit::connect_node); - ObjectTypeDB::bind_method(_MD("is_node_connected","from","from_port","to","to_port"),&GraphEdit::is_node_connected); - ObjectTypeDB::bind_method(_MD("disconnect_node","from","from_port","to","to_port"),&GraphEdit::disconnect_node); - ObjectTypeDB::bind_method(_MD("get_connection_list"),&GraphEdit::_get_connection_list); - ObjectTypeDB::bind_method(_MD("get_scroll_ofs"),&GraphEdit::get_scroll_ofs); - ObjectTypeDB::bind_method(_MD("set_scroll_ofs","ofs"),&GraphEdit::set_scroll_ofs); + ClassDB::bind_method(_MD("connect_node:Error","from","from_port","to","to_port"),&GraphEdit::connect_node); + ClassDB::bind_method(_MD("is_node_connected","from","from_port","to","to_port"),&GraphEdit::is_node_connected); + ClassDB::bind_method(_MD("disconnect_node","from","from_port","to","to_port"),&GraphEdit::disconnect_node); + ClassDB::bind_method(_MD("get_connection_list"),&GraphEdit::_get_connection_list); + ClassDB::bind_method(_MD("get_scroll_ofs"),&GraphEdit::get_scroll_ofs); + ClassDB::bind_method(_MD("set_scroll_ofs","ofs"),&GraphEdit::set_scroll_ofs); - ObjectTypeDB::bind_method(_MD("set_zoom","p_zoom"),&GraphEdit::set_zoom); - ObjectTypeDB::bind_method(_MD("get_zoom"),&GraphEdit::get_zoom); + ClassDB::bind_method(_MD("set_zoom","p_zoom"),&GraphEdit::set_zoom); + ClassDB::bind_method(_MD("get_zoom"),&GraphEdit::get_zoom); - ObjectTypeDB::bind_method(_MD("set_snap","pixels"),&GraphEdit::set_snap); - ObjectTypeDB::bind_method(_MD("get_snap"),&GraphEdit::get_snap); + ClassDB::bind_method(_MD("set_snap","pixels"),&GraphEdit::set_snap); + ClassDB::bind_method(_MD("get_snap"),&GraphEdit::get_snap); - ObjectTypeDB::bind_method(_MD("set_use_snap","enable"),&GraphEdit::set_use_snap); - ObjectTypeDB::bind_method(_MD("is_using_snap"),&GraphEdit::is_using_snap); + ClassDB::bind_method(_MD("set_use_snap","enable"),&GraphEdit::set_use_snap); + ClassDB::bind_method(_MD("is_using_snap"),&GraphEdit::is_using_snap); - ObjectTypeDB::bind_method(_MD("set_right_disconnects","enable"),&GraphEdit::set_right_disconnects); - ObjectTypeDB::bind_method(_MD("is_right_disconnects_enabled"),&GraphEdit::is_right_disconnects_enabled); + ClassDB::bind_method(_MD("set_right_disconnects","enable"),&GraphEdit::set_right_disconnects); + ClassDB::bind_method(_MD("is_right_disconnects_enabled"),&GraphEdit::is_right_disconnects_enabled); - ObjectTypeDB::bind_method(_MD("_graph_node_moved"),&GraphEdit::_graph_node_moved); - ObjectTypeDB::bind_method(_MD("_graph_node_raised"),&GraphEdit::_graph_node_raised); + ClassDB::bind_method(_MD("_graph_node_moved"),&GraphEdit::_graph_node_moved); + ClassDB::bind_method(_MD("_graph_node_raised"),&GraphEdit::_graph_node_raised); - ObjectTypeDB::bind_method(_MD("_top_layer_input"),&GraphEdit::_top_layer_input); - ObjectTypeDB::bind_method(_MD("_top_layer_draw"),&GraphEdit::_top_layer_draw); - ObjectTypeDB::bind_method(_MD("_scroll_moved"),&GraphEdit::_scroll_moved); - ObjectTypeDB::bind_method(_MD("_zoom_minus"),&GraphEdit::_zoom_minus); - ObjectTypeDB::bind_method(_MD("_zoom_reset"),&GraphEdit::_zoom_reset); - ObjectTypeDB::bind_method(_MD("_zoom_plus"),&GraphEdit::_zoom_plus); - ObjectTypeDB::bind_method(_MD("_snap_toggled"),&GraphEdit::_snap_toggled); - ObjectTypeDB::bind_method(_MD("_snap_value_changed"),&GraphEdit::_snap_value_changed); + ClassDB::bind_method(_MD("_top_layer_input"),&GraphEdit::_top_layer_input); + ClassDB::bind_method(_MD("_top_layer_draw"),&GraphEdit::_top_layer_draw); + ClassDB::bind_method(_MD("_scroll_moved"),&GraphEdit::_scroll_moved); + ClassDB::bind_method(_MD("_zoom_minus"),&GraphEdit::_zoom_minus); + ClassDB::bind_method(_MD("_zoom_reset"),&GraphEdit::_zoom_reset); + ClassDB::bind_method(_MD("_zoom_plus"),&GraphEdit::_zoom_plus); + ClassDB::bind_method(_MD("_snap_toggled"),&GraphEdit::_snap_toggled); + ClassDB::bind_method(_MD("_snap_value_changed"),&GraphEdit::_snap_value_changed); - ObjectTypeDB::bind_method(_MD("_input_event"),&GraphEdit::_input_event); - ObjectTypeDB::bind_method(_MD("_update_scroll_offset"),&GraphEdit::_update_scroll_offset); - ObjectTypeDB::bind_method(_MD("_connections_layer_draw"),&GraphEdit::_connections_layer_draw); + ClassDB::bind_method(_MD("_input_event"),&GraphEdit::_input_event); + ClassDB::bind_method(_MD("_update_scroll_offset"),&GraphEdit::_update_scroll_offset); + ClassDB::bind_method(_MD("_connections_layer_draw"),&GraphEdit::_connections_layer_draw); - ObjectTypeDB::bind_method(_MD("set_selected","node"),&GraphEdit::set_selected); + ClassDB::bind_method(_MD("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"))); diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index 335fa7f952..9b2774590f 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -40,7 +40,7 @@ class GraphEdit; class GraphEditFilter : public Control { - OBJ_TYPE(GraphEditFilter,Control); + GDCLASS(GraphEditFilter,Control); friend class GraphEdit; GraphEdit *ge; @@ -54,7 +54,7 @@ public: class GraphEdit : public Control { - OBJ_TYPE(GraphEdit,Control); + GDCLASS(GraphEdit,Control); public: struct Connection { diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 441676f47a..e0f786e755 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -722,50 +722,50 @@ bool GraphNode::is_resizeable() const{ void GraphNode::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_title","title"),&GraphNode::set_title); - ObjectTypeDB::bind_method(_MD("get_title"),&GraphNode::get_title); - ObjectTypeDB::bind_method(_MD("_input_event"),&GraphNode::_input_event); - - ObjectTypeDB::bind_method(_MD("set_slot","idx","enable_left","type_left","color_left","enable_right","type_right","color_right","custom_left","custom_right"),&GraphNode::set_slot,DEFVAL(Ref<Texture>()),DEFVAL(Ref<Texture>())); - ObjectTypeDB::bind_method(_MD("clear_slot","idx"),&GraphNode::clear_slot); - ObjectTypeDB::bind_method(_MD("clear_all_slots","idx"),&GraphNode::clear_all_slots); - ObjectTypeDB::bind_method(_MD("is_slot_enabled_left","idx"),&GraphNode::is_slot_enabled_left); - ObjectTypeDB::bind_method(_MD("get_slot_type_left","idx"),&GraphNode::get_slot_type_left); - ObjectTypeDB::bind_method(_MD("get_slot_color_left","idx"),&GraphNode::get_slot_color_left); - ObjectTypeDB::bind_method(_MD("is_slot_enabled_right","idx"),&GraphNode::is_slot_enabled_right); - ObjectTypeDB::bind_method(_MD("get_slot_type_right","idx"),&GraphNode::get_slot_type_right); - ObjectTypeDB::bind_method(_MD("get_slot_color_right","idx"),&GraphNode::get_slot_color_right); - - ObjectTypeDB::bind_method(_MD("set_offset","offset"),&GraphNode::set_offset); - ObjectTypeDB::bind_method(_MD("get_offset"),&GraphNode::get_offset); - - ObjectTypeDB::bind_method(_MD("set_comment","comment"),&GraphNode::set_comment); - ObjectTypeDB::bind_method(_MD("is_comment"),&GraphNode::is_comment); - - ObjectTypeDB::bind_method(_MD("set_resizeable","resizeable"),&GraphNode::set_resizeable); - ObjectTypeDB::bind_method(_MD("is_resizeable"),&GraphNode::is_resizeable); - - ObjectTypeDB::bind_method(_MD("set_selected","selected"),&GraphNode::set_selected); - ObjectTypeDB::bind_method(_MD("is_selected"),&GraphNode::is_selected); - - ObjectTypeDB::bind_method(_MD("get_connection_output_count"),&GraphNode::get_connection_output_count); - ObjectTypeDB::bind_method(_MD("get_connection_input_count"),&GraphNode::get_connection_input_count); - - ObjectTypeDB::bind_method(_MD("get_connection_output_pos","idx"),&GraphNode::get_connection_output_pos); - ObjectTypeDB::bind_method(_MD("get_connection_output_type","idx"),&GraphNode::get_connection_output_type); - ObjectTypeDB::bind_method(_MD("get_connection_output_color","idx"),&GraphNode::get_connection_output_color); - ObjectTypeDB::bind_method(_MD("get_connection_input_pos","idx"),&GraphNode::get_connection_input_pos); - ObjectTypeDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type); - ObjectTypeDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color); - - ObjectTypeDB::bind_method(_MD("set_modulate","color"),&GraphNode::set_modulate); - ObjectTypeDB::bind_method(_MD("get_modulate"),&GraphNode::get_modulate); - - ObjectTypeDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button); - ObjectTypeDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible); - - ObjectTypeDB::bind_method(_MD("set_overlay","overlay"),&GraphNode::set_overlay); - ObjectTypeDB::bind_method(_MD("get_overlay"),&GraphNode::get_overlay); + ClassDB::bind_method(_MD("set_title","title"),&GraphNode::set_title); + ClassDB::bind_method(_MD("get_title"),&GraphNode::get_title); + ClassDB::bind_method(_MD("_input_event"),&GraphNode::_input_event); + + ClassDB::bind_method(_MD("set_slot","idx","enable_left","type_left","color_left","enable_right","type_right","color_right","custom_left","custom_right"),&GraphNode::set_slot,DEFVAL(Ref<Texture>()),DEFVAL(Ref<Texture>())); + ClassDB::bind_method(_MD("clear_slot","idx"),&GraphNode::clear_slot); + ClassDB::bind_method(_MD("clear_all_slots","idx"),&GraphNode::clear_all_slots); + ClassDB::bind_method(_MD("is_slot_enabled_left","idx"),&GraphNode::is_slot_enabled_left); + ClassDB::bind_method(_MD("get_slot_type_left","idx"),&GraphNode::get_slot_type_left); + ClassDB::bind_method(_MD("get_slot_color_left","idx"),&GraphNode::get_slot_color_left); + ClassDB::bind_method(_MD("is_slot_enabled_right","idx"),&GraphNode::is_slot_enabled_right); + ClassDB::bind_method(_MD("get_slot_type_right","idx"),&GraphNode::get_slot_type_right); + ClassDB::bind_method(_MD("get_slot_color_right","idx"),&GraphNode::get_slot_color_right); + + ClassDB::bind_method(_MD("set_offset","offset"),&GraphNode::set_offset); + ClassDB::bind_method(_MD("get_offset"),&GraphNode::get_offset); + + ClassDB::bind_method(_MD("set_comment","comment"),&GraphNode::set_comment); + ClassDB::bind_method(_MD("is_comment"),&GraphNode::is_comment); + + ClassDB::bind_method(_MD("set_resizeable","resizeable"),&GraphNode::set_resizeable); + ClassDB::bind_method(_MD("is_resizeable"),&GraphNode::is_resizeable); + + ClassDB::bind_method(_MD("set_selected","selected"),&GraphNode::set_selected); + ClassDB::bind_method(_MD("is_selected"),&GraphNode::is_selected); + + ClassDB::bind_method(_MD("get_connection_output_count"),&GraphNode::get_connection_output_count); + ClassDB::bind_method(_MD("get_connection_input_count"),&GraphNode::get_connection_input_count); + + ClassDB::bind_method(_MD("get_connection_output_pos","idx"),&GraphNode::get_connection_output_pos); + ClassDB::bind_method(_MD("get_connection_output_type","idx"),&GraphNode::get_connection_output_type); + ClassDB::bind_method(_MD("get_connection_output_color","idx"),&GraphNode::get_connection_output_color); + ClassDB::bind_method(_MD("get_connection_input_pos","idx"),&GraphNode::get_connection_input_pos); + ClassDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type); + ClassDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color); + + ClassDB::bind_method(_MD("set_modulate","color"),&GraphNode::set_modulate); + ClassDB::bind_method(_MD("get_modulate"),&GraphNode::get_modulate); + + ClassDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button); + ClassDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible); + + ClassDB::bind_method(_MD("set_overlay","overlay"),&GraphNode::set_overlay); + ClassDB::bind_method(_MD("get_overlay"),&GraphNode::get_overlay); ADD_PROPERTY( PropertyInfo(Variant::STRING,"title"),_SCS("set_title"),_SCS("get_title")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"show_close"),_SCS("set_show_close_button"),_SCS("is_close_button_visible")); diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index 0e9223d599..5d90a006e6 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -33,7 +33,7 @@ class GraphNode : public Container { - OBJ_TYPE(GraphNode,Container); + GDCLASS(GraphNode,Container); public: enum Overlay { diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index debc8e6f29..13cb972a19 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -170,8 +170,8 @@ int GridContainer::get_columns() const{ void GridContainer::_bind_methods(){ - ObjectTypeDB::bind_method(_MD("set_columns","columns"),&GridContainer::set_columns); - ObjectTypeDB::bind_method(_MD("get_columns"),&GridContainer::get_columns); + ClassDB::bind_method(_MD("set_columns","columns"),&GridContainer::set_columns); + ClassDB::bind_method(_MD("get_columns"),&GridContainer::get_columns); ADD_PROPERTY( PropertyInfo(Variant::INT,"columns",PROPERTY_HINT_RANGE,"1,1024,1"),_SCS("set_columns"),_SCS("get_columns")); } diff --git a/scene/gui/grid_container.h b/scene/gui/grid_container.h index 7cf7cb7117..cc1d04cdb2 100644 --- a/scene/gui/grid_container.h +++ b/scene/gui/grid_container.h @@ -33,7 +33,7 @@ class GridContainer : public Container { - OBJ_TYPE(GridContainer,Container); + GDCLASS(GridContainer,Container); int columns; protected: diff --git a/scene/gui/input_action.cpp b/scene/gui/input_action.cpp index c4e7a75298..501f39a7c2 100644 --- a/scene/gui/input_action.cpp +++ b/scene/gui/input_action.cpp @@ -109,13 +109,13 @@ bool ShortCut::is_valid() const { void ShortCut::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_shortcut","event"),&ShortCut::set_shortcut); - ObjectTypeDB::bind_method(_MD("get_shortcut"),&ShortCut::get_shortcut); + ClassDB::bind_method(_MD("set_shortcut","event"),&ShortCut::set_shortcut); + ClassDB::bind_method(_MD("get_shortcut"),&ShortCut::get_shortcut); - ObjectTypeDB::bind_method(_MD("is_valid"),&ShortCut::is_valid); + ClassDB::bind_method(_MD("is_valid"),&ShortCut::is_valid); - ObjectTypeDB::bind_method(_MD("is_shortcut","event"),&ShortCut::is_shortcut); - ObjectTypeDB::bind_method(_MD("get_as_text"),&ShortCut::get_as_text); + ClassDB::bind_method(_MD("is_shortcut","event"),&ShortCut::is_shortcut); + ClassDB::bind_method(_MD("get_as_text"),&ShortCut::get_as_text); ADD_PROPERTY(PropertyInfo(Variant::INPUT_EVENT,"shortcut"),_SCS("set_shortcut"),_SCS("get_shortcut")); } diff --git a/scene/gui/input_action.h b/scene/gui/input_action.h index 8e0e1ef0bd..a83b3a70cd 100644 --- a/scene/gui/input_action.h +++ b/scene/gui/input_action.h @@ -5,7 +5,7 @@ class ShortCut : public Resource { - OBJ_TYPE(ShortCut,Resource); + GDCLASS(ShortCut,Resource); InputEvent shortcut; protected: diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 22a4f133b4..af4751b1a8 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1285,83 +1285,83 @@ Vector<int> ItemList::get_selected_items() { void ItemList::_bind_methods(){ - ObjectTypeDB::bind_method(_MD("add_item","text","icon:Texture","selectable"),&ItemList::add_item,DEFVAL(Variant()),DEFVAL(true)); - ObjectTypeDB::bind_method(_MD("add_icon_item","icon:Texture","selectable"),&ItemList::add_icon_item,DEFVAL(true)); + ClassDB::bind_method(_MD("add_item","text","icon:Texture","selectable"),&ItemList::add_item,DEFVAL(Variant()),DEFVAL(true)); + ClassDB::bind_method(_MD("add_icon_item","icon:Texture","selectable"),&ItemList::add_icon_item,DEFVAL(true)); - ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&ItemList::set_item_text); - ObjectTypeDB::bind_method(_MD("get_item_text","idx"),&ItemList::get_item_text); + ClassDB::bind_method(_MD("set_item_text","idx","text"),&ItemList::set_item_text); + ClassDB::bind_method(_MD("get_item_text","idx"),&ItemList::get_item_text); - ObjectTypeDB::bind_method(_MD("set_item_icon","idx","icon:Texture"),&ItemList::set_item_icon); - ObjectTypeDB::bind_method(_MD("get_item_icon:Texture","idx"),&ItemList::get_item_icon); + ClassDB::bind_method(_MD("set_item_icon","idx","icon:Texture"),&ItemList::set_item_icon); + ClassDB::bind_method(_MD("get_item_icon:Texture","idx"),&ItemList::get_item_icon); - ObjectTypeDB::bind_method(_MD("set_item_icon_region","idx","rect"),&ItemList::set_item_icon_region); - ObjectTypeDB::bind_method(_MD("get_item_icon_region","idx"),&ItemList::get_item_icon_region); + ClassDB::bind_method(_MD("set_item_icon_region","idx","rect"),&ItemList::set_item_icon_region); + ClassDB::bind_method(_MD("get_item_icon_region","idx"),&ItemList::get_item_icon_region); - ObjectTypeDB::bind_method(_MD("set_item_selectable","idx","selectable"),&ItemList::set_item_selectable); - ObjectTypeDB::bind_method(_MD("is_item_selectable","idx"),&ItemList::is_item_selectable); + ClassDB::bind_method(_MD("set_item_selectable","idx","selectable"),&ItemList::set_item_selectable); + ClassDB::bind_method(_MD("is_item_selectable","idx"),&ItemList::is_item_selectable); - ObjectTypeDB::bind_method(_MD("set_item_disabled","idx","disabled"),&ItemList::set_item_disabled); - ObjectTypeDB::bind_method(_MD("is_item_disabled","idx"),&ItemList::is_item_disabled); + ClassDB::bind_method(_MD("set_item_disabled","idx","disabled"),&ItemList::set_item_disabled); + ClassDB::bind_method(_MD("is_item_disabled","idx"),&ItemList::is_item_disabled); - ObjectTypeDB::bind_method(_MD("set_item_metadata","idx","metadata"),&ItemList::set_item_metadata); - ObjectTypeDB::bind_method(_MD("get_item_metadata","idx"),&ItemList::get_item_metadata); + ClassDB::bind_method(_MD("set_item_metadata","idx","metadata"),&ItemList::set_item_metadata); + ClassDB::bind_method(_MD("get_item_metadata","idx"),&ItemList::get_item_metadata); - ObjectTypeDB::bind_method(_MD("set_item_custom_bg_color","idx","custom_bg_color"),&ItemList::set_item_custom_bg_color); - ObjectTypeDB::bind_method(_MD("get_item_custom_bg_color","idx"),&ItemList::get_item_custom_bg_color); + ClassDB::bind_method(_MD("set_item_custom_bg_color","idx","custom_bg_color"),&ItemList::set_item_custom_bg_color); + ClassDB::bind_method(_MD("get_item_custom_bg_color","idx"),&ItemList::get_item_custom_bg_color); - ObjectTypeDB::bind_method(_MD("set_item_tooltip_enabled","idx","enable"),&ItemList::set_item_tooltip_enabled); - ObjectTypeDB::bind_method(_MD("is_item_tooltip_enabled","idx"),&ItemList::is_item_tooltip_enabled); + ClassDB::bind_method(_MD("set_item_tooltip_enabled","idx","enable"),&ItemList::set_item_tooltip_enabled); + ClassDB::bind_method(_MD("is_item_tooltip_enabled","idx"),&ItemList::is_item_tooltip_enabled); - ObjectTypeDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&ItemList::set_item_tooltip); - ObjectTypeDB::bind_method(_MD("get_item_tooltip","idx"),&ItemList::get_item_tooltip); + ClassDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&ItemList::set_item_tooltip); + ClassDB::bind_method(_MD("get_item_tooltip","idx"),&ItemList::get_item_tooltip); - ObjectTypeDB::bind_method(_MD("select","idx","single"),&ItemList::select,DEFVAL(true)); - ObjectTypeDB::bind_method(_MD("unselect","idx"),&ItemList::unselect); - ObjectTypeDB::bind_method(_MD("is_selected","idx"),&ItemList::is_selected); - ObjectTypeDB::bind_method(_MD("get_selected_items"),&ItemList::get_selected_items); + ClassDB::bind_method(_MD("select","idx","single"),&ItemList::select,DEFVAL(true)); + ClassDB::bind_method(_MD("unselect","idx"),&ItemList::unselect); + ClassDB::bind_method(_MD("is_selected","idx"),&ItemList::is_selected); + ClassDB::bind_method(_MD("get_selected_items"),&ItemList::get_selected_items); - ObjectTypeDB::bind_method(_MD("get_item_count"),&ItemList::get_item_count); - ObjectTypeDB::bind_method(_MD("remove_item","idx"),&ItemList::remove_item); + ClassDB::bind_method(_MD("get_item_count"),&ItemList::get_item_count); + ClassDB::bind_method(_MD("remove_item","idx"),&ItemList::remove_item); - ObjectTypeDB::bind_method(_MD("clear"),&ItemList::clear); - ObjectTypeDB::bind_method(_MD("sort_items_by_text"),&ItemList::sort_items_by_text); + ClassDB::bind_method(_MD("clear"),&ItemList::clear); + ClassDB::bind_method(_MD("sort_items_by_text"),&ItemList::sort_items_by_text); - ObjectTypeDB::bind_method(_MD("set_fixed_column_width","width"),&ItemList::set_fixed_column_width); - ObjectTypeDB::bind_method(_MD("get_fixed_column_width"),&ItemList::get_fixed_column_width); + ClassDB::bind_method(_MD("set_fixed_column_width","width"),&ItemList::set_fixed_column_width); + ClassDB::bind_method(_MD("get_fixed_column_width"),&ItemList::get_fixed_column_width); - ObjectTypeDB::bind_method(_MD("set_same_column_width","enable"),&ItemList::set_same_column_width); - ObjectTypeDB::bind_method(_MD("is_same_column_width"),&ItemList::is_same_column_width); + ClassDB::bind_method(_MD("set_same_column_width","enable"),&ItemList::set_same_column_width); + ClassDB::bind_method(_MD("is_same_column_width"),&ItemList::is_same_column_width); - ObjectTypeDB::bind_method(_MD("set_max_text_lines","lines"),&ItemList::set_max_text_lines); - ObjectTypeDB::bind_method(_MD("get_max_text_lines"),&ItemList::get_max_text_lines); + ClassDB::bind_method(_MD("set_max_text_lines","lines"),&ItemList::set_max_text_lines); + ClassDB::bind_method(_MD("get_max_text_lines"),&ItemList::get_max_text_lines); - ObjectTypeDB::bind_method(_MD("set_max_columns","amount"),&ItemList::set_max_columns); - ObjectTypeDB::bind_method(_MD("get_max_columns"),&ItemList::get_max_columns); + ClassDB::bind_method(_MD("set_max_columns","amount"),&ItemList::set_max_columns); + ClassDB::bind_method(_MD("get_max_columns"),&ItemList::get_max_columns); - ObjectTypeDB::bind_method(_MD("set_select_mode","mode"),&ItemList::set_select_mode); - ObjectTypeDB::bind_method(_MD("get_select_mode"),&ItemList::get_select_mode); + ClassDB::bind_method(_MD("set_select_mode","mode"),&ItemList::set_select_mode); + ClassDB::bind_method(_MD("get_select_mode"),&ItemList::get_select_mode); - ObjectTypeDB::bind_method(_MD("set_icon_mode","mode"),&ItemList::set_icon_mode); - ObjectTypeDB::bind_method(_MD("get_icon_mode"),&ItemList::get_icon_mode); + ClassDB::bind_method(_MD("set_icon_mode","mode"),&ItemList::set_icon_mode); + ClassDB::bind_method(_MD("get_icon_mode"),&ItemList::get_icon_mode); - ObjectTypeDB::bind_method(_MD("set_fixed_icon_size","size"),&ItemList::set_fixed_icon_size); - ObjectTypeDB::bind_method(_MD("get_fixed_icon_size"),&ItemList::get_fixed_icon_size); + ClassDB::bind_method(_MD("set_fixed_icon_size","size"),&ItemList::set_fixed_icon_size); + ClassDB::bind_method(_MD("get_fixed_icon_size"),&ItemList::get_fixed_icon_size); - ObjectTypeDB::bind_method(_MD("set_icon_scale","scale"),&ItemList::set_icon_scale); - ObjectTypeDB::bind_method(_MD("get_icon_scale"),&ItemList::get_icon_scale); + ClassDB::bind_method(_MD("set_icon_scale","scale"),&ItemList::set_icon_scale); + ClassDB::bind_method(_MD("get_icon_scale"),&ItemList::get_icon_scale); - ObjectTypeDB::bind_method(_MD("set_allow_rmb_select","allow"),&ItemList::set_allow_rmb_select); - ObjectTypeDB::bind_method(_MD("get_allow_rmb_select"),&ItemList::get_allow_rmb_select); + ClassDB::bind_method(_MD("set_allow_rmb_select","allow"),&ItemList::set_allow_rmb_select); + ClassDB::bind_method(_MD("get_allow_rmb_select"),&ItemList::get_allow_rmb_select); - ObjectTypeDB::bind_method(_MD("get_item_at_pos","pos","exact"),&ItemList::get_item_at_pos,DEFVAL(false)); + ClassDB::bind_method(_MD("get_item_at_pos","pos","exact"),&ItemList::get_item_at_pos,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("ensure_current_is_visible"),&ItemList::ensure_current_is_visible); + ClassDB::bind_method(_MD("ensure_current_is_visible"),&ItemList::ensure_current_is_visible); - ObjectTypeDB::bind_method(_MD("get_v_scroll"),&ItemList::get_v_scroll); + ClassDB::bind_method(_MD("get_v_scroll"),&ItemList::get_v_scroll); - ObjectTypeDB::bind_method(_MD("_scroll_changed"),&ItemList::_scroll_changed); - ObjectTypeDB::bind_method(_MD("_input_event"),&ItemList::_input_event); + ClassDB::bind_method(_MD("_scroll_changed"),&ItemList::_scroll_changed); + ClassDB::bind_method(_MD("_input_event"),&ItemList::_input_event); BIND_CONSTANT( ICON_MODE_TOP ); BIND_CONSTANT( ICON_MODE_LEFT ); diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h index acafc88fb1..d3db209ceb 100644 --- a/scene/gui/item_list.h +++ b/scene/gui/item_list.h @@ -34,7 +34,7 @@ class ItemList : public Control { - OBJ_TYPE( ItemList, Control ); + GDCLASS( ItemList, Control ); public: enum IconMode { diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 29d40e0d5e..03a0219e98 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -641,30 +641,30 @@ int Label::get_total_character_count() const { void Label::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_align","align"),&Label::set_align); - ObjectTypeDB::bind_method(_MD("get_align"),&Label::get_align); - ObjectTypeDB::bind_method(_MD("set_valign","valign"),&Label::set_valign); - ObjectTypeDB::bind_method(_MD("get_valign"),&Label::get_valign); - ObjectTypeDB::bind_method(_MD("set_text","text"),&Label::set_text); - ObjectTypeDB::bind_method(_MD("get_text"),&Label::get_text); - ObjectTypeDB::bind_method(_MD("set_autowrap","enable"),&Label::set_autowrap); - ObjectTypeDB::bind_method(_MD("has_autowrap"),&Label::has_autowrap); - ObjectTypeDB::bind_method(_MD("set_clip_text","enable"),&Label::set_clip_text); - ObjectTypeDB::bind_method(_MD("is_clipping_text"),&Label::is_clipping_text); - ObjectTypeDB::bind_method(_MD("set_uppercase","enable"),&Label::set_uppercase); - ObjectTypeDB::bind_method(_MD("is_uppercase"),&Label::is_uppercase); - ObjectTypeDB::bind_method(_MD("get_line_height"),&Label::get_line_height); - ObjectTypeDB::bind_method(_MD("get_line_count"),&Label::get_line_count); - ObjectTypeDB::bind_method(_MD("get_visible_line_count"),&Label::get_visible_line_count); - ObjectTypeDB::bind_method(_MD("get_total_character_count"),&Label::get_total_character_count); - ObjectTypeDB::bind_method(_MD("set_visible_characters","amount"),&Label::set_visible_characters); - ObjectTypeDB::bind_method(_MD("get_visible_characters"),&Label::get_visible_characters); - ObjectTypeDB::bind_method(_MD("set_percent_visible","percent_visible"),&Label::set_percent_visible); - ObjectTypeDB::bind_method(_MD("get_percent_visible"),&Label::get_percent_visible); - ObjectTypeDB::bind_method(_MD("set_lines_skipped","lines_skipped"),&Label::set_lines_skipped); - ObjectTypeDB::bind_method(_MD("get_lines_skipped"),&Label::get_lines_skipped); - ObjectTypeDB::bind_method(_MD("set_max_lines_visible","lines_visible"),&Label::set_max_lines_visible); - ObjectTypeDB::bind_method(_MD("get_max_lines_visible"),&Label::get_max_lines_visible); + ClassDB::bind_method(_MD("set_align","align"),&Label::set_align); + ClassDB::bind_method(_MD("get_align"),&Label::get_align); + ClassDB::bind_method(_MD("set_valign","valign"),&Label::set_valign); + ClassDB::bind_method(_MD("get_valign"),&Label::get_valign); + ClassDB::bind_method(_MD("set_text","text"),&Label::set_text); + ClassDB::bind_method(_MD("get_text"),&Label::get_text); + ClassDB::bind_method(_MD("set_autowrap","enable"),&Label::set_autowrap); + ClassDB::bind_method(_MD("has_autowrap"),&Label::has_autowrap); + ClassDB::bind_method(_MD("set_clip_text","enable"),&Label::set_clip_text); + ClassDB::bind_method(_MD("is_clipping_text"),&Label::is_clipping_text); + ClassDB::bind_method(_MD("set_uppercase","enable"),&Label::set_uppercase); + ClassDB::bind_method(_MD("is_uppercase"),&Label::is_uppercase); + ClassDB::bind_method(_MD("get_line_height"),&Label::get_line_height); + ClassDB::bind_method(_MD("get_line_count"),&Label::get_line_count); + ClassDB::bind_method(_MD("get_visible_line_count"),&Label::get_visible_line_count); + ClassDB::bind_method(_MD("get_total_character_count"),&Label::get_total_character_count); + ClassDB::bind_method(_MD("set_visible_characters","amount"),&Label::set_visible_characters); + ClassDB::bind_method(_MD("get_visible_characters"),&Label::get_visible_characters); + ClassDB::bind_method(_MD("set_percent_visible","percent_visible"),&Label::set_percent_visible); + ClassDB::bind_method(_MD("get_percent_visible"),&Label::get_percent_visible); + ClassDB::bind_method(_MD("set_lines_skipped","lines_skipped"),&Label::set_lines_skipped); + ClassDB::bind_method(_MD("get_lines_skipped"),&Label::get_lines_skipped); + ClassDB::bind_method(_MD("set_max_lines_visible","lines_visible"),&Label::set_max_lines_visible); + ClassDB::bind_method(_MD("get_max_lines_visible"),&Label::get_max_lines_visible); BIND_CONSTANT( ALIGN_LEFT ); BIND_CONSTANT( ALIGN_CENTER ); diff --git a/scene/gui/label.h b/scene/gui/label.h index bd531f7c9c..8a166bbe52 100644 --- a/scene/gui/label.h +++ b/scene/gui/label.h @@ -35,7 +35,7 @@ */ class Label : public Control { - OBJ_TYPE( Label, Control ); + GDCLASS( Label, Control ); public: enum Align { diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index d6319cf15e..fa0e067ced 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1258,42 +1258,42 @@ void LineEdit::_text_changed() { void LineEdit::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_toggle_draw_caret"),&LineEdit::_toggle_draw_caret); + ClassDB::bind_method(_MD("_toggle_draw_caret"),&LineEdit::_toggle_draw_caret); #ifdef TOOLS_ENABLED - ObjectTypeDB::bind_method("_editor_settings_changed",&LineEdit::_editor_settings_changed); + ClassDB::bind_method("_editor_settings_changed",&LineEdit::_editor_settings_changed); #endif - ObjectTypeDB::bind_method(_MD("set_align", "align"), &LineEdit::set_align); - ObjectTypeDB::bind_method(_MD("get_align"), &LineEdit::get_align); - - ObjectTypeDB::bind_method(_MD("_input_event"),&LineEdit::_input_event); - ObjectTypeDB::bind_method(_MD("clear"),&LineEdit::clear); - ObjectTypeDB::bind_method(_MD("select_all"),&LineEdit::select_all); - ObjectTypeDB::bind_method(_MD("set_text","text"),&LineEdit::set_text); - ObjectTypeDB::bind_method(_MD("get_text"),&LineEdit::get_text); - ObjectTypeDB::bind_method(_MD("set_placeholder","text"),&LineEdit::set_placeholder); - ObjectTypeDB::bind_method(_MD("get_placeholder"),&LineEdit::get_placeholder); - ObjectTypeDB::bind_method(_MD("set_placeholder_alpha","alpha"),&LineEdit::set_placeholder_alpha); - ObjectTypeDB::bind_method(_MD("get_placeholder_alpha"),&LineEdit::get_placeholder_alpha); - ObjectTypeDB::bind_method(_MD("set_cursor_pos","pos"),&LineEdit::set_cursor_pos); - ObjectTypeDB::bind_method(_MD("get_cursor_pos"),&LineEdit::get_cursor_pos); - ObjectTypeDB::bind_method(_MD("set_expand_to_text_length","enabled"),&LineEdit::set_expand_to_text_length); - ObjectTypeDB::bind_method(_MD("get_expand_to_text_length"),&LineEdit::get_expand_to_text_length); - ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enabled"),&LineEdit::cursor_set_blink_enabled); - ObjectTypeDB::bind_method(_MD("cursor_get_blink_enabled"),&LineEdit::cursor_get_blink_enabled); - ObjectTypeDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&LineEdit::cursor_set_blink_speed); - ObjectTypeDB::bind_method(_MD("cursor_get_blink_speed"),&LineEdit::cursor_get_blink_speed); - ObjectTypeDB::bind_method(_MD("set_max_length","chars"),&LineEdit::set_max_length); - ObjectTypeDB::bind_method(_MD("get_max_length"),&LineEdit::get_max_length); - ObjectTypeDB::bind_method(_MD("append_at_cursor","text"),&LineEdit::append_at_cursor); - ObjectTypeDB::bind_method(_MD("set_editable","enabled"),&LineEdit::set_editable); - ObjectTypeDB::bind_method(_MD("is_editable"),&LineEdit::is_editable); - ObjectTypeDB::bind_method(_MD("set_secret","enabled"),&LineEdit::set_secret); - ObjectTypeDB::bind_method(_MD("is_secret"),&LineEdit::is_secret); - ObjectTypeDB::bind_method(_MD("select","from","to"),&LineEdit::select,DEFVAL(0),DEFVAL(-1)); - ObjectTypeDB::bind_method(_MD("menu_option","option"),&LineEdit::menu_option); - ObjectTypeDB::bind_method(_MD("get_menu:PopupMenu"),&LineEdit::get_menu); + ClassDB::bind_method(_MD("set_align", "align"), &LineEdit::set_align); + ClassDB::bind_method(_MD("get_align"), &LineEdit::get_align); + + ClassDB::bind_method(_MD("_input_event"),&LineEdit::_input_event); + ClassDB::bind_method(_MD("clear"),&LineEdit::clear); + ClassDB::bind_method(_MD("select_all"),&LineEdit::select_all); + ClassDB::bind_method(_MD("set_text","text"),&LineEdit::set_text); + ClassDB::bind_method(_MD("get_text"),&LineEdit::get_text); + ClassDB::bind_method(_MD("set_placeholder","text"),&LineEdit::set_placeholder); + ClassDB::bind_method(_MD("get_placeholder"),&LineEdit::get_placeholder); + ClassDB::bind_method(_MD("set_placeholder_alpha","alpha"),&LineEdit::set_placeholder_alpha); + ClassDB::bind_method(_MD("get_placeholder_alpha"),&LineEdit::get_placeholder_alpha); + ClassDB::bind_method(_MD("set_cursor_pos","pos"),&LineEdit::set_cursor_pos); + ClassDB::bind_method(_MD("get_cursor_pos"),&LineEdit::get_cursor_pos); + ClassDB::bind_method(_MD("set_expand_to_text_length","enabled"),&LineEdit::set_expand_to_text_length); + ClassDB::bind_method(_MD("get_expand_to_text_length"),&LineEdit::get_expand_to_text_length); + ClassDB::bind_method(_MD("cursor_set_blink_enabled", "enabled"),&LineEdit::cursor_set_blink_enabled); + ClassDB::bind_method(_MD("cursor_get_blink_enabled"),&LineEdit::cursor_get_blink_enabled); + ClassDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&LineEdit::cursor_set_blink_speed); + ClassDB::bind_method(_MD("cursor_get_blink_speed"),&LineEdit::cursor_get_blink_speed); + ClassDB::bind_method(_MD("set_max_length","chars"),&LineEdit::set_max_length); + ClassDB::bind_method(_MD("get_max_length"),&LineEdit::get_max_length); + ClassDB::bind_method(_MD("append_at_cursor","text"),&LineEdit::append_at_cursor); + ClassDB::bind_method(_MD("set_editable","enabled"),&LineEdit::set_editable); + ClassDB::bind_method(_MD("is_editable"),&LineEdit::is_editable); + ClassDB::bind_method(_MD("set_secret","enabled"),&LineEdit::set_secret); + ClassDB::bind_method(_MD("is_secret"),&LineEdit::is_secret); + ClassDB::bind_method(_MD("select","from","to"),&LineEdit::select,DEFVAL(0),DEFVAL(-1)); + ClassDB::bind_method(_MD("menu_option","option"),&LineEdit::menu_option); + ClassDB::bind_method(_MD("get_menu:PopupMenu"),&LineEdit::get_menu); ADD_SIGNAL( MethodInfo("text_changed", PropertyInfo( Variant::STRING, "text" )) ); ADD_SIGNAL( MethodInfo("text_entered", PropertyInfo( Variant::STRING, "text" )) ); diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index d97e234823..46ca472d6f 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -37,7 +37,7 @@ */ class LineEdit : public Control { - OBJ_TYPE( LineEdit, Control ); + GDCLASS( LineEdit, Control ); public: enum Align { diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index a547521ef9..5b791064a8 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -130,11 +130,11 @@ void LinkButton::_notification(int p_what) { void LinkButton::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_text","text"),&LinkButton::set_text); - ObjectTypeDB::bind_method(_MD("get_text"),&LinkButton::get_text); + ClassDB::bind_method(_MD("set_text","text"),&LinkButton::set_text); + ClassDB::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); + ClassDB::bind_method(_MD("set_underline_mode","underline_mode"),&LinkButton::set_underline_mode); + ClassDB::bind_method(_MD("get_underline_mode"),&LinkButton::get_underline_mode); BIND_CONSTANT( UNDERLINE_MODE_ALWAYS ); diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h index 992daf2564..42d7c05cff 100644 --- a/scene/gui/link_button.h +++ b/scene/gui/link_button.h @@ -35,7 +35,7 @@ class LinkButton : public BaseButton { - OBJ_TYPE( LinkButton, BaseButton ); + GDCLASS( LinkButton, BaseButton ); public: enum UnderlineMode { diff --git a/scene/gui/margin_container.h b/scene/gui/margin_container.h index 1959fcaecc..542578dd01 100644 --- a/scene/gui/margin_container.h +++ b/scene/gui/margin_container.h @@ -32,7 +32,7 @@ #include "scene/gui/container.h" class MarginContainer : public Container { - OBJ_TYPE(MarginContainer,Container); + GDCLASS(MarginContainer,Container); protected: void _notification(int p_what); diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 1ba54f2181..44d315eedc 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -100,10 +100,10 @@ void MenuButton::_set_items(const Array& p_items) { void MenuButton::_bind_methods() { - ObjectTypeDB::bind_method(_MD("get_popup:PopupMenu"),&MenuButton::get_popup); - ObjectTypeDB::bind_method(_MD("_unhandled_key_input"),&MenuButton::_unhandled_key_input); - ObjectTypeDB::bind_method(_MD("_set_items"),&MenuButton::_set_items); - ObjectTypeDB::bind_method(_MD("_get_items"),&MenuButton::_get_items); + ClassDB::bind_method(_MD("get_popup:PopupMenu"),&MenuButton::get_popup); + ClassDB::bind_method(_MD("_unhandled_key_input"),&MenuButton::_unhandled_key_input); + ClassDB::bind_method(_MD("_set_items"),&MenuButton::_set_items); + ClassDB::bind_method(_MD("_get_items"),&MenuButton::_get_items); ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"items",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_items"),_SCS("_get_items") ); diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h index 865d6df55d..274f494fb5 100644 --- a/scene/gui/menu_button.h +++ b/scene/gui/menu_button.h @@ -36,7 +36,7 @@ */ class MenuButton : public Button { - OBJ_TYPE( MenuButton, Button ); + GDCLASS( MenuButton, Button ); bool clicked; PopupMenu *popup; diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index d74c03a219..010cacc14b 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -287,32 +287,32 @@ void OptionButton::get_translatable_strings(List<String> *p_strings) const { void OptionButton::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_selected"),&OptionButton::_selected); - - ObjectTypeDB::bind_method(_MD("add_item","label","id"),&OptionButton::add_item,DEFVAL(-1)); - ObjectTypeDB::bind_method(_MD("add_icon_item","texture:Texture","label","id"),&OptionButton::add_icon_item); - ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&OptionButton::set_item_text); - ObjectTypeDB::bind_method(_MD("set_item_icon","idx","texture:Texture"),&OptionButton::set_item_icon); - ObjectTypeDB::bind_method(_MD("set_item_disabled","idx","disabled"),&OptionButton::set_item_disabled); - ObjectTypeDB::bind_method(_MD("set_item_ID","idx","id"),&OptionButton::set_item_ID); - ObjectTypeDB::bind_method(_MD("set_item_metadata","idx","metadata"),&OptionButton::set_item_metadata); - ObjectTypeDB::bind_method(_MD("get_item_text","idx"),&OptionButton::get_item_text); - ObjectTypeDB::bind_method(_MD("get_item_icon:Texture","idx"),&OptionButton::get_item_icon); - ObjectTypeDB::bind_method(_MD("get_item_ID","idx"),&OptionButton::get_item_ID); - ObjectTypeDB::bind_method(_MD("get_item_metadata","idx"),&OptionButton::get_item_metadata); - ObjectTypeDB::bind_method(_MD("is_item_disabled","idx"),&OptionButton::is_item_disabled); - ObjectTypeDB::bind_method(_MD("get_item_count"),&OptionButton::get_item_count); - ObjectTypeDB::bind_method(_MD("add_separator"),&OptionButton::add_separator); - ObjectTypeDB::bind_method(_MD("clear"),&OptionButton::clear); - ObjectTypeDB::bind_method(_MD("select","idx"),&OptionButton::select); - ObjectTypeDB::bind_method(_MD("get_selected"),&OptionButton::get_selected); - ObjectTypeDB::bind_method(_MD("get_selected_ID"),&OptionButton::get_selected_ID); - ObjectTypeDB::bind_method(_MD("get_selected_metadata"),&OptionButton::get_selected_metadata); - ObjectTypeDB::bind_method(_MD("remove_item","idx"),&OptionButton::remove_item); - ObjectTypeDB::bind_method(_MD("_select_int"),&OptionButton::_select_int); - - ObjectTypeDB::bind_method(_MD("_set_items"),&OptionButton::_set_items); - ObjectTypeDB::bind_method(_MD("_get_items"),&OptionButton::_get_items); + ClassDB::bind_method(_MD("_selected"),&OptionButton::_selected); + + ClassDB::bind_method(_MD("add_item","label","id"),&OptionButton::add_item,DEFVAL(-1)); + ClassDB::bind_method(_MD("add_icon_item","texture:Texture","label","id"),&OptionButton::add_icon_item); + ClassDB::bind_method(_MD("set_item_text","idx","text"),&OptionButton::set_item_text); + ClassDB::bind_method(_MD("set_item_icon","idx","texture:Texture"),&OptionButton::set_item_icon); + ClassDB::bind_method(_MD("set_item_disabled","idx","disabled"),&OptionButton::set_item_disabled); + ClassDB::bind_method(_MD("set_item_ID","idx","id"),&OptionButton::set_item_ID); + ClassDB::bind_method(_MD("set_item_metadata","idx","metadata"),&OptionButton::set_item_metadata); + ClassDB::bind_method(_MD("get_item_text","idx"),&OptionButton::get_item_text); + ClassDB::bind_method(_MD("get_item_icon:Texture","idx"),&OptionButton::get_item_icon); + ClassDB::bind_method(_MD("get_item_ID","idx"),&OptionButton::get_item_ID); + ClassDB::bind_method(_MD("get_item_metadata","idx"),&OptionButton::get_item_metadata); + ClassDB::bind_method(_MD("is_item_disabled","idx"),&OptionButton::is_item_disabled); + ClassDB::bind_method(_MD("get_item_count"),&OptionButton::get_item_count); + ClassDB::bind_method(_MD("add_separator"),&OptionButton::add_separator); + ClassDB::bind_method(_MD("clear"),&OptionButton::clear); + ClassDB::bind_method(_MD("select","idx"),&OptionButton::select); + ClassDB::bind_method(_MD("get_selected"),&OptionButton::get_selected); + ClassDB::bind_method(_MD("get_selected_ID"),&OptionButton::get_selected_ID); + ClassDB::bind_method(_MD("get_selected_metadata"),&OptionButton::get_selected_metadata); + ClassDB::bind_method(_MD("remove_item","idx"),&OptionButton::remove_item); + ClassDB::bind_method(_MD("_select_int"),&OptionButton::_select_int); + + ClassDB::bind_method(_MD("_set_items"),&OptionButton::_set_items); + ClassDB::bind_method(_MD("_get_items"),&OptionButton::_get_items); ADD_PROPERTY( PropertyInfo(Variant::INT,"selected"), _SCS("_select_int"),_SCS("get_selected") ); ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"items",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_items"),_SCS("_get_items") ); diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h index 3dd0571516..681cb5a088 100644 --- a/scene/gui/option_button.h +++ b/scene/gui/option_button.h @@ -36,7 +36,7 @@ */ class OptionButton : public Button { - OBJ_TYPE( OptionButton, Button ); + GDCLASS( OptionButton, Button ); PopupMenu *popup; int current; diff --git a/scene/gui/panel.h b/scene/gui/panel.h index a7c4ece1ab..34c73960e7 100644 --- a/scene/gui/panel.h +++ b/scene/gui/panel.h @@ -35,7 +35,7 @@ */ class Panel : public Control{ - OBJ_TYPE(Panel,Control); + GDCLASS(Panel,Control); protected: void _notification(int p_what); diff --git a/scene/gui/panel_container.h b/scene/gui/panel_container.h index 4ccae197ff..86f390fdf3 100644 --- a/scene/gui/panel_container.h +++ b/scene/gui/panel_container.h @@ -33,7 +33,7 @@ class PanelContainer : public Container { - OBJ_TYPE( PanelContainer, Container ); + GDCLASS( PanelContainer, Container ); protected: diff --git a/scene/gui/patch_9_frame.cpp b/scene/gui/patch_9_frame.cpp index 2553bb952b..72b8369a57 100644 --- a/scene/gui/patch_9_frame.cpp +++ b/scene/gui/patch_9_frame.cpp @@ -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")); diff --git a/scene/gui/patch_9_frame.h b/scene/gui/patch_9_frame.h index f9a0294934..f9de022078 100644 --- a/scene/gui/patch_9_frame.h +++ b/scene/gui/patch_9_frame.h @@ -35,7 +35,7 @@ */ class Patch9Frame : public Control { - OBJ_TYPE(Patch9Frame,Control); + GDCLASS(Patch9Frame,Control); bool draw_center; int margin[4]; diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp index 5bae2b9748..34e101d017 100644 --- a/scene/gui/popup.cpp +++ b/scene/gui/popup.cpp @@ -257,12 +257,12 @@ bool Popup::is_exclusive() const { void Popup::_bind_methods() { - ObjectTypeDB::bind_method(_MD("popup_centered","size"),&Popup::popup_centered,DEFVAL(Size2())); - ObjectTypeDB::bind_method(_MD("popup_centered_ratio","ratio"),&Popup::popup_centered_ratio,DEFVAL(0.75)); - ObjectTypeDB::bind_method(_MD("popup_centered_minsize","minsize"),&Popup::popup_centered_minsize,DEFVAL(Size2())); - ObjectTypeDB::bind_method(_MD("popup"),&Popup::popup); - ObjectTypeDB::bind_method(_MD("set_exclusive","enable"),&Popup::set_exclusive); - ObjectTypeDB::bind_method(_MD("is_exclusive"),&Popup::is_exclusive); + ClassDB::bind_method(_MD("popup_centered","size"),&Popup::popup_centered,DEFVAL(Size2())); + ClassDB::bind_method(_MD("popup_centered_ratio","ratio"),&Popup::popup_centered_ratio,DEFVAL(0.75)); + ClassDB::bind_method(_MD("popup_centered_minsize","minsize"),&Popup::popup_centered_minsize,DEFVAL(Size2())); + ClassDB::bind_method(_MD("popup"),&Popup::popup); + ClassDB::bind_method(_MD("set_exclusive","enable"),&Popup::set_exclusive); + ClassDB::bind_method(_MD("is_exclusive"),&Popup::is_exclusive); ADD_SIGNAL( MethodInfo("about_to_show") ); ADD_SIGNAL( MethodInfo("popup_hide") ); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "popup/exclusive"), _SCS("set_exclusive"),_SCS("is_exclusive") ); diff --git a/scene/gui/popup.h b/scene/gui/popup.h index 05c8198e72..c9b5511630 100644 --- a/scene/gui/popup.h +++ b/scene/gui/popup.h @@ -36,7 +36,7 @@ */ class Popup : public Control { - OBJ_TYPE( Popup, Control ); + GDCLASS( Popup, Control ); bool exclusive; bool popped_up; @@ -74,7 +74,7 @@ public: class PopupPanel : public Popup { - OBJ_TYPE(PopupPanel,Popup); + GDCLASS(PopupPanel,Popup); protected: diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 3cbf18b768..8686156a8e 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1092,61 +1092,61 @@ void PopupMenu::clear_autohide_areas(){ void PopupMenu::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&PopupMenu::_input_event); - ObjectTypeDB::bind_method(_MD("add_icon_item","texture","label","id","accel"),&PopupMenu::add_icon_item,DEFVAL(-1),DEFVAL(0)); - ObjectTypeDB::bind_method(_MD("add_item","label","id","accel"),&PopupMenu::add_item,DEFVAL(-1),DEFVAL(0)); - ObjectTypeDB::bind_method(_MD("add_icon_check_item","texture","label","id","accel"),&PopupMenu::add_icon_check_item,DEFVAL(-1),DEFVAL(0)); - ObjectTypeDB::bind_method(_MD("add_check_item","label","id","accel"),&PopupMenu::add_check_item,DEFVAL(-1),DEFVAL(0)); - ObjectTypeDB::bind_method(_MD("add_submenu_item","label","submenu","id"),&PopupMenu::add_submenu_item,DEFVAL(-1)); - - ObjectTypeDB::bind_method(_MD("add_icon_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_shortcut,DEFVAL(-1)); - ObjectTypeDB::bind_method(_MD("add_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_shortcut,DEFVAL(-1)); - ObjectTypeDB::bind_method(_MD("add_icon_check_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_check_shortcut,DEFVAL(-1)); - ObjectTypeDB::bind_method(_MD("add_check_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_check_shortcut,DEFVAL(-1)); - - ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&PopupMenu::set_item_text); - ObjectTypeDB::bind_method(_MD("set_item_icon","idx","icon"),&PopupMenu::set_item_icon); - ObjectTypeDB::bind_method(_MD("set_item_checked","idx","checked"),&PopupMenu::set_item_checked); - ObjectTypeDB::bind_method(_MD("set_item_ID","idx","id"),&PopupMenu::set_item_ID); - ObjectTypeDB::bind_method(_MD("set_item_accelerator","idx","accel"),&PopupMenu::set_item_accelerator); - ObjectTypeDB::bind_method(_MD("set_item_metadata","idx","metadata"),&PopupMenu::set_item_metadata); - ObjectTypeDB::bind_method(_MD("set_item_disabled","idx","disabled"),&PopupMenu::set_item_disabled); - ObjectTypeDB::bind_method(_MD("set_item_submenu","idx","submenu"),&PopupMenu::set_item_submenu); - ObjectTypeDB::bind_method(_MD("set_item_as_separator","idx","enable"),&PopupMenu::set_item_as_separator); - ObjectTypeDB::bind_method(_MD("set_item_as_checkable","idx","enable"),&PopupMenu::set_item_as_checkable); - ObjectTypeDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&PopupMenu::set_item_tooltip); - ObjectTypeDB::bind_method(_MD("set_item_shortcut","idx","shortcut:ShortCut"),&PopupMenu::set_item_shortcut); - - ObjectTypeDB::bind_method(_MD("toggle_item_checked","idx"), &PopupMenu::toggle_item_checked); - - ObjectTypeDB::bind_method(_MD("get_item_text","idx"),&PopupMenu::get_item_text); - ObjectTypeDB::bind_method(_MD("get_item_icon","idx"),&PopupMenu::get_item_icon); - ObjectTypeDB::bind_method(_MD("is_item_checked","idx"),&PopupMenu::is_item_checked); - ObjectTypeDB::bind_method(_MD("get_item_ID","idx"),&PopupMenu::get_item_ID); - ObjectTypeDB::bind_method(_MD("get_item_index","id"),&PopupMenu::get_item_index); - ObjectTypeDB::bind_method(_MD("get_item_accelerator","idx"),&PopupMenu::get_item_accelerator); - ObjectTypeDB::bind_method(_MD("get_item_metadata","idx"),&PopupMenu::get_item_metadata); - ObjectTypeDB::bind_method(_MD("is_item_disabled","idx"),&PopupMenu::is_item_disabled); - ObjectTypeDB::bind_method(_MD("get_item_submenu","idx"),&PopupMenu::get_item_submenu); - ObjectTypeDB::bind_method(_MD("is_item_separator","idx"),&PopupMenu::is_item_separator); - ObjectTypeDB::bind_method(_MD("is_item_checkable","idx"),&PopupMenu::is_item_checkable); - ObjectTypeDB::bind_method(_MD("get_item_tooltip","idx"),&PopupMenu::get_item_tooltip); - ObjectTypeDB::bind_method(_MD("get_item_shortcut:ShortCut","idx"),&PopupMenu::get_item_shortcut); - - ObjectTypeDB::bind_method(_MD("get_item_count"),&PopupMenu::get_item_count); - - ObjectTypeDB::bind_method(_MD("remove_item","idx"),&PopupMenu::remove_item); - - ObjectTypeDB::bind_method(_MD("add_separator"),&PopupMenu::add_separator); - ObjectTypeDB::bind_method(_MD("clear"),&PopupMenu::clear); - - ObjectTypeDB::bind_method(_MD("_set_items"),&PopupMenu::_set_items); - ObjectTypeDB::bind_method(_MD("_get_items"),&PopupMenu::_get_items); - - ObjectTypeDB::bind_method(_MD("set_hide_on_item_selection","enable"),&PopupMenu::set_hide_on_item_selection); - ObjectTypeDB::bind_method(_MD("is_hide_on_item_selection"),&PopupMenu::is_hide_on_item_selection); - - ObjectTypeDB::bind_method(_MD("_submenu_timeout"),&PopupMenu::_submenu_timeout); + ClassDB::bind_method(_MD("_input_event"),&PopupMenu::_input_event); + ClassDB::bind_method(_MD("add_icon_item","texture","label","id","accel"),&PopupMenu::add_icon_item,DEFVAL(-1),DEFVAL(0)); + ClassDB::bind_method(_MD("add_item","label","id","accel"),&PopupMenu::add_item,DEFVAL(-1),DEFVAL(0)); + ClassDB::bind_method(_MD("add_icon_check_item","texture","label","id","accel"),&PopupMenu::add_icon_check_item,DEFVAL(-1),DEFVAL(0)); + ClassDB::bind_method(_MD("add_check_item","label","id","accel"),&PopupMenu::add_check_item,DEFVAL(-1),DEFVAL(0)); + ClassDB::bind_method(_MD("add_submenu_item","label","submenu","id"),&PopupMenu::add_submenu_item,DEFVAL(-1)); + + ClassDB::bind_method(_MD("add_icon_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_shortcut,DEFVAL(-1)); + ClassDB::bind_method(_MD("add_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_shortcut,DEFVAL(-1)); + ClassDB::bind_method(_MD("add_icon_check_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_check_shortcut,DEFVAL(-1)); + ClassDB::bind_method(_MD("add_check_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_check_shortcut,DEFVAL(-1)); + + ClassDB::bind_method(_MD("set_item_text","idx","text"),&PopupMenu::set_item_text); + ClassDB::bind_method(_MD("set_item_icon","idx","icon"),&PopupMenu::set_item_icon); + ClassDB::bind_method(_MD("set_item_checked","idx","checked"),&PopupMenu::set_item_checked); + ClassDB::bind_method(_MD("set_item_ID","idx","id"),&PopupMenu::set_item_ID); + ClassDB::bind_method(_MD("set_item_accelerator","idx","accel"),&PopupMenu::set_item_accelerator); + ClassDB::bind_method(_MD("set_item_metadata","idx","metadata"),&PopupMenu::set_item_metadata); + ClassDB::bind_method(_MD("set_item_disabled","idx","disabled"),&PopupMenu::set_item_disabled); + ClassDB::bind_method(_MD("set_item_submenu","idx","submenu"),&PopupMenu::set_item_submenu); + ClassDB::bind_method(_MD("set_item_as_separator","idx","enable"),&PopupMenu::set_item_as_separator); + ClassDB::bind_method(_MD("set_item_as_checkable","idx","enable"),&PopupMenu::set_item_as_checkable); + ClassDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&PopupMenu::set_item_tooltip); + ClassDB::bind_method(_MD("set_item_shortcut","idx","shortcut:ShortCut"),&PopupMenu::set_item_shortcut); + + ClassDB::bind_method(_MD("toggle_item_checked","idx"), &PopupMenu::toggle_item_checked); + + ClassDB::bind_method(_MD("get_item_text","idx"),&PopupMenu::get_item_text); + ClassDB::bind_method(_MD("get_item_icon","idx"),&PopupMenu::get_item_icon); + ClassDB::bind_method(_MD("is_item_checked","idx"),&PopupMenu::is_item_checked); + ClassDB::bind_method(_MD("get_item_ID","idx"),&PopupMenu::get_item_ID); + ClassDB::bind_method(_MD("get_item_index","id"),&PopupMenu::get_item_index); + ClassDB::bind_method(_MD("get_item_accelerator","idx"),&PopupMenu::get_item_accelerator); + ClassDB::bind_method(_MD("get_item_metadata","idx"),&PopupMenu::get_item_metadata); + ClassDB::bind_method(_MD("is_item_disabled","idx"),&PopupMenu::is_item_disabled); + ClassDB::bind_method(_MD("get_item_submenu","idx"),&PopupMenu::get_item_submenu); + ClassDB::bind_method(_MD("is_item_separator","idx"),&PopupMenu::is_item_separator); + ClassDB::bind_method(_MD("is_item_checkable","idx"),&PopupMenu::is_item_checkable); + ClassDB::bind_method(_MD("get_item_tooltip","idx"),&PopupMenu::get_item_tooltip); + ClassDB::bind_method(_MD("get_item_shortcut:ShortCut","idx"),&PopupMenu::get_item_shortcut); + + ClassDB::bind_method(_MD("get_item_count"),&PopupMenu::get_item_count); + + ClassDB::bind_method(_MD("remove_item","idx"),&PopupMenu::remove_item); + + ClassDB::bind_method(_MD("add_separator"),&PopupMenu::add_separator); + ClassDB::bind_method(_MD("clear"),&PopupMenu::clear); + + ClassDB::bind_method(_MD("_set_items"),&PopupMenu::_set_items); + ClassDB::bind_method(_MD("_get_items"),&PopupMenu::_get_items); + + ClassDB::bind_method(_MD("set_hide_on_item_selection","enable"),&PopupMenu::set_hide_on_item_selection); + ClassDB::bind_method(_MD("is_hide_on_item_selection"),&PopupMenu::is_hide_on_item_selection); + + ClassDB::bind_method(_MD("_submenu_timeout"),&PopupMenu::_submenu_timeout); ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"items",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_items"),_SCS("_get_items") ); ADD_PROPERTYNO( PropertyInfo(Variant::BOOL, "hide_on_item_selection" ), _SCS("set_hide_on_item_selection"), _SCS("is_hide_on_item_selection") ); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 64ce99e838..282e152287 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -39,7 +39,7 @@ class PopupMenu : public Popup { - OBJ_TYPE(PopupMenu, Popup ); + GDCLASS(PopupMenu, Popup ); struct Item { Ref<Texture> icon; diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp index 71c2a40279..48a9dd2fe6 100644 --- a/scene/gui/progress_bar.cpp +++ b/scene/gui/progress_bar.cpp @@ -82,8 +82,8 @@ bool ProgressBar::is_percent_visible() const{ void ProgressBar::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_percent_visible","visible"),&ProgressBar::set_percent_visible); - ObjectTypeDB::bind_method(_MD("is_percent_visible"),&ProgressBar::is_percent_visible); + ClassDB::bind_method(_MD("set_percent_visible","visible"),&ProgressBar::set_percent_visible); + ClassDB::bind_method(_MD("is_percent_visible"),&ProgressBar::is_percent_visible); ADD_PROPERTY(PropertyInfo(Variant::BOOL,"percent/visible"),_SCS("set_percent_visible"),_SCS("is_percent_visible")); } diff --git a/scene/gui/progress_bar.h b/scene/gui/progress_bar.h index 4f5e0d998a..01306a2ac4 100644 --- a/scene/gui/progress_bar.h +++ b/scene/gui/progress_bar.h @@ -33,7 +33,7 @@ class ProgressBar : public Range { - OBJ_TYPE( ProgressBar, Range ); + GDCLASS( ProgressBar, Range ); bool percent_visible; protected: diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index ef0e735af6..b6e52a3f6d 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -222,27 +222,27 @@ void Range::_unref_shared() { void Range::_bind_methods() { - ObjectTypeDB::bind_method(_MD("get_val"),&Range::get_val); - ObjectTypeDB::bind_method(_MD("get_value"),&Range::get_val); - ObjectTypeDB::bind_method(_MD("get_min"),&Range::get_min); - ObjectTypeDB::bind_method(_MD("get_max"),&Range::get_max); - ObjectTypeDB::bind_method(_MD("get_step"),&Range::get_step); - ObjectTypeDB::bind_method(_MD("get_page"),&Range::get_page); - ObjectTypeDB::bind_method(_MD("get_unit_value"),&Range::get_unit_value); - ObjectTypeDB::bind_method(_MD("set_val","value"),&Range::set_val); - ObjectTypeDB::bind_method(_MD("set_value","value"),&Range::set_val); - ObjectTypeDB::bind_method(_MD("set_min","minimum"),&Range::set_min); - ObjectTypeDB::bind_method(_MD("set_max","maximum"),&Range::set_max); - ObjectTypeDB::bind_method(_MD("set_step","step"),&Range::set_step); - ObjectTypeDB::bind_method(_MD("set_page","pagesize"),&Range::set_page); - ObjectTypeDB::bind_method(_MD("set_unit_value","value"),&Range::set_unit_value); - ObjectTypeDB::bind_method(_MD("set_rounded_values","enabled"),&Range::set_rounded_values); - ObjectTypeDB::bind_method(_MD("is_rounded_values"),&Range::is_rounded_values); - ObjectTypeDB::bind_method(_MD("set_exp_unit_value","enabled"),&Range::set_exp_unit_value); - ObjectTypeDB::bind_method(_MD("is_unit_value_exp"),&Range::is_unit_value_exp); - - ObjectTypeDB::bind_method(_MD("share","with"),&Range::_share); - ObjectTypeDB::bind_method(_MD("unshare"),&Range::unshare); + ClassDB::bind_method(_MD("get_val"),&Range::get_val); + ClassDB::bind_method(_MD("get_value"),&Range::get_val); + ClassDB::bind_method(_MD("get_min"),&Range::get_min); + ClassDB::bind_method(_MD("get_max"),&Range::get_max); + ClassDB::bind_method(_MD("get_step"),&Range::get_step); + ClassDB::bind_method(_MD("get_page"),&Range::get_page); + ClassDB::bind_method(_MD("get_unit_value"),&Range::get_unit_value); + ClassDB::bind_method(_MD("set_val","value"),&Range::set_val); + ClassDB::bind_method(_MD("set_value","value"),&Range::set_val); + ClassDB::bind_method(_MD("set_min","minimum"),&Range::set_min); + ClassDB::bind_method(_MD("set_max","maximum"),&Range::set_max); + ClassDB::bind_method(_MD("set_step","step"),&Range::set_step); + ClassDB::bind_method(_MD("set_page","pagesize"),&Range::set_page); + ClassDB::bind_method(_MD("set_unit_value","value"),&Range::set_unit_value); + ClassDB::bind_method(_MD("set_rounded_values","enabled"),&Range::set_rounded_values); + ClassDB::bind_method(_MD("is_rounded_values"),&Range::is_rounded_values); + ClassDB::bind_method(_MD("set_exp_unit_value","enabled"),&Range::set_exp_unit_value); + ClassDB::bind_method(_MD("is_unit_value_exp"),&Range::is_unit_value_exp); + + ClassDB::bind_method(_MD("share","with"),&Range::_share); + ClassDB::bind_method(_MD("unshare"),&Range::unshare); ADD_SIGNAL( MethodInfo("value_changed", PropertyInfo(Variant::REAL,"value"))); ADD_SIGNAL( MethodInfo("changed")); diff --git a/scene/gui/range.h b/scene/gui/range.h index ba59c7bc24..9c38878c41 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -35,7 +35,7 @@ */ class Range : public Control { - OBJ_TYPE( Range, Control ); + GDCLASS( Range, Control ); struct Shared { diff --git a/scene/gui/reference_frame.h b/scene/gui/reference_frame.h index 139ee3e666..8b4a16cb43 100644 --- a/scene/gui/reference_frame.h +++ b/scene/gui/reference_frame.h @@ -33,7 +33,7 @@ class ReferenceFrame : public Control { - OBJ_TYPE( ReferenceFrame, Control); + GDCLASS( ReferenceFrame, Control); protected: diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index c6a44f3f04..8f28a55a38 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1902,58 +1902,58 @@ String RichTextLabel::get_text() { void RichTextLabel::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&RichTextLabel::_input_event); - ObjectTypeDB::bind_method(_MD("_scroll_changed"),&RichTextLabel::_scroll_changed); - ObjectTypeDB::bind_method(_MD("get_text"),&RichTextLabel::get_text); - ObjectTypeDB::bind_method(_MD("add_text","text"),&RichTextLabel::add_text); - ObjectTypeDB::bind_method(_MD("add_image","image:Texture"),&RichTextLabel::add_image); - ObjectTypeDB::bind_method(_MD("newline"),&RichTextLabel::add_newline); - ObjectTypeDB::bind_method(_MD("push_font","font"),&RichTextLabel::push_font); - ObjectTypeDB::bind_method(_MD("push_color","color"),&RichTextLabel::push_color); - ObjectTypeDB::bind_method(_MD("push_align","align"),&RichTextLabel::push_align); - ObjectTypeDB::bind_method(_MD("push_indent","level"),&RichTextLabel::push_indent); - ObjectTypeDB::bind_method(_MD("push_list","type"),&RichTextLabel::push_list); - ObjectTypeDB::bind_method(_MD("push_meta","data"),&RichTextLabel::push_meta); - ObjectTypeDB::bind_method(_MD("push_underline"),&RichTextLabel::push_underline); - ObjectTypeDB::bind_method(_MD("push_table","columns"),&RichTextLabel::push_table); - ObjectTypeDB::bind_method(_MD("set_table_column_expand","column","expand","ratio"),&RichTextLabel::set_table_column_expand); - ObjectTypeDB::bind_method(_MD("push_cell"),&RichTextLabel::push_cell); - ObjectTypeDB::bind_method(_MD("pop"),&RichTextLabel::pop); + ClassDB::bind_method(_MD("_input_event"),&RichTextLabel::_input_event); + ClassDB::bind_method(_MD("_scroll_changed"),&RichTextLabel::_scroll_changed); + ClassDB::bind_method(_MD("get_text"),&RichTextLabel::get_text); + ClassDB::bind_method(_MD("add_text","text"),&RichTextLabel::add_text); + ClassDB::bind_method(_MD("add_image","image:Texture"),&RichTextLabel::add_image); + ClassDB::bind_method(_MD("newline"),&RichTextLabel::add_newline); + ClassDB::bind_method(_MD("push_font","font"),&RichTextLabel::push_font); + ClassDB::bind_method(_MD("push_color","color"),&RichTextLabel::push_color); + ClassDB::bind_method(_MD("push_align","align"),&RichTextLabel::push_align); + ClassDB::bind_method(_MD("push_indent","level"),&RichTextLabel::push_indent); + ClassDB::bind_method(_MD("push_list","type"),&RichTextLabel::push_list); + ClassDB::bind_method(_MD("push_meta","data"),&RichTextLabel::push_meta); + ClassDB::bind_method(_MD("push_underline"),&RichTextLabel::push_underline); + ClassDB::bind_method(_MD("push_table","columns"),&RichTextLabel::push_table); + ClassDB::bind_method(_MD("set_table_column_expand","column","expand","ratio"),&RichTextLabel::set_table_column_expand); + ClassDB::bind_method(_MD("push_cell"),&RichTextLabel::push_cell); + ClassDB::bind_method(_MD("pop"),&RichTextLabel::pop); - ObjectTypeDB::bind_method(_MD("clear"),&RichTextLabel::clear); + ClassDB::bind_method(_MD("clear"),&RichTextLabel::clear); - ObjectTypeDB::bind_method(_MD("set_meta_underline","enable"),&RichTextLabel::set_meta_underline); - ObjectTypeDB::bind_method(_MD("is_meta_underlined"),&RichTextLabel::is_meta_underlined); + ClassDB::bind_method(_MD("set_meta_underline","enable"),&RichTextLabel::set_meta_underline); + ClassDB::bind_method(_MD("is_meta_underlined"),&RichTextLabel::is_meta_underlined); - ObjectTypeDB::bind_method(_MD("set_scroll_active","active"),&RichTextLabel::set_scroll_active); - ObjectTypeDB::bind_method(_MD("is_scroll_active"),&RichTextLabel::is_scroll_active); + ClassDB::bind_method(_MD("set_scroll_active","active"),&RichTextLabel::set_scroll_active); + ClassDB::bind_method(_MD("is_scroll_active"),&RichTextLabel::is_scroll_active); - ObjectTypeDB::bind_method(_MD("set_scroll_follow","follow"),&RichTextLabel::set_scroll_follow); - ObjectTypeDB::bind_method(_MD("is_scroll_following"),&RichTextLabel::is_scroll_following); + ClassDB::bind_method(_MD("set_scroll_follow","follow"),&RichTextLabel::set_scroll_follow); + ClassDB::bind_method(_MD("is_scroll_following"),&RichTextLabel::is_scroll_following); - ObjectTypeDB::bind_method(_MD("get_v_scroll"),&RichTextLabel::get_v_scroll); + ClassDB::bind_method(_MD("get_v_scroll"),&RichTextLabel::get_v_scroll); - ObjectTypeDB::bind_method(_MD("scroll_to_line","line"),&RichTextLabel::scroll_to_line); + ClassDB::bind_method(_MD("scroll_to_line","line"),&RichTextLabel::scroll_to_line); - ObjectTypeDB::bind_method(_MD("set_tab_size","spaces"),&RichTextLabel::set_tab_size); - ObjectTypeDB::bind_method(_MD("get_tab_size"),&RichTextLabel::get_tab_size); + ClassDB::bind_method(_MD("set_tab_size","spaces"),&RichTextLabel::set_tab_size); + ClassDB::bind_method(_MD("get_tab_size"),&RichTextLabel::get_tab_size); - ObjectTypeDB::bind_method(_MD("set_selection_enabled","enabled"),&RichTextLabel::set_selection_enabled); - ObjectTypeDB::bind_method(_MD("is_selection_enabled"),&RichTextLabel::is_selection_enabled); + ClassDB::bind_method(_MD("set_selection_enabled","enabled"),&RichTextLabel::set_selection_enabled); + ClassDB::bind_method(_MD("is_selection_enabled"),&RichTextLabel::is_selection_enabled); - ObjectTypeDB::bind_method(_MD("parse_bbcode", "bbcode"),&RichTextLabel::parse_bbcode); - ObjectTypeDB::bind_method(_MD("append_bbcode", "bbcode"),&RichTextLabel::append_bbcode); + ClassDB::bind_method(_MD("parse_bbcode", "bbcode"),&RichTextLabel::parse_bbcode); + ClassDB::bind_method(_MD("append_bbcode", "bbcode"),&RichTextLabel::append_bbcode); - ObjectTypeDB::bind_method(_MD("set_bbcode","text"),&RichTextLabel::set_bbcode); - ObjectTypeDB::bind_method(_MD("get_bbcode"),&RichTextLabel::get_bbcode); + ClassDB::bind_method(_MD("set_bbcode","text"),&RichTextLabel::set_bbcode); + ClassDB::bind_method(_MD("get_bbcode"),&RichTextLabel::get_bbcode); - ObjectTypeDB::bind_method(_MD("set_visible_characters","amount"),&RichTextLabel::set_visible_characters); - ObjectTypeDB::bind_method(_MD("get_visible_characters"),&RichTextLabel::get_visible_characters); + ClassDB::bind_method(_MD("set_visible_characters","amount"),&RichTextLabel::set_visible_characters); + ClassDB::bind_method(_MD("get_visible_characters"),&RichTextLabel::get_visible_characters); - ObjectTypeDB::bind_method(_MD("get_total_character_count"),&RichTextLabel::get_total_character_count); + ClassDB::bind_method(_MD("get_total_character_count"),&RichTextLabel::get_total_character_count); - ObjectTypeDB::bind_method(_MD("set_use_bbcode","enable"),&RichTextLabel::set_use_bbcode); - ObjectTypeDB::bind_method(_MD("is_using_bbcode"),&RichTextLabel::is_using_bbcode); + ClassDB::bind_method(_MD("set_use_bbcode","enable"),&RichTextLabel::set_use_bbcode); + ClassDB::bind_method(_MD("is_using_bbcode"),&RichTextLabel::is_using_bbcode); ADD_PROPERTY(PropertyInfo(Variant::BOOL,"bbcode/enabled"),_SCS("set_use_bbcode"),_SCS("is_using_bbcode")); ADD_PROPERTY(PropertyInfo(Variant::STRING,"bbcode/bbcode",PROPERTY_HINT_MULTILINE_TEXT),_SCS("set_bbcode"),_SCS("get_bbcode")); diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 1ac008a951..829103dea2 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -34,7 +34,7 @@ class RichTextLabel : public Control { - OBJ_TYPE( RichTextLabel, Control ); + GDCLASS( RichTextLabel, Control ); public: enum Align { diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index b49aa520d9..bf6664ab3d 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -804,11 +804,11 @@ bool ScrollBar::key(unsigned long p_unicode, unsigned long p_scan_code,bool b.pr void ScrollBar::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&ScrollBar::_input_event); - ObjectTypeDB::bind_method(_MD("set_custom_step","step"),&ScrollBar::set_custom_step); - ObjectTypeDB::bind_method(_MD("get_custom_step"),&ScrollBar::get_custom_step); - ObjectTypeDB::bind_method(_MD("_drag_slave_input"),&ScrollBar::_drag_slave_input); - ObjectTypeDB::bind_method(_MD("_drag_slave_exit"),&ScrollBar::_drag_slave_exit); + ClassDB::bind_method(_MD("_input_event"),&ScrollBar::_input_event); + ClassDB::bind_method(_MD("set_custom_step","step"),&ScrollBar::set_custom_step); + ClassDB::bind_method(_MD("get_custom_step"),&ScrollBar::get_custom_step); + ClassDB::bind_method(_MD("_drag_slave_input"),&ScrollBar::_drag_slave_input); + ClassDB::bind_method(_MD("_drag_slave_exit"),&ScrollBar::_drag_slave_exit); ADD_PROPERTY( PropertyInfo(Variant::REAL,"custom_step",PROPERTY_HINT_RANGE,"-1,4096"), _SCS("set_custom_step"),_SCS("get_custom_step")); diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h index 0e79912059..97259a07cb 100644 --- a/scene/gui/scroll_bar.h +++ b/scene/gui/scroll_bar.h @@ -37,7 +37,7 @@ */ class ScrollBar : public Range { - OBJ_TYPE( ScrollBar, Range ); + GDCLASS( ScrollBar, Range ); enum HiliteStatus { HILITE_NONE, @@ -109,7 +109,7 @@ public: class HScrollBar : public ScrollBar { - OBJ_TYPE( HScrollBar, ScrollBar ); + GDCLASS( HScrollBar, ScrollBar ); public: HScrollBar() : ScrollBar(HORIZONTAL) { set_v_size_flags(0); } @@ -117,7 +117,7 @@ public: class VScrollBar : public ScrollBar { - OBJ_TYPE( VScrollBar, ScrollBar ); + GDCLASS( VScrollBar, ScrollBar ); public: VScrollBar() : ScrollBar(VERTICAL) { set_h_size_flags(0); } diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index bad478a745..b8a66d4360 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -437,17 +437,17 @@ void ScrollContainer::set_h_scroll(int p_pos) { void ScrollContainer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_scroll_moved"),&ScrollContainer::_scroll_moved); - ObjectTypeDB::bind_method(_MD("_input_event"),&ScrollContainer::_input_event); - ObjectTypeDB::bind_method(_MD("set_enable_h_scroll","enable"),&ScrollContainer::set_enable_h_scroll); - ObjectTypeDB::bind_method(_MD("is_h_scroll_enabled"),&ScrollContainer::is_h_scroll_enabled); - ObjectTypeDB::bind_method(_MD("set_enable_v_scroll","enable"),&ScrollContainer::set_enable_v_scroll); - ObjectTypeDB::bind_method(_MD("is_v_scroll_enabled"),&ScrollContainer::is_v_scroll_enabled); - ObjectTypeDB::bind_method(_MD("_update_scrollbar_pos"),&ScrollContainer::_update_scrollbar_pos); - ObjectTypeDB::bind_method(_MD("set_h_scroll","val"),&ScrollContainer::set_h_scroll); - ObjectTypeDB::bind_method(_MD("get_h_scroll"),&ScrollContainer::get_h_scroll); - ObjectTypeDB::bind_method(_MD("set_v_scroll","val"),&ScrollContainer::set_v_scroll); - ObjectTypeDB::bind_method(_MD("get_v_scroll"),&ScrollContainer::get_v_scroll); + ClassDB::bind_method(_MD("_scroll_moved"),&ScrollContainer::_scroll_moved); + ClassDB::bind_method(_MD("_input_event"),&ScrollContainer::_input_event); + ClassDB::bind_method(_MD("set_enable_h_scroll","enable"),&ScrollContainer::set_enable_h_scroll); + ClassDB::bind_method(_MD("is_h_scroll_enabled"),&ScrollContainer::is_h_scroll_enabled); + ClassDB::bind_method(_MD("set_enable_v_scroll","enable"),&ScrollContainer::set_enable_v_scroll); + ClassDB::bind_method(_MD("is_v_scroll_enabled"),&ScrollContainer::is_v_scroll_enabled); + ClassDB::bind_method(_MD("_update_scrollbar_pos"),&ScrollContainer::_update_scrollbar_pos); + ClassDB::bind_method(_MD("set_h_scroll","val"),&ScrollContainer::set_h_scroll); + ClassDB::bind_method(_MD("get_h_scroll"),&ScrollContainer::get_h_scroll); + ClassDB::bind_method(_MD("set_v_scroll","val"),&ScrollContainer::set_v_scroll); + ClassDB::bind_method(_MD("get_v_scroll"),&ScrollContainer::get_v_scroll); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll/horizontal"), _SCS("set_enable_h_scroll"),_SCS("is_h_scroll_enabled")); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll/vertical"), _SCS("set_enable_v_scroll"),_SCS("is_v_scroll_enabled")); diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h index f6832acf66..4d783e8f77 100644 --- a/scene/gui/scroll_container.h +++ b/scene/gui/scroll_container.h @@ -35,7 +35,7 @@ class ScrollContainer : public Container { - OBJ_TYPE(ScrollContainer, Container); + GDCLASS(ScrollContainer, Container); HScrollBar* h_scroll; VScrollBar* v_scroll; diff --git a/scene/gui/separator.h b/scene/gui/separator.h index cdaaa23ab0..5fb17e1c2e 100644 --- a/scene/gui/separator.h +++ b/scene/gui/separator.h @@ -36,7 +36,7 @@ #include "scene/gui/control.h" class Separator : public Control { - OBJ_TYPE( Separator, Control ); + GDCLASS( Separator, Control ); protected: @@ -54,7 +54,7 @@ public: class VSeparator : public Separator { - OBJ_TYPE( VSeparator, Separator ); + GDCLASS( VSeparator, Separator ); public: @@ -64,7 +64,7 @@ public: class HSeparator : public Separator { - OBJ_TYPE( HSeparator, Separator ); + GDCLASS( HSeparator, Separator ); public: diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index 8747cc965f..9ab0f21993 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -231,12 +231,12 @@ void Slider::set_ticks_on_borders(bool _tob){ void Slider::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&Slider::_input_event); - ObjectTypeDB::bind_method(_MD("set_ticks","count"),&Slider::set_ticks); - ObjectTypeDB::bind_method(_MD("get_ticks"),&Slider::get_ticks); + ClassDB::bind_method(_MD("_input_event"),&Slider::_input_event); + ClassDB::bind_method(_MD("set_ticks","count"),&Slider::set_ticks); + ClassDB::bind_method(_MD("get_ticks"),&Slider::get_ticks); - ObjectTypeDB::bind_method(_MD("get_ticks_on_borders"),&Slider::get_ticks_on_borders); - ObjectTypeDB::bind_method(_MD("set_ticks_on_borders","ticks_on_border"),&Slider::set_ticks_on_borders); + ClassDB::bind_method(_MD("get_ticks_on_borders"),&Slider::get_ticks_on_borders); + ClassDB::bind_method(_MD("set_ticks_on_borders","ticks_on_border"),&Slider::set_ticks_on_borders); ADD_PROPERTY( PropertyInfo( Variant::INT, "tick_count", PROPERTY_HINT_RANGE,"0,4096,1"), _SCS("set_ticks"), _SCS("get_ticks") ); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "ticks_on_borders" ), _SCS("set_ticks_on_borders"), _SCS("get_ticks_on_borders") ); diff --git a/scene/gui/slider.h b/scene/gui/slider.h index 31cc9f90d3..5d68de1b4b 100644 --- a/scene/gui/slider.h +++ b/scene/gui/slider.h @@ -33,7 +33,7 @@ class Slider : public Range { - OBJ_TYPE( Slider, Range ); + GDCLASS( Slider, Range ); struct Grab { int pos; @@ -74,7 +74,7 @@ public: class HSlider : public Slider { - OBJ_TYPE( HSlider, Slider ); + GDCLASS( HSlider, Slider ); public: HSlider() : Slider(HORIZONTAL) { set_v_size_flags(0);} @@ -82,7 +82,7 @@ public: class VSlider : public Slider { - OBJ_TYPE( VSlider, Slider ); + GDCLASS( VSlider, Slider ); public: VSlider() : Slider(VERTICAL) { set_h_size_flags(0);} diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 194922441d..a16a515dca 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -251,19 +251,19 @@ bool SpinBox::is_editable() const { void SpinBox::_bind_methods() { - //ObjectTypeDB::bind_method(_MD("_value_changed"),&SpinBox::_value_changed); - ObjectTypeDB::bind_method(_MD("_input_event"),&SpinBox::_input_event); - ObjectTypeDB::bind_method(_MD("_text_entered"),&SpinBox::_text_entered); - ObjectTypeDB::bind_method(_MD("set_suffix","suffix"),&SpinBox::set_suffix); - ObjectTypeDB::bind_method(_MD("get_suffix"),&SpinBox::get_suffix); - ObjectTypeDB::bind_method(_MD("set_prefix","prefix"),&SpinBox::set_prefix); - ObjectTypeDB::bind_method(_MD("get_prefix"),&SpinBox::get_prefix); - ObjectTypeDB::bind_method(_MD("set_editable","editable"),&SpinBox::set_editable); - ObjectTypeDB::bind_method(_MD("is_editable"),&SpinBox::is_editable); - ObjectTypeDB::bind_method(_MD("_line_edit_focus_exit"),&SpinBox::_line_edit_focus_exit); - ObjectTypeDB::bind_method(_MD("get_line_edit"),&SpinBox::get_line_edit); - ObjectTypeDB::bind_method(_MD("_line_edit_input"),&SpinBox::_line_edit_input); - ObjectTypeDB::bind_method(_MD("_range_click_timeout"),&SpinBox::_range_click_timeout); + //ClassDB::bind_method(_MD("_value_changed"),&SpinBox::_value_changed); + ClassDB::bind_method(_MD("_input_event"),&SpinBox::_input_event); + ClassDB::bind_method(_MD("_text_entered"),&SpinBox::_text_entered); + ClassDB::bind_method(_MD("set_suffix","suffix"),&SpinBox::set_suffix); + ClassDB::bind_method(_MD("get_suffix"),&SpinBox::get_suffix); + ClassDB::bind_method(_MD("set_prefix","prefix"),&SpinBox::set_prefix); + ClassDB::bind_method(_MD("get_prefix"),&SpinBox::get_prefix); + ClassDB::bind_method(_MD("set_editable","editable"),&SpinBox::set_editable); + ClassDB::bind_method(_MD("is_editable"),&SpinBox::is_editable); + ClassDB::bind_method(_MD("_line_edit_focus_exit"),&SpinBox::_line_edit_focus_exit); + ClassDB::bind_method(_MD("get_line_edit"),&SpinBox::get_line_edit); + ClassDB::bind_method(_MD("_line_edit_input"),&SpinBox::_line_edit_input); + ClassDB::bind_method(_MD("_range_click_timeout"),&SpinBox::_range_click_timeout); ADD_PROPERTY(PropertyInfo(Variant::BOOL,"editable"),_SCS("set_editable"),_SCS("is_editable")); diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h index 7b33d562be..e56ff0cd6f 100644 --- a/scene/gui/spin_box.h +++ b/scene/gui/spin_box.h @@ -35,7 +35,7 @@ class SpinBox : public Range { - OBJ_TYPE( SpinBox, Range ); + GDCLASS( SpinBox, Range ); LineEdit *line_edit; int last_w; diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index 2c81bd19f9..d3ea6aa4e9 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -422,15 +422,15 @@ bool SplitContainer::is_collapsed() const { void SplitContainer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&SplitContainer::_input_event); - ObjectTypeDB::bind_method(_MD("set_split_offset","offset"),&SplitContainer::set_split_offset); - ObjectTypeDB::bind_method(_MD("get_split_offset"),&SplitContainer::get_split_offset); + ClassDB::bind_method(_MD("_input_event"),&SplitContainer::_input_event); + ClassDB::bind_method(_MD("set_split_offset","offset"),&SplitContainer::set_split_offset); + ClassDB::bind_method(_MD("get_split_offset"),&SplitContainer::get_split_offset); - ObjectTypeDB::bind_method(_MD("set_collapsed","collapsed"),&SplitContainer::set_collapsed); - ObjectTypeDB::bind_method(_MD("is_collapsed"),&SplitContainer::is_collapsed); + ClassDB::bind_method(_MD("set_collapsed","collapsed"),&SplitContainer::set_collapsed); + ClassDB::bind_method(_MD("is_collapsed"),&SplitContainer::is_collapsed); - ObjectTypeDB::bind_method(_MD("set_dragger_visibility","mode"),&SplitContainer::set_dragger_visibility); - ObjectTypeDB::bind_method(_MD("get_dragger_visibility"),&SplitContainer::get_dragger_visibility); + ClassDB::bind_method(_MD("set_dragger_visibility","mode"),&SplitContainer::set_dragger_visibility); + ClassDB::bind_method(_MD("get_dragger_visibility"),&SplitContainer::get_dragger_visibility); ADD_SIGNAL( MethodInfo("dragged",PropertyInfo(Variant::INT,"offset"))); diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h index 5893043bbe..b9c77db253 100644 --- a/scene/gui/split_container.h +++ b/scene/gui/split_container.h @@ -34,7 +34,7 @@ class SplitContainer : public Container { - OBJ_TYPE(SplitContainer,Container); + GDCLASS(SplitContainer,Container); public: enum DraggerVisibility { DRAGGER_VISIBLE, @@ -86,7 +86,7 @@ VARIANT_ENUM_CAST(SplitContainer::DraggerVisibility); class HSplitContainer : public SplitContainer { - OBJ_TYPE(HSplitContainer,SplitContainer); + GDCLASS(HSplitContainer,SplitContainer); public: @@ -96,7 +96,7 @@ public: class VSplitContainer : public SplitContainer { - OBJ_TYPE(VSplitContainer,SplitContainer); + GDCLASS(VSplitContainer,SplitContainer); public: diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index b298850a2f..d47a4f7ae6 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -714,24 +714,24 @@ Popup* TabContainer::get_popup() const { void TabContainer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&TabContainer::_input_event); - ObjectTypeDB::bind_method(_MD("get_tab_count"),&TabContainer::get_tab_count); - ObjectTypeDB::bind_method(_MD("set_current_tab","tab_idx"),&TabContainer::set_current_tab); - ObjectTypeDB::bind_method(_MD("get_current_tab"),&TabContainer::get_current_tab); - ObjectTypeDB::bind_method(_MD("get_current_tab_control:Control"),&TabContainer::get_current_tab_control); - ObjectTypeDB::bind_method(_MD("get_tab_control:Control","idx"),&TabContainer::get_tab_control); - ObjectTypeDB::bind_method(_MD("set_tab_align","align"),&TabContainer::set_tab_align); - ObjectTypeDB::bind_method(_MD("get_tab_align"),&TabContainer::get_tab_align); - ObjectTypeDB::bind_method(_MD("set_tabs_visible","visible"),&TabContainer::set_tabs_visible); - ObjectTypeDB::bind_method(_MD("are_tabs_visible"),&TabContainer::are_tabs_visible); - ObjectTypeDB::bind_method(_MD("set_tab_title","tab_idx","title"),&TabContainer::set_tab_title); - ObjectTypeDB::bind_method(_MD("get_tab_title","tab_idx"),&TabContainer::get_tab_title); - ObjectTypeDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&TabContainer::set_tab_icon); - ObjectTypeDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&TabContainer::get_tab_icon); - ObjectTypeDB::bind_method(_MD("set_popup","popup:Popup"),&TabContainer::set_popup); - ObjectTypeDB::bind_method(_MD("get_popup:Popup"),&TabContainer::get_popup); - - ObjectTypeDB::bind_method(_MD("_child_renamed_callback"),&TabContainer::_child_renamed_callback); + ClassDB::bind_method(_MD("_input_event"),&TabContainer::_input_event); + ClassDB::bind_method(_MD("get_tab_count"),&TabContainer::get_tab_count); + ClassDB::bind_method(_MD("set_current_tab","tab_idx"),&TabContainer::set_current_tab); + ClassDB::bind_method(_MD("get_current_tab"),&TabContainer::get_current_tab); + ClassDB::bind_method(_MD("get_current_tab_control:Control"),&TabContainer::get_current_tab_control); + ClassDB::bind_method(_MD("get_tab_control:Control","idx"),&TabContainer::get_tab_control); + ClassDB::bind_method(_MD("set_tab_align","align"),&TabContainer::set_tab_align); + ClassDB::bind_method(_MD("get_tab_align"),&TabContainer::get_tab_align); + ClassDB::bind_method(_MD("set_tabs_visible","visible"),&TabContainer::set_tabs_visible); + ClassDB::bind_method(_MD("are_tabs_visible"),&TabContainer::are_tabs_visible); + ClassDB::bind_method(_MD("set_tab_title","tab_idx","title"),&TabContainer::set_tab_title); + ClassDB::bind_method(_MD("get_tab_title","tab_idx"),&TabContainer::get_tab_title); + ClassDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&TabContainer::set_tab_icon); + ClassDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&TabContainer::get_tab_icon); + ClassDB::bind_method(_MD("set_popup","popup:Popup"),&TabContainer::set_popup); + ClassDB::bind_method(_MD("get_popup:Popup"),&TabContainer::get_popup); + + ClassDB::bind_method(_MD("_child_renamed_callback"),&TabContainer::_child_renamed_callback); ADD_SIGNAL(MethodInfo("tab_changed",PropertyInfo(Variant::INT,"tab"))); ADD_SIGNAL(MethodInfo("pre_popup_pressed")); diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h index d63caf173a..6885a0f569 100644 --- a/scene/gui/tab_container.h +++ b/scene/gui/tab_container.h @@ -34,7 +34,7 @@ #include "scene/gui/popup.h" class TabContainer : public Control { - OBJ_TYPE( TabContainer, Control ); + GDCLASS( TabContainer, Control ); public: enum TabAlign { diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 83e51eb6c8..2518672705 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -649,19 +649,19 @@ void Tabs::set_tab_close_display_policy(CloseButtonDisplayPolicy p_policy) { void Tabs::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&Tabs::_input_event); - ObjectTypeDB::bind_method(_MD("get_tab_count"),&Tabs::get_tab_count); - ObjectTypeDB::bind_method(_MD("set_current_tab","tab_idx"),&Tabs::set_current_tab); - ObjectTypeDB::bind_method(_MD("get_current_tab"),&Tabs::get_current_tab); - ObjectTypeDB::bind_method(_MD("set_tab_title","tab_idx","title"),&Tabs::set_tab_title); - ObjectTypeDB::bind_method(_MD("get_tab_title","tab_idx"),&Tabs::get_tab_title); - ObjectTypeDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&Tabs::set_tab_icon); - ObjectTypeDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&Tabs::get_tab_icon); - ObjectTypeDB::bind_method(_MD("remove_tab","tab_idx"),&Tabs::remove_tab); - ObjectTypeDB::bind_method(_MD("add_tab","title","icon:Texture"),&Tabs::add_tab); - ObjectTypeDB::bind_method(_MD("set_tab_align","align"),&Tabs::set_tab_align); - ObjectTypeDB::bind_method(_MD("get_tab_align"),&Tabs::get_tab_align); - ObjectTypeDB::bind_method(_MD("ensure_tab_visible","idx"),&Tabs::ensure_tab_visible); + ClassDB::bind_method(_MD("_input_event"),&Tabs::_input_event); + ClassDB::bind_method(_MD("get_tab_count"),&Tabs::get_tab_count); + ClassDB::bind_method(_MD("set_current_tab","tab_idx"),&Tabs::set_current_tab); + ClassDB::bind_method(_MD("get_current_tab"),&Tabs::get_current_tab); + ClassDB::bind_method(_MD("set_tab_title","tab_idx","title"),&Tabs::set_tab_title); + ClassDB::bind_method(_MD("get_tab_title","tab_idx"),&Tabs::get_tab_title); + ClassDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&Tabs::set_tab_icon); + ClassDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&Tabs::get_tab_icon); + ClassDB::bind_method(_MD("remove_tab","tab_idx"),&Tabs::remove_tab); + ClassDB::bind_method(_MD("add_tab","title","icon:Texture"),&Tabs::add_tab); + ClassDB::bind_method(_MD("set_tab_align","align"),&Tabs::set_tab_align); + ClassDB::bind_method(_MD("get_tab_align"),&Tabs::get_tab_align); + ClassDB::bind_method(_MD("ensure_tab_visible","idx"),&Tabs::ensure_tab_visible); ADD_SIGNAL(MethodInfo("tab_changed",PropertyInfo(Variant::INT,"tab"))); ADD_SIGNAL(MethodInfo("right_button_pressed",PropertyInfo(Variant::INT,"tab"))); diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h index adbddd56e3..81e1c565b5 100644 --- a/scene/gui/tabs.h +++ b/scene/gui/tabs.h @@ -33,7 +33,7 @@ class Tabs : public Control { - OBJ_TYPE( Tabs, Control ); + GDCLASS( Tabs, Control ); public: enum TabAlign { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c4d0664eb3..64c4f4fa49 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4607,80 +4607,80 @@ PopupMenu *TextEdit::get_menu() const { void TextEdit::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_input_event"),&TextEdit::_input_event); - ObjectTypeDB::bind_method(_MD("_scroll_moved"),&TextEdit::_scroll_moved); - ObjectTypeDB::bind_method(_MD("_cursor_changed_emit"),&TextEdit::_cursor_changed_emit); - ObjectTypeDB::bind_method(_MD("_text_changed_emit"),&TextEdit::_text_changed_emit); - ObjectTypeDB::bind_method(_MD("_push_current_op"),&TextEdit::_push_current_op); - ObjectTypeDB::bind_method(_MD("_click_selection_held"),&TextEdit::_click_selection_held); - ObjectTypeDB::bind_method(_MD("_toggle_draw_caret"),&TextEdit::_toggle_draw_caret); + ClassDB::bind_method(_MD("_input_event"),&TextEdit::_input_event); + ClassDB::bind_method(_MD("_scroll_moved"),&TextEdit::_scroll_moved); + ClassDB::bind_method(_MD("_cursor_changed_emit"),&TextEdit::_cursor_changed_emit); + ClassDB::bind_method(_MD("_text_changed_emit"),&TextEdit::_text_changed_emit); + ClassDB::bind_method(_MD("_push_current_op"),&TextEdit::_push_current_op); + ClassDB::bind_method(_MD("_click_selection_held"),&TextEdit::_click_selection_held); + ClassDB::bind_method(_MD("_toggle_draw_caret"),&TextEdit::_toggle_draw_caret); BIND_CONSTANT( SEARCH_MATCH_CASE ); BIND_CONSTANT( SEARCH_WHOLE_WORDS ); BIND_CONSTANT( SEARCH_BACKWARDS ); /* - ObjectTypeDB::bind_method(_MD("delete_char"),&TextEdit::delete_char); - ObjectTypeDB::bind_method(_MD("delete_line"),&TextEdit::delete_line); + ClassDB::bind_method(_MD("delete_char"),&TextEdit::delete_char); + ClassDB::bind_method(_MD("delete_line"),&TextEdit::delete_line); */ - ObjectTypeDB::bind_method(_MD("set_text","text"),&TextEdit::set_text); - ObjectTypeDB::bind_method(_MD("insert_text_at_cursor","text"),&TextEdit::insert_text_at_cursor); - - ObjectTypeDB::bind_method(_MD("get_line_count"),&TextEdit::get_line_count); - ObjectTypeDB::bind_method(_MD("get_text"),&TextEdit::get_text); - ObjectTypeDB::bind_method(_MD("get_line","line"),&TextEdit::get_line); - - ObjectTypeDB::bind_method(_MD("cursor_set_column","column","adjust_viewport"),&TextEdit::cursor_set_column,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("cursor_set_line","line","adjust_viewport"),&TextEdit::cursor_set_line,DEFVAL(false)); - - ObjectTypeDB::bind_method(_MD("cursor_get_column"),&TextEdit::cursor_get_column); - ObjectTypeDB::bind_method(_MD("cursor_get_line"),&TextEdit::cursor_get_line); - ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enable"),&TextEdit::cursor_set_blink_enabled); - ObjectTypeDB::bind_method(_MD("cursor_get_blink_enabled"),&TextEdit::cursor_get_blink_enabled); - ObjectTypeDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&TextEdit::cursor_set_blink_speed); - ObjectTypeDB::bind_method(_MD("cursor_get_blink_speed"),&TextEdit::cursor_get_blink_speed); - ObjectTypeDB::bind_method(_MD("cursor_set_block_mode", "enable"), &TextEdit::cursor_set_block_mode); - ObjectTypeDB::bind_method(_MD("cursor_is_block_mode"), &TextEdit::cursor_is_block_mode); - - ObjectTypeDB::bind_method(_MD("set_readonly","enable"),&TextEdit::set_readonly); - ObjectTypeDB::bind_method(_MD("set_wrap","enable"),&TextEdit::set_wrap); - ObjectTypeDB::bind_method(_MD("set_max_chars","amount"),&TextEdit::set_max_chars); - - ObjectTypeDB::bind_method(_MD("cut"),&TextEdit::cut); - ObjectTypeDB::bind_method(_MD("copy"),&TextEdit::copy); - ObjectTypeDB::bind_method(_MD("paste"),&TextEdit::paste); - ObjectTypeDB::bind_method(_MD("select_all"),&TextEdit::select_all); - ObjectTypeDB::bind_method(_MD("select","from_line","from_column","to_line","to_column"),&TextEdit::select); - - ObjectTypeDB::bind_method(_MD("is_selection_active"),&TextEdit::is_selection_active); - ObjectTypeDB::bind_method(_MD("get_selection_from_line"),&TextEdit::get_selection_from_line); - ObjectTypeDB::bind_method(_MD("get_selection_from_column"),&TextEdit::get_selection_from_column); - ObjectTypeDB::bind_method(_MD("get_selection_to_line"),&TextEdit::get_selection_to_line); - ObjectTypeDB::bind_method(_MD("get_selection_to_column"),&TextEdit::get_selection_to_column); - ObjectTypeDB::bind_method(_MD("get_selection_text"),&TextEdit::get_selection_text); - ObjectTypeDB::bind_method(_MD("get_word_under_cursor"),&TextEdit::get_word_under_cursor); - ObjectTypeDB::bind_method(_MD("search","flags","from_line","from_column","to_line","to_column"),&TextEdit::_search_bind); - - ObjectTypeDB::bind_method(_MD("undo"),&TextEdit::undo); - ObjectTypeDB::bind_method(_MD("redo"),&TextEdit::redo); - ObjectTypeDB::bind_method(_MD("clear_undo_history"),&TextEdit::clear_undo_history); - - ObjectTypeDB::bind_method(_MD("set_show_line_numbers", "enable"), &TextEdit::set_show_line_numbers); - ObjectTypeDB::bind_method(_MD("is_show_line_numbers_enabled"), &TextEdit::is_show_line_numbers_enabled); - - ObjectTypeDB::bind_method(_MD("set_highlight_all_occurrences", "enable"), &TextEdit::set_highlight_all_occurrences); - ObjectTypeDB::bind_method(_MD("is_highlight_all_occurrences_enabled"), &TextEdit::is_highlight_all_occurrences_enabled); - - ObjectTypeDB::bind_method(_MD("set_syntax_coloring","enable"),&TextEdit::set_syntax_coloring); - ObjectTypeDB::bind_method(_MD("is_syntax_coloring_enabled"),&TextEdit::is_syntax_coloring_enabled); - - - ObjectTypeDB::bind_method(_MD("add_keyword_color","keyword","color"),&TextEdit::add_keyword_color); - ObjectTypeDB::bind_method(_MD("add_color_region","begin_key","end_key","color","line_only"),&TextEdit::add_color_region,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("clear_colors"),&TextEdit::clear_colors); - ObjectTypeDB::bind_method(_MD("menu_option"),&TextEdit::menu_option); - ObjectTypeDB::bind_method(_MD("get_menu:PopupMenu"),&TextEdit::get_menu); + ClassDB::bind_method(_MD("set_text","text"),&TextEdit::set_text); + ClassDB::bind_method(_MD("insert_text_at_cursor","text"),&TextEdit::insert_text_at_cursor); + + ClassDB::bind_method(_MD("get_line_count"),&TextEdit::get_line_count); + ClassDB::bind_method(_MD("get_text"),&TextEdit::get_text); + ClassDB::bind_method(_MD("get_line","line"),&TextEdit::get_line); + + ClassDB::bind_method(_MD("cursor_set_column","column","adjust_viewport"),&TextEdit::cursor_set_column,DEFVAL(false)); + ClassDB::bind_method(_MD("cursor_set_line","line","adjust_viewport"),&TextEdit::cursor_set_line,DEFVAL(false)); + + ClassDB::bind_method(_MD("cursor_get_column"),&TextEdit::cursor_get_column); + ClassDB::bind_method(_MD("cursor_get_line"),&TextEdit::cursor_get_line); + ClassDB::bind_method(_MD("cursor_set_blink_enabled", "enable"),&TextEdit::cursor_set_blink_enabled); + ClassDB::bind_method(_MD("cursor_get_blink_enabled"),&TextEdit::cursor_get_blink_enabled); + ClassDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&TextEdit::cursor_set_blink_speed); + ClassDB::bind_method(_MD("cursor_get_blink_speed"),&TextEdit::cursor_get_blink_speed); + ClassDB::bind_method(_MD("cursor_set_block_mode", "enable"), &TextEdit::cursor_set_block_mode); + ClassDB::bind_method(_MD("cursor_is_block_mode"), &TextEdit::cursor_is_block_mode); + + ClassDB::bind_method(_MD("set_readonly","enable"),&TextEdit::set_readonly); + ClassDB::bind_method(_MD("set_wrap","enable"),&TextEdit::set_wrap); + ClassDB::bind_method(_MD("set_max_chars","amount"),&TextEdit::set_max_chars); + + ClassDB::bind_method(_MD("cut"),&TextEdit::cut); + ClassDB::bind_method(_MD("copy"),&TextEdit::copy); + ClassDB::bind_method(_MD("paste"),&TextEdit::paste); + ClassDB::bind_method(_MD("select_all"),&TextEdit::select_all); + ClassDB::bind_method(_MD("select","from_line","from_column","to_line","to_column"),&TextEdit::select); + + ClassDB::bind_method(_MD("is_selection_active"),&TextEdit::is_selection_active); + ClassDB::bind_method(_MD("get_selection_from_line"),&TextEdit::get_selection_from_line); + ClassDB::bind_method(_MD("get_selection_from_column"),&TextEdit::get_selection_from_column); + ClassDB::bind_method(_MD("get_selection_to_line"),&TextEdit::get_selection_to_line); + ClassDB::bind_method(_MD("get_selection_to_column"),&TextEdit::get_selection_to_column); + ClassDB::bind_method(_MD("get_selection_text"),&TextEdit::get_selection_text); + ClassDB::bind_method(_MD("get_word_under_cursor"),&TextEdit::get_word_under_cursor); + ClassDB::bind_method(_MD("search","flags","from_line","from_column","to_line","to_column"),&TextEdit::_search_bind); + + ClassDB::bind_method(_MD("undo"),&TextEdit::undo); + ClassDB::bind_method(_MD("redo"),&TextEdit::redo); + ClassDB::bind_method(_MD("clear_undo_history"),&TextEdit::clear_undo_history); + + ClassDB::bind_method(_MD("set_show_line_numbers", "enable"), &TextEdit::set_show_line_numbers); + ClassDB::bind_method(_MD("is_show_line_numbers_enabled"), &TextEdit::is_show_line_numbers_enabled); + + ClassDB::bind_method(_MD("set_highlight_all_occurrences", "enable"), &TextEdit::set_highlight_all_occurrences); + ClassDB::bind_method(_MD("is_highlight_all_occurrences_enabled"), &TextEdit::is_highlight_all_occurrences_enabled); + + ClassDB::bind_method(_MD("set_syntax_coloring","enable"),&TextEdit::set_syntax_coloring); + ClassDB::bind_method(_MD("is_syntax_coloring_enabled"),&TextEdit::is_syntax_coloring_enabled); + + + ClassDB::bind_method(_MD("add_keyword_color","keyword","color"),&TextEdit::add_keyword_color); + ClassDB::bind_method(_MD("add_color_region","begin_key","end_key","color","line_only"),&TextEdit::add_color_region,DEFVAL(false)); + ClassDB::bind_method(_MD("clear_colors"),&TextEdit::clear_colors); + ClassDB::bind_method(_MD("menu_option"),&TextEdit::menu_option); + ClassDB::bind_method(_MD("get_menu:PopupMenu"),&TextEdit::get_menu); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "syntax_highlighting"), _SCS("set_syntax_coloring"), _SCS("is_syntax_coloring_enabled")); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), _SCS("set_show_line_numbers"), _SCS("is_show_line_numbers_enabled")); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index d94ade96bf..c674c859e6 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -37,7 +37,7 @@ class TextEdit : public Control { - OBJ_TYPE( TextEdit, Control ); + GDCLASS( TextEdit, Control ); struct Cursor { int last_fit_x; diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp index 2c788ee34c..74337eff58 100644 --- a/scene/gui/texture_button.cpp +++ b/scene/gui/texture_button.cpp @@ -136,23 +136,23 @@ void TextureButton::_notification(int p_what) { void TextureButton::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_normal_texture","texture:Texture"),&TextureButton::set_normal_texture); - ObjectTypeDB::bind_method(_MD("set_pressed_texture","texture:Texture"),&TextureButton::set_pressed_texture); - ObjectTypeDB::bind_method(_MD("set_hover_texture","texture:Texture"),&TextureButton::set_hover_texture); - ObjectTypeDB::bind_method(_MD("set_disabled_texture","texture:Texture"),&TextureButton::set_disabled_texture); - ObjectTypeDB::bind_method(_MD("set_focused_texture","texture:Texture"),&TextureButton::set_focused_texture); - ObjectTypeDB::bind_method(_MD("set_click_mask","mask:BitMap"),&TextureButton::set_click_mask); - ObjectTypeDB::bind_method(_MD("set_texture_scale","scale"),&TextureButton::set_texture_scale); - ObjectTypeDB::bind_method(_MD("set_modulate","color"),&TextureButton::set_modulate); - - ObjectTypeDB::bind_method(_MD("get_normal_texture:Texture"),&TextureButton::get_normal_texture); - ObjectTypeDB::bind_method(_MD("get_pressed_texture:Texture"),&TextureButton::get_pressed_texture); - ObjectTypeDB::bind_method(_MD("get_hover_texture:Texture"),&TextureButton::get_hover_texture); - ObjectTypeDB::bind_method(_MD("get_disabled_texture:Texture"),&TextureButton::get_disabled_texture); - ObjectTypeDB::bind_method(_MD("get_focused_texture:Texture"),&TextureButton::get_focused_texture); - ObjectTypeDB::bind_method(_MD("get_click_mask:BitMap"),&TextureButton::get_click_mask); - ObjectTypeDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale); - ObjectTypeDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate); + ClassDB::bind_method(_MD("set_normal_texture","texture:Texture"),&TextureButton::set_normal_texture); + ClassDB::bind_method(_MD("set_pressed_texture","texture:Texture"),&TextureButton::set_pressed_texture); + ClassDB::bind_method(_MD("set_hover_texture","texture:Texture"),&TextureButton::set_hover_texture); + ClassDB::bind_method(_MD("set_disabled_texture","texture:Texture"),&TextureButton::set_disabled_texture); + ClassDB::bind_method(_MD("set_focused_texture","texture:Texture"),&TextureButton::set_focused_texture); + ClassDB::bind_method(_MD("set_click_mask","mask:BitMap"),&TextureButton::set_click_mask); + ClassDB::bind_method(_MD("set_texture_scale","scale"),&TextureButton::set_texture_scale); + ClassDB::bind_method(_MD("set_modulate","color"),&TextureButton::set_modulate); + + ClassDB::bind_method(_MD("get_normal_texture:Texture"),&TextureButton::get_normal_texture); + ClassDB::bind_method(_MD("get_pressed_texture:Texture"),&TextureButton::get_pressed_texture); + ClassDB::bind_method(_MD("get_hover_texture:Texture"),&TextureButton::get_hover_texture); + ClassDB::bind_method(_MD("get_disabled_texture:Texture"),&TextureButton::get_disabled_texture); + ClassDB::bind_method(_MD("get_focused_texture:Texture"),&TextureButton::get_focused_texture); + ClassDB::bind_method(_MD("get_click_mask:BitMap"),&TextureButton::get_click_mask); + ClassDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale); + ClassDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture")); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/pressed",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_pressed_texture"), _SCS("get_pressed_texture")); diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h index 047dbfadfa..b6cb531c71 100644 --- a/scene/gui/texture_button.h +++ b/scene/gui/texture_button.h @@ -33,7 +33,7 @@ #include "scene/resources/bit_mask.h" class TextureButton : public BaseButton { - OBJ_TYPE( TextureButton, BaseButton ); + GDCLASS( TextureButton, BaseButton ); Ref<Texture> normal; Ref<Texture> pressed; diff --git a/scene/gui/texture_frame.cpp b/scene/gui/texture_frame.cpp index 571aafdbf7..9c2113233c 100644 --- a/scene/gui/texture_frame.cpp +++ b/scene/gui/texture_frame.cpp @@ -95,14 +95,14 @@ Size2 TextureFrame::get_minimum_size() const { void TextureFrame::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_texture","texture"), & TextureFrame::set_texture ); - ObjectTypeDB::bind_method(_MD("get_texture"), & TextureFrame::get_texture ); - ObjectTypeDB::bind_method(_MD("set_modulate","modulate"), & TextureFrame::set_modulate ); - ObjectTypeDB::bind_method(_MD("get_modulate"), & TextureFrame::get_modulate ); - ObjectTypeDB::bind_method(_MD("set_expand","enable"), & TextureFrame::set_expand ); - ObjectTypeDB::bind_method(_MD("has_expand"), & TextureFrame::has_expand ); - ObjectTypeDB::bind_method(_MD("set_stretch_mode","stretch_mode"), & TextureFrame::set_stretch_mode ); - ObjectTypeDB::bind_method(_MD("get_stretch_mode"), & TextureFrame::get_stretch_mode ); + ClassDB::bind_method(_MD("set_texture","texture"), & TextureFrame::set_texture ); + ClassDB::bind_method(_MD("get_texture"), & TextureFrame::get_texture ); + ClassDB::bind_method(_MD("set_modulate","modulate"), & TextureFrame::set_modulate ); + ClassDB::bind_method(_MD("get_modulate"), & TextureFrame::get_modulate ); + ClassDB::bind_method(_MD("set_expand","enable"), & TextureFrame::set_expand ); + ClassDB::bind_method(_MD("has_expand"), & TextureFrame::has_expand ); + ClassDB::bind_method(_MD("set_stretch_mode","stretch_mode"), & TextureFrame::set_stretch_mode ); + ClassDB::bind_method(_MD("get_stretch_mode"), & TextureFrame::get_stretch_mode ); 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") ); diff --git a/scene/gui/texture_frame.h b/scene/gui/texture_frame.h index bfd0ff0c20..47a653a117 100644 --- a/scene/gui/texture_frame.h +++ b/scene/gui/texture_frame.h @@ -35,7 +35,7 @@ */ class TextureFrame : public Control { - OBJ_TYPE(TextureFrame,Control); + GDCLASS(TextureFrame,Control); public: enum StretchMode { STRETCH_SCALE_ON_EXPAND, //default, for backwards compatibility diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp index ba9fec03d2..93e89f0769 100644 --- a/scene/gui/texture_progress.cpp +++ b/scene/gui/texture_progress.cpp @@ -255,26 +255,26 @@ Point2 TextureProgress::get_radial_center_offset() 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); + ClassDB::bind_method(_MD("set_under_texture","tex"),&TextureProgress::set_under_texture); + ClassDB::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); + ClassDB::bind_method(_MD("set_progress_texture","tex"),&TextureProgress::set_progress_texture); + ClassDB::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); + ClassDB::bind_method(_MD("set_over_texture","tex"),&TextureProgress::set_over_texture); + ClassDB::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); + ClassDB::bind_method(_MD("set_fill_mode","mode"),&TextureProgress::set_fill_mode); + ClassDB::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); + ClassDB::bind_method(_MD("set_radial_initial_angle","mode"),&TextureProgress::set_radial_initial_angle); + ClassDB::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); + ClassDB::bind_method(_MD("set_radial_center_offset","mode"),&TextureProgress::set_radial_center_offset); + ClassDB::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); + ClassDB::bind_method(_MD("set_fill_degrees","mode"),&TextureProgress::set_fill_degrees); + ClassDB::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")); diff --git a/scene/gui/texture_progress.h b/scene/gui/texture_progress.h index 17faa606f9..02794354ef 100644 --- a/scene/gui/texture_progress.h +++ b/scene/gui/texture_progress.h @@ -33,7 +33,7 @@ class TextureProgress : public Range { - OBJ_TYPE( TextureProgress, Range ); + GDCLASS( TextureProgress, Range ); Ref<Texture> under; Ref<Texture> progress; diff --git a/scene/gui/tool_button.h b/scene/gui/tool_button.h index bce4657e8e..ddeb34273b 100644 --- a/scene/gui/tool_button.h +++ b/scene/gui/tool_button.h @@ -32,7 +32,7 @@ #include "scene/gui/button.h" class ToolButton : public Button { - OBJ_TYPE(ToolButton,Button); + GDCLASS(ToolButton,Button); public: ToolButton(); }; diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index c6727d132e..6e8d4a173f 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -657,76 +657,76 @@ Color TreeItem::get_custom_bg_color(int p_column) const { void TreeItem::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_cell_mode","column","mode"),&TreeItem::set_cell_mode); - ObjectTypeDB::bind_method(_MD("get_cell_mode","column"),&TreeItem::get_cell_mode); + ClassDB::bind_method(_MD("set_cell_mode","column","mode"),&TreeItem::set_cell_mode); + ClassDB::bind_method(_MD("get_cell_mode","column"),&TreeItem::get_cell_mode); - ObjectTypeDB::bind_method(_MD("set_checked","column","checked"),&TreeItem::set_checked); - ObjectTypeDB::bind_method(_MD("is_checked","column"),&TreeItem::is_checked); + ClassDB::bind_method(_MD("set_checked","column","checked"),&TreeItem::set_checked); + ClassDB::bind_method(_MD("is_checked","column"),&TreeItem::is_checked); - ObjectTypeDB::bind_method(_MD("set_text","column","text"),&TreeItem::set_text); - ObjectTypeDB::bind_method(_MD("get_text","column"),&TreeItem::get_text); + ClassDB::bind_method(_MD("set_text","column","text"),&TreeItem::set_text); + ClassDB::bind_method(_MD("get_text","column"),&TreeItem::get_text); - ObjectTypeDB::bind_method(_MD("set_icon","column","texture:Texture"),&TreeItem::set_icon); - ObjectTypeDB::bind_method(_MD("get_icon:Texture","column"),&TreeItem::get_icon); + ClassDB::bind_method(_MD("set_icon","column","texture:Texture"),&TreeItem::set_icon); + ClassDB::bind_method(_MD("get_icon:Texture","column"),&TreeItem::get_icon); - ObjectTypeDB::bind_method(_MD("set_icon_region","column","region"),&TreeItem::set_icon_region); - ObjectTypeDB::bind_method(_MD("get_icon_region","column"),&TreeItem::get_icon_region); + ClassDB::bind_method(_MD("set_icon_region","column","region"),&TreeItem::set_icon_region); + ClassDB::bind_method(_MD("get_icon_region","column"),&TreeItem::get_icon_region); - ObjectTypeDB::bind_method(_MD("set_icon_max_width","column","width"),&TreeItem::set_icon_max_width); - ObjectTypeDB::bind_method(_MD("get_icon_max_width","column"),&TreeItem::get_icon_max_width); + ClassDB::bind_method(_MD("set_icon_max_width","column","width"),&TreeItem::set_icon_max_width); + ClassDB::bind_method(_MD("get_icon_max_width","column"),&TreeItem::get_icon_max_width); - ObjectTypeDB::bind_method(_MD("set_range","column","value"),&TreeItem::set_range); - ObjectTypeDB::bind_method(_MD("get_range","column"),&TreeItem::get_range); - ObjectTypeDB::bind_method(_MD("set_range_config","column","min","max","step","expr"),&TreeItem::set_range_config,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("get_range_config","column"),&TreeItem::_get_range_config); + ClassDB::bind_method(_MD("set_range","column","value"),&TreeItem::set_range); + ClassDB::bind_method(_MD("get_range","column"),&TreeItem::get_range); + ClassDB::bind_method(_MD("set_range_config","column","min","max","step","expr"),&TreeItem::set_range_config,DEFVAL(false)); + ClassDB::bind_method(_MD("get_range_config","column"),&TreeItem::_get_range_config); - ObjectTypeDB::bind_method(_MD("set_metadata","column","meta"),&TreeItem::set_metadata); - ObjectTypeDB::bind_method(_MD("get_metadata","column"),&TreeItem::get_metadata); + ClassDB::bind_method(_MD("set_metadata","column","meta"),&TreeItem::set_metadata); + ClassDB::bind_method(_MD("get_metadata","column"),&TreeItem::get_metadata); - ObjectTypeDB::bind_method(_MD("set_custom_draw","column","object","callback"),&TreeItem::set_custom_draw); + ClassDB::bind_method(_MD("set_custom_draw","column","object","callback"),&TreeItem::set_custom_draw); - ObjectTypeDB::bind_method(_MD("set_collapsed","enable"),&TreeItem::set_collapsed); - ObjectTypeDB::bind_method(_MD("is_collapsed"),&TreeItem::is_collapsed); + ClassDB::bind_method(_MD("set_collapsed","enable"),&TreeItem::set_collapsed); + ClassDB::bind_method(_MD("is_collapsed"),&TreeItem::is_collapsed); - ObjectTypeDB::bind_method(_MD("get_next:TreeItem"),&TreeItem::get_next); - ObjectTypeDB::bind_method(_MD("get_prev:TreeItem"),&TreeItem::get_prev); - ObjectTypeDB::bind_method(_MD("get_parent:TreeItem"),&TreeItem::get_parent); - ObjectTypeDB::bind_method(_MD("get_children:TreeItem"),&TreeItem::get_children); + ClassDB::bind_method(_MD("get_next:TreeItem"),&TreeItem::get_next); + ClassDB::bind_method(_MD("get_prev:TreeItem"),&TreeItem::get_prev); + ClassDB::bind_method(_MD("get_parent:TreeItem"),&TreeItem::get_parent); + ClassDB::bind_method(_MD("get_children:TreeItem"),&TreeItem::get_children); - ObjectTypeDB::bind_method(_MD("get_next_visible:TreeItem"),&TreeItem::get_next_visible); - ObjectTypeDB::bind_method(_MD("get_prev_visible:TreeItem"),&TreeItem::get_prev_visible); + ClassDB::bind_method(_MD("get_next_visible:TreeItem"),&TreeItem::get_next_visible); + ClassDB::bind_method(_MD("get_prev_visible:TreeItem"),&TreeItem::get_prev_visible); - ObjectTypeDB::bind_method(_MD("remove_child:TreeItem","child"),&TreeItem::_remove_child); + ClassDB::bind_method(_MD("remove_child:TreeItem","child"),&TreeItem::_remove_child); - ObjectTypeDB::bind_method(_MD("set_selectable","column","selectable"),&TreeItem::set_selectable); - ObjectTypeDB::bind_method(_MD("is_selectable","column"),&TreeItem::is_selectable); + ClassDB::bind_method(_MD("set_selectable","column","selectable"),&TreeItem::set_selectable); + ClassDB::bind_method(_MD("is_selectable","column"),&TreeItem::is_selectable); - ObjectTypeDB::bind_method(_MD("is_selected","column"),&TreeItem::is_selected); - ObjectTypeDB::bind_method(_MD("select","column"),&TreeItem::select); - ObjectTypeDB::bind_method(_MD("deselect","column"),&TreeItem::deselect); + ClassDB::bind_method(_MD("is_selected","column"),&TreeItem::is_selected); + ClassDB::bind_method(_MD("select","column"),&TreeItem::select); + ClassDB::bind_method(_MD("deselect","column"),&TreeItem::deselect); - ObjectTypeDB::bind_method(_MD("set_editable","column","enabled"),&TreeItem::set_editable); - ObjectTypeDB::bind_method(_MD("is_editable","column"),&TreeItem::is_editable); + ClassDB::bind_method(_MD("set_editable","column","enabled"),&TreeItem::set_editable); + ClassDB::bind_method(_MD("is_editable","column"),&TreeItem::is_editable); - ObjectTypeDB::bind_method(_MD("set_custom_color","column","color"),&TreeItem::set_custom_color); - ObjectTypeDB::bind_method(_MD("clear_custom_color","column"),&TreeItem::clear_custom_color); + ClassDB::bind_method(_MD("set_custom_color","column","color"),&TreeItem::set_custom_color); + ClassDB::bind_method(_MD("clear_custom_color","column"),&TreeItem::clear_custom_color); - ObjectTypeDB::bind_method(_MD("set_custom_bg_color","column","color","just_outline"),&TreeItem::set_custom_bg_color,DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("clear_custom_bg_color","column"),&TreeItem::clear_custom_bg_color); - ObjectTypeDB::bind_method(_MD("get_custom_bg_color","column"),&TreeItem::get_custom_bg_color); + ClassDB::bind_method(_MD("set_custom_bg_color","column","color","just_outline"),&TreeItem::set_custom_bg_color,DEFVAL(false)); + ClassDB::bind_method(_MD("clear_custom_bg_color","column"),&TreeItem::clear_custom_bg_color); + ClassDB::bind_method(_MD("get_custom_bg_color","column"),&TreeItem::get_custom_bg_color); - ObjectTypeDB::bind_method(_MD("add_button","column","button:Texture","button_idx","disabled"),&TreeItem::add_button,DEFVAL(-1),DEFVAL(false)); - ObjectTypeDB::bind_method(_MD("get_button_count","column"),&TreeItem::get_button_count); - ObjectTypeDB::bind_method(_MD("get_button:Texture","column","button_idx"),&TreeItem::get_button); - ObjectTypeDB::bind_method(_MD("set_button","column","button_idx","button:Texture"),&TreeItem::set_button); - ObjectTypeDB::bind_method(_MD("erase_button","column","button_idx"),&TreeItem::erase_button); - ObjectTypeDB::bind_method(_MD("is_button_disabled","column","button_idx"),&TreeItem::is_button_disabled); + ClassDB::bind_method(_MD("add_button","column","button:Texture","button_idx","disabled"),&TreeItem::add_button,DEFVAL(-1),DEFVAL(false)); + ClassDB::bind_method(_MD("get_button_count","column"),&TreeItem::get_button_count); + ClassDB::bind_method(_MD("get_button:Texture","column","button_idx"),&TreeItem::get_button); + ClassDB::bind_method(_MD("set_button","column","button_idx","button:Texture"),&TreeItem::set_button); + ClassDB::bind_method(_MD("erase_button","column","button_idx"),&TreeItem::erase_button); + ClassDB::bind_method(_MD("is_button_disabled","column","button_idx"),&TreeItem::is_button_disabled); - ObjectTypeDB::bind_method(_MD("set_tooltip","column","tooltip"),&TreeItem::set_tooltip); - ObjectTypeDB::bind_method(_MD("get_tooltip","column"),&TreeItem::get_tooltip); + ClassDB::bind_method(_MD("set_tooltip","column","tooltip"),&TreeItem::set_tooltip); + ClassDB::bind_method(_MD("get_tooltip","column"),&TreeItem::get_tooltip); - ObjectTypeDB::bind_method(_MD("move_to_top"),&TreeItem::move_to_top); - ObjectTypeDB::bind_method(_MD("move_to_bottom"),&TreeItem::move_to_bottom); + ClassDB::bind_method(_MD("move_to_top"),&TreeItem::move_to_top); + ClassDB::bind_method(_MD("move_to_bottom"),&TreeItem::move_to_bottom); BIND_CONSTANT( CELL_MODE_STRING ); BIND_CONSTANT( CELL_MODE_CHECK ); @@ -3566,59 +3566,59 @@ bool Tree::get_allow_rmb_select() const{ void Tree::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout); - ObjectTypeDB::bind_method(_MD("_input_event"),&Tree::_input_event); - ObjectTypeDB::bind_method(_MD("_popup_select"),&Tree::popup_select); - ObjectTypeDB::bind_method(_MD("_text_editor_enter"),&Tree::text_editor_enter); - ObjectTypeDB::bind_method(_MD("_text_editor_modal_close"),&Tree::_text_editor_modal_close); - ObjectTypeDB::bind_method(_MD("_value_editor_changed"),&Tree::value_editor_changed); - ObjectTypeDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved); + ClassDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout); + ClassDB::bind_method(_MD("_input_event"),&Tree::_input_event); + ClassDB::bind_method(_MD("_popup_select"),&Tree::popup_select); + ClassDB::bind_method(_MD("_text_editor_enter"),&Tree::text_editor_enter); + ClassDB::bind_method(_MD("_text_editor_modal_close"),&Tree::_text_editor_modal_close); + ClassDB::bind_method(_MD("_value_editor_changed"),&Tree::value_editor_changed); + ClassDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved); - ObjectTypeDB::bind_method(_MD("clear"),&Tree::clear); - ObjectTypeDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL(Variant())); + ClassDB::bind_method(_MD("clear"),&Tree::clear); + ClassDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL(Variant())); - ObjectTypeDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root); - ObjectTypeDB::bind_method(_MD("set_column_min_width","column","min_width"),&Tree::set_column_min_width); - ObjectTypeDB::bind_method(_MD("set_column_expand","column","expand"),&Tree::set_column_expand); - ObjectTypeDB::bind_method(_MD("get_column_width","column"),&Tree::get_column_width); + ClassDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root); + ClassDB::bind_method(_MD("set_column_min_width","column","min_width"),&Tree::set_column_min_width); + ClassDB::bind_method(_MD("set_column_expand","column","expand"),&Tree::set_column_expand); + ClassDB::bind_method(_MD("get_column_width","column"),&Tree::get_column_width); - ObjectTypeDB::bind_method(_MD("set_hide_root","enable"),&Tree::set_hide_root); - ObjectTypeDB::bind_method(_MD("get_next_selected:TreeItem","from:TreeItem"),&Tree::_get_next_selected); - ObjectTypeDB::bind_method(_MD("get_selected:TreeItem"),&Tree::get_selected); - ObjectTypeDB::bind_method(_MD("get_selected_column"),&Tree::get_selected_column); - ObjectTypeDB::bind_method(_MD("get_pressed_button"),&Tree::get_pressed_button); - ObjectTypeDB::bind_method(_MD("set_select_mode","mode"),&Tree::set_select_mode); + ClassDB::bind_method(_MD("set_hide_root","enable"),&Tree::set_hide_root); + ClassDB::bind_method(_MD("get_next_selected:TreeItem","from:TreeItem"),&Tree::_get_next_selected); + ClassDB::bind_method(_MD("get_selected:TreeItem"),&Tree::get_selected); + ClassDB::bind_method(_MD("get_selected_column"),&Tree::get_selected_column); + ClassDB::bind_method(_MD("get_pressed_button"),&Tree::get_pressed_button); + ClassDB::bind_method(_MD("set_select_mode","mode"),&Tree::set_select_mode); - ObjectTypeDB::bind_method(_MD("set_columns","amount"),&Tree::set_columns); - ObjectTypeDB::bind_method(_MD("get_columns"),&Tree::get_columns); + ClassDB::bind_method(_MD("set_columns","amount"),&Tree::set_columns); + ClassDB::bind_method(_MD("get_columns"),&Tree::get_columns); - ObjectTypeDB::bind_method(_MD("get_edited:TreeItem"),&Tree::get_edited); - ObjectTypeDB::bind_method(_MD("get_edited_column"),&Tree::get_edited_column); - ObjectTypeDB::bind_method(_MD("get_custom_popup_rect"),&Tree::get_custom_popup_rect); - ObjectTypeDB::bind_method(_MD("get_item_area_rect","item:TreeItem","column"),&Tree::_get_item_rect,DEFVAL(-1)); - ObjectTypeDB::bind_method(_MD("get_item_at_pos:TreeItem","pos"),&Tree::get_item_at_pos); - ObjectTypeDB::bind_method(_MD("get_column_at_pos","pos"),&Tree::get_column_at_pos); + ClassDB::bind_method(_MD("get_edited:TreeItem"),&Tree::get_edited); + ClassDB::bind_method(_MD("get_edited_column"),&Tree::get_edited_column); + ClassDB::bind_method(_MD("get_custom_popup_rect"),&Tree::get_custom_popup_rect); + ClassDB::bind_method(_MD("get_item_area_rect","item:TreeItem","column"),&Tree::_get_item_rect,DEFVAL(-1)); + ClassDB::bind_method(_MD("get_item_at_pos:TreeItem","pos"),&Tree::get_item_at_pos); + ClassDB::bind_method(_MD("get_column_at_pos","pos"),&Tree::get_column_at_pos); - ObjectTypeDB::bind_method(_MD("ensure_cursor_is_visible"),&Tree::ensure_cursor_is_visible); + ClassDB::bind_method(_MD("ensure_cursor_is_visible"),&Tree::ensure_cursor_is_visible); - ObjectTypeDB::bind_method(_MD("set_column_titles_visible","visible"),&Tree::set_column_titles_visible); - ObjectTypeDB::bind_method(_MD("are_column_titles_visible"),&Tree::are_column_titles_visible); + ClassDB::bind_method(_MD("set_column_titles_visible","visible"),&Tree::set_column_titles_visible); + ClassDB::bind_method(_MD("are_column_titles_visible"),&Tree::are_column_titles_visible); - ObjectTypeDB::bind_method(_MD("set_column_title","column","title"),&Tree::set_column_title); - ObjectTypeDB::bind_method(_MD("get_column_title","column"),&Tree::get_column_title); - ObjectTypeDB::bind_method(_MD("get_scroll"),&Tree::get_scroll); + ClassDB::bind_method(_MD("set_column_title","column","title"),&Tree::set_column_title); + ClassDB::bind_method(_MD("get_column_title","column"),&Tree::get_column_title); + ClassDB::bind_method(_MD("get_scroll"),&Tree::get_scroll); - ObjectTypeDB::bind_method(_MD("set_hide_folding","hide"),&Tree::set_hide_folding); - ObjectTypeDB::bind_method(_MD("is_folding_hidden"),&Tree::is_folding_hidden); + ClassDB::bind_method(_MD("set_hide_folding","hide"),&Tree::set_hide_folding); + ClassDB::bind_method(_MD("is_folding_hidden"),&Tree::is_folding_hidden); - ObjectTypeDB::bind_method(_MD("set_drop_mode_flags","flags"),&Tree::set_drop_mode_flags); - ObjectTypeDB::bind_method(_MD("get_drop_mode_flags"),&Tree::get_drop_mode_flags); + ClassDB::bind_method(_MD("set_drop_mode_flags","flags"),&Tree::set_drop_mode_flags); + ClassDB::bind_method(_MD("get_drop_mode_flags"),&Tree::get_drop_mode_flags); - ObjectTypeDB::bind_method(_MD("set_allow_rmb_select","allow"),&Tree::set_allow_rmb_select); - ObjectTypeDB::bind_method(_MD("get_allow_rmb_select"),&Tree::get_allow_rmb_select); + ClassDB::bind_method(_MD("set_allow_rmb_select","allow"),&Tree::set_allow_rmb_select); + ClassDB::bind_method(_MD("get_allow_rmb_select"),&Tree::get_allow_rmb_select); - ObjectTypeDB::bind_method(_MD("set_single_select_cell_editing_only_when_already_selected","enable"),&Tree::set_single_select_cell_editing_only_when_already_selected); - ObjectTypeDB::bind_method(_MD("get_single_select_cell_editing_only_when_already_selected"),&Tree::get_single_select_cell_editing_only_when_already_selected); + ClassDB::bind_method(_MD("set_single_select_cell_editing_only_when_already_selected","enable"),&Tree::set_single_select_cell_editing_only_when_already_selected); + ClassDB::bind_method(_MD("get_single_select_cell_editing_only_when_already_selected"),&Tree::get_single_select_cell_editing_only_when_already_selected); ADD_SIGNAL( MethodInfo("item_selected")); ADD_SIGNAL( MethodInfo("cell_selected")); diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 19b48f2000..c69f685176 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -45,7 +45,7 @@ class Tree; class TreeItem : public Object { - OBJ_TYPE(TreeItem,Object); + GDCLASS(TreeItem,Object); public: enum TreeCellMode { @@ -257,7 +257,7 @@ VARIANT_ENUM_CAST( TreeItem::TreeCellMode ); class Tree : public Control { - OBJ_TYPE( Tree, Control ); + GDCLASS( Tree, Control ); public: enum SelectMode { SELECT_SINGLE, diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 46b7bc6cbe..a6690189cc 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -357,40 +357,40 @@ bool VideoPlayer::has_autoplay() const { void VideoPlayer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_stream","stream:VideoStream"),&VideoPlayer::set_stream); - ObjectTypeDB::bind_method(_MD("get_stream:VideoStream"),&VideoPlayer::get_stream); + ClassDB::bind_method(_MD("set_stream","stream:VideoStream"),&VideoPlayer::set_stream); + ClassDB::bind_method(_MD("get_stream:VideoStream"),&VideoPlayer::get_stream); - ObjectTypeDB::bind_method(_MD("play"),&VideoPlayer::play); - ObjectTypeDB::bind_method(_MD("stop"),&VideoPlayer::stop); + ClassDB::bind_method(_MD("play"),&VideoPlayer::play); + ClassDB::bind_method(_MD("stop"),&VideoPlayer::stop); - ObjectTypeDB::bind_method(_MD("is_playing"),&VideoPlayer::is_playing); + ClassDB::bind_method(_MD("is_playing"),&VideoPlayer::is_playing); - ObjectTypeDB::bind_method(_MD("set_paused","paused"),&VideoPlayer::set_paused); - ObjectTypeDB::bind_method(_MD("is_paused"),&VideoPlayer::is_paused); + ClassDB::bind_method(_MD("set_paused","paused"),&VideoPlayer::set_paused); + ClassDB::bind_method(_MD("is_paused"),&VideoPlayer::is_paused); - ObjectTypeDB::bind_method(_MD("set_volume","volume"),&VideoPlayer::set_volume); - ObjectTypeDB::bind_method(_MD("get_volume"),&VideoPlayer::get_volume); + ClassDB::bind_method(_MD("set_volume","volume"),&VideoPlayer::set_volume); + ClassDB::bind_method(_MD("get_volume"),&VideoPlayer::get_volume); - ObjectTypeDB::bind_method(_MD("set_volume_db","db"),&VideoPlayer::set_volume_db); - ObjectTypeDB::bind_method(_MD("get_volume_db"),&VideoPlayer::get_volume_db); + ClassDB::bind_method(_MD("set_volume_db","db"),&VideoPlayer::set_volume_db); + ClassDB::bind_method(_MD("get_volume_db"),&VideoPlayer::get_volume_db); - ObjectTypeDB::bind_method(_MD("set_audio_track","track"),&VideoPlayer::set_audio_track); - ObjectTypeDB::bind_method(_MD("get_audio_track"),&VideoPlayer::get_audio_track); + ClassDB::bind_method(_MD("set_audio_track","track"),&VideoPlayer::set_audio_track); + ClassDB::bind_method(_MD("get_audio_track"),&VideoPlayer::get_audio_track); - ObjectTypeDB::bind_method(_MD("get_stream_name"),&VideoPlayer::get_stream_name); + ClassDB::bind_method(_MD("get_stream_name"),&VideoPlayer::get_stream_name); - ObjectTypeDB::bind_method(_MD("get_stream_pos"),&VideoPlayer::get_stream_pos); + ClassDB::bind_method(_MD("get_stream_pos"),&VideoPlayer::get_stream_pos); - ObjectTypeDB::bind_method(_MD("set_autoplay","enabled"),&VideoPlayer::set_autoplay); - ObjectTypeDB::bind_method(_MD("has_autoplay"),&VideoPlayer::has_autoplay); + ClassDB::bind_method(_MD("set_autoplay","enabled"),&VideoPlayer::set_autoplay); + ClassDB::bind_method(_MD("has_autoplay"),&VideoPlayer::has_autoplay); - ObjectTypeDB::bind_method(_MD("set_expand","enable"), &VideoPlayer::set_expand ); - ObjectTypeDB::bind_method(_MD("has_expand"), &VideoPlayer::has_expand ); + ClassDB::bind_method(_MD("set_expand","enable"), &VideoPlayer::set_expand ); + ClassDB::bind_method(_MD("has_expand"), &VideoPlayer::has_expand ); - ObjectTypeDB::bind_method(_MD("set_buffering_msec","msec"),&VideoPlayer::set_buffering_msec); - ObjectTypeDB::bind_method(_MD("get_buffering_msec"),&VideoPlayer::get_buffering_msec); + ClassDB::bind_method(_MD("set_buffering_msec","msec"),&VideoPlayer::set_buffering_msec); + ClassDB::bind_method(_MD("get_buffering_msec"),&VideoPlayer::get_buffering_msec); - ObjectTypeDB::bind_method(_MD("get_video_texture:Texture"), &VideoPlayer::get_video_texture ); + ClassDB::bind_method(_MD("get_video_texture:Texture"), &VideoPlayer::get_video_texture ); ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/audio_track",PROPERTY_HINT_RANGE,"0,128,1"), _SCS("set_audio_track"), _SCS("get_audio_track") ); ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") ); diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h index c1d2caee8e..694cb253a4 100644 --- a/scene/gui/video_player.h +++ b/scene/gui/video_player.h @@ -35,7 +35,7 @@ class VideoPlayer : public Control { - OBJ_TYPE(VideoPlayer,Control); + GDCLASS(VideoPlayer,Control); struct InternalStream : public AudioServer::AudioStream { VideoPlayer *player; diff --git a/scene/gui/viewport_container.cpp b/scene/gui/viewport_container.cpp index 3418a495e9..37ecd3cb2f 100644 --- a/scene/gui/viewport_container.cpp +++ b/scene/gui/viewport_container.cpp @@ -91,8 +91,8 @@ void ViewportContainer::_notification(int p_what) { void ViewportContainer::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_stretch","enable"),&ViewportContainer::set_stretch); - ObjectTypeDB::bind_method(_MD("is_stretch_enabled"),&ViewportContainer::is_stretch_enabled); + ClassDB::bind_method(_MD("set_stretch","enable"),&ViewportContainer::set_stretch); + ClassDB::bind_method(_MD("is_stretch_enabled"),&ViewportContainer::is_stretch_enabled); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"stretch"),_SCS("set_stretch"),_SCS("is_stretch_enabled")); } diff --git a/scene/gui/viewport_container.h b/scene/gui/viewport_container.h index cfc58f7d6e..632c54f2f4 100644 --- a/scene/gui/viewport_container.h +++ b/scene/gui/viewport_container.h @@ -5,7 +5,7 @@ class ViewportContainer : public Container { - OBJ_TYPE( ViewportContainer, Container ); + GDCLASS( ViewportContainer, Container ); bool stretch; protected: |
