diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2015-12-28 12:26:36 +0100 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2015-12-28 12:26:36 +0100 |
commit | bfbde4dfd11be8728be4bb88d8bc109acb19ccfd (patch) | |
tree | 80caee83551b639717c252e5f33036a75670ad8a /scene/gui | |
parent | 37cb0faedb0aa314d5e9ca2e4f4b0e268dd3237f (diff) | |
parent | d4993b74fc715d294ca0a77b335db3782d4bdcd6 (diff) |
Merge pull request #3146 from akien-mga/pr-argument-names
Add missing argument names in GDScript bindings + related fixes
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/file_dialog.cpp | 2 | ||||
-rw-r--r-- | scene/gui/option_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 2 | ||||
-rw-r--r-- | scene/gui/range.cpp | 24 | ||||
-rw-r--r-- | scene/gui/range.h | 9 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 4 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 6 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 10 |
8 files changed, 31 insertions, 28 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 9179d3a4e1..ad30295e60 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -650,7 +650,7 @@ void FileDialog::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_vbox:VBoxContainer"),&FileDialog::get_vbox); ObjectTypeDB::bind_method(_MD("set_access","access"),&FileDialog::set_access); ObjectTypeDB::bind_method(_MD("get_access"),&FileDialog::get_access); - ObjectTypeDB::bind_method(_MD("set_show_hidden_files"),&FileDialog::set_show_hidden_files); + ObjectTypeDB::bind_method(_MD("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); diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 3cc5acc1a6..540df323b6 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -304,7 +304,7 @@ void OptionButton::_bind_methods() { 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"),&OptionButton::select); + 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); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 9dc03272b2..c250ca34c1 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -898,7 +898,7 @@ void PopupMenu::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_item_icon","idx","icon"),&PopupMenu::set_item_icon); 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_checked","idx"),&PopupMenu::set_item_checked); + ObjectTypeDB::bind_method(_MD("set_item_checked","idx","checked"),&PopupMenu::set_item_checked); 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); diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 7103ee651f..bee6527795 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -216,11 +216,10 @@ 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("get_rounded_values"),&Range::get_rounded_values); + 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); @@ -228,7 +227,8 @@ void Range::_bind_methods() { 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"),&Range::set_rounded_values); + 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); @@ -244,16 +244,18 @@ void Range::_bind_methods() { ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/page" ), _SCS("set_page"), _SCS("get_page") ); ADD_PROPERTY( PropertyInfo( Variant::REAL, "range/value" ), _SCS("set_val"), _SCS("get_val") ); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "range/exp_edit" ), _SCS("set_exp_unit_value"), _SCS("is_unit_value_exp") ); - ADD_PROPERTY( PropertyInfo( Variant::BOOL, "rounded_values" ), _SCS("set_rounded_values"), _SCS("get_rounded_values") ); + ADD_PROPERTY( PropertyInfo( Variant::BOOL, "range/rounded" ), _SCS("set_rounded_values"), _SCS("is_rounded_values") ); } -void Range::set_rounded_values(bool p){ - _rounded_values = p; +void Range::set_rounded_values(bool p_enable) { + + _rounded_values = p_enable; } -bool Range::get_rounded_values() const{ - return _rounded_values; +bool Range::is_rounded_values() const { + + return _rounded_values; } void Range::set_exp_unit_value(bool p_enable) { diff --git a/scene/gui/range.h b/scene/gui/range.h index 48361ddb0e..f31a81f0b5 100644 --- a/scene/gui/range.h +++ b/scene/gui/range.h @@ -72,22 +72,23 @@ public: void set_step(double p_step); void set_page(double p_page); void set_unit_value(double p_value); - void set_rounded_values(bool); - + double get_val() const; double get_min() const; double get_max() const; double get_step() const; double get_page() const; double get_unit_value() const; - bool get_rounded_values() const; + + void set_rounded_values(bool p_enable); + bool is_rounded_values() const; void set_exp_unit_value(bool p_enable); bool is_unit_value_exp() const; void share(Range *p_range); void unshare(); - + Range(); ~Range(); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index fd8ba33a51..b65ff156f2 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1948,7 +1948,7 @@ void RichTextLabel::_bind_methods() { 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"),&RichTextLabel::set_table_column_expand); + 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); @@ -1965,7 +1965,7 @@ void RichTextLabel::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_v_scroll"),&RichTextLabel::get_v_scroll); - ObjectTypeDB::bind_method(_MD("scroll_to_line"),&RichTextLabel::scroll_to_line); + ObjectTypeDB::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); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 29969b65e6..f46336a224 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3742,10 +3742,10 @@ void TextEdit::_bind_methods() { 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"),&TextEdit::get_line); + ObjectTypeDB::bind_method(_MD("get_line","line"),&TextEdit::get_line); - ObjectTypeDB::bind_method(_MD("cursor_set_column","column"),&TextEdit::cursor_set_column); - ObjectTypeDB::bind_method(_MD("cursor_set_line","line"),&TextEdit::cursor_set_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); diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 1b204cff65..585f3a8936 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -672,7 +672,7 @@ void TreeItem::_bind_methods() { 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); - ObjectTypeDB::bind_method(_MD("add_button","column","button:Texture"),&TreeItem::add_button); + ObjectTypeDB::bind_method(_MD("add_button","column","button:Texture","button_idx"),&TreeItem::add_button); 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("erase_button","column","button_idx"),&TreeItem::erase_button); @@ -3193,11 +3193,11 @@ void Tree::_bind_methods() { ObjectTypeDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL((Object*)NULL)); ObjectTypeDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root); - ObjectTypeDB::bind_method(_MD("set_column_min_width"),&Tree::set_column_min_width); - ObjectTypeDB::bind_method(_MD("set_column_expand"),&Tree::set_column_expand); - ObjectTypeDB::bind_method(_MD("get_column_width"),&Tree::get_column_width); + 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); - ObjectTypeDB::bind_method(_MD("set_hide_root"),&Tree::set_hide_root); + 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); |