diff options
author | Indah Sylvia <ISylvox@yahoo.com> | 2017-08-07 17:17:31 +0700 |
---|---|---|
committer | Indah Sylvia <ISylvox@yahoo.com> | 2017-08-07 18:24:35 +0700 |
commit | 5ae78fdf6adf4b3ab417d2b6fd5a41bfa6d5cfe2 (patch) | |
tree | 3f0dcef53a38d356a40fd7adce40387f21904a18 /scene/gui | |
parent | 7e4970214c92fec0e7262f36765764a81e28b2be (diff) |
Makes all Godot API's methods Lower Case
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/control.cpp | 2 | ||||
-rw-r--r-- | scene/gui/option_button.cpp | 22 | ||||
-rw-r--r-- | scene/gui/option_button.h | 6 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 12 | ||||
-rw-r--r-- | scene/gui/popup_menu.h | 4 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 2 |
6 files changed, 24 insertions, 24 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index ca81b72e89..339b4e079e 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -603,7 +603,7 @@ bool Control::has_point(const Point2 &p_point) const { void Control::set_drag_forwarding(Control *p_target) { if (p_target) - data.drag_owner = p_target->get_instance_ID(); + data.drag_owner = p_target->get_instance_id(); else data.drag_owner = 0; } diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index b842419eab..60874edf38 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -82,7 +82,7 @@ void OptionButton::_selected(int p_which) { int selid = -1; for (int i = 0; i < popup->get_item_count(); i++) { - bool is_clicked = popup->get_item_ID(i) == p_which; + bool is_clicked = popup->get_item_id(i) == p_which; if (is_clicked) { selid = i; break; @@ -129,9 +129,9 @@ void OptionButton::set_item_icon(int p_idx, const Ref<Texture> &p_icon) { popup->set_item_icon(p_idx, p_icon); } -void OptionButton::set_item_ID(int p_idx, int p_ID) { +void OptionButton::set_item_id(int p_idx, int p_ID) { - popup->set_item_ID(p_idx, p_ID); + popup->set_item_id(p_idx, p_ID); } void OptionButton::set_item_metadata(int p_idx, const Variant &p_metadata) { @@ -154,9 +154,9 @@ Ref<Texture> OptionButton::get_item_icon(int p_idx) const { return popup->get_item_icon(p_idx); } -int OptionButton::get_item_ID(int p_idx) const { +int OptionButton::get_item_id(int p_idx) const { - return popup->get_item_ID(p_idx); + return popup->get_item_id(p_idx); } Variant OptionButton::get_item_metadata(int p_idx) const { @@ -224,12 +224,12 @@ int OptionButton::get_selected() const { return current; } -int OptionButton::get_selected_ID() const { +int OptionButton::get_selected_id() const { int idx = get_selected(); if (idx < 0) return 0; - return get_item_ID(current); + return get_item_id(current); } Variant OptionButton::get_selected_metadata() const { @@ -252,7 +252,7 @@ Array OptionButton::_get_items() const { items.push_back(get_item_text(i)); items.push_back(get_item_icon(i)); items.push_back(is_item_disabled(i)); - items.push_back(get_item_ID(i)); + items.push_back(get_item_id(i)); items.push_back(get_item_metadata(i)); } @@ -293,11 +293,11 @@ void OptionButton::_bind_methods() { ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &OptionButton::set_item_text); ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "texture:Texture"), &OptionButton::set_item_icon); ClassDB::bind_method(D_METHOD("set_item_disabled", "idx", "disabled"), &OptionButton::set_item_disabled); - ClassDB::bind_method(D_METHOD("set_item_ID", "idx", "id"), &OptionButton::set_item_ID); + ClassDB::bind_method(D_METHOD("set_item_id", "idx", "id"), &OptionButton::set_item_id); ClassDB::bind_method(D_METHOD("set_item_metadata", "idx", "metadata"), &OptionButton::set_item_metadata); ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &OptionButton::get_item_text); ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &OptionButton::get_item_icon); - ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &OptionButton::get_item_ID); + ClassDB::bind_method(D_METHOD("get_item_id", "idx"), &OptionButton::get_item_id); ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &OptionButton::get_item_metadata); ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &OptionButton::is_item_disabled); ClassDB::bind_method(D_METHOD("get_item_count"), &OptionButton::get_item_count); @@ -305,7 +305,7 @@ void OptionButton::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &OptionButton::clear); ClassDB::bind_method(D_METHOD("select", "idx"), &OptionButton::select); ClassDB::bind_method(D_METHOD("get_selected"), &OptionButton::get_selected); - ClassDB::bind_method(D_METHOD("get_selected_ID"), &OptionButton::get_selected_ID); + ClassDB::bind_method(D_METHOD("get_selected_id"), &OptionButton::get_selected_id); ClassDB::bind_method(D_METHOD("get_selected_metadata:Variant"), &OptionButton::get_selected_metadata); ClassDB::bind_method(D_METHOD("remove_item", "idx"), &OptionButton::remove_item); ClassDB::bind_method(D_METHOD("_select_int"), &OptionButton::_select_int); diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h index 887d199c90..db921b8b97 100644 --- a/scene/gui/option_button.h +++ b/scene/gui/option_button.h @@ -62,13 +62,13 @@ public: void set_item_text(int p_idx, const String &p_text); void set_item_icon(int p_idx, const Ref<Texture> &p_icon); - void set_item_ID(int p_idx, int p_ID); + void set_item_id(int p_idx, int p_ID); void set_item_metadata(int p_idx, const Variant &p_metadata); void set_item_disabled(int p_idx, bool p_disabled); String get_item_text(int p_idx) const; Ref<Texture> get_item_icon(int p_idx) const; - int get_item_ID(int p_idx) const; + int get_item_id(int p_idx) const; Variant get_item_metadata(int p_idx) const; bool is_item_disabled(int p_idx) const; @@ -80,7 +80,7 @@ public: void select(int p_idx); int get_selected() const; - int get_selected_ID() const; + int get_selected_id() const; Variant get_selected_metadata() const; void remove_item(int p_idx); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index b673f9d68a..e3f9a09db3 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -647,7 +647,7 @@ void PopupMenu::set_item_checked(int p_idx, bool p_checked) { update(); } -void PopupMenu::set_item_ID(int p_idx, int p_ID) { +void PopupMenu::set_item_id(int p_idx, int p_ID) { ERR_FAIL_INDEX(p_idx, items.size()); items[p_idx].ID = p_ID; @@ -737,7 +737,7 @@ bool PopupMenu::is_item_checked(int p_idx) const { return items[p_idx].checked; } -int PopupMenu::get_item_ID(int p_idx) const { +int PopupMenu::get_item_id(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, items.size(), 0); return items[p_idx].ID; @@ -956,7 +956,7 @@ Array PopupMenu::_get_items() const { items.push_back(is_item_checked(i)); items.push_back(is_item_disabled(i)); - items.push_back(get_item_ID(i)); + items.push_back(get_item_id(i)); items.push_back(get_item_accelerator(i)); items.push_back(get_item_metadata(i)); items.push_back(get_item_submenu(i)); @@ -1011,7 +1011,7 @@ void PopupMenu::_set_items(const Array &p_items) { set_item_as_checkable(idx, checkable); set_item_checked(idx, checked); set_item_disabled(idx, disabled); - set_item_ID(idx, id); + set_item_id(idx, id); set_item_metadata(idx, meta); set_item_as_separator(idx, sep); set_item_accelerator(idx, accel); @@ -1089,7 +1089,7 @@ void PopupMenu::_bind_methods() { ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &PopupMenu::set_item_text); ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "icon:Texture"), &PopupMenu::set_item_icon); ClassDB::bind_method(D_METHOD("set_item_checked", "idx", "checked"), &PopupMenu::set_item_checked); - ClassDB::bind_method(D_METHOD("set_item_ID", "idx", "id"), &PopupMenu::set_item_ID); + ClassDB::bind_method(D_METHOD("set_item_id", "idx", "id"), &PopupMenu::set_item_id); ClassDB::bind_method(D_METHOD("set_item_accelerator", "idx", "accel"), &PopupMenu::set_item_accelerator); ClassDB::bind_method(D_METHOD("set_item_metadata", "idx", "metadata"), &PopupMenu::set_item_metadata); ClassDB::bind_method(D_METHOD("set_item_disabled", "idx", "disabled"), &PopupMenu::set_item_disabled); @@ -1104,7 +1104,7 @@ void PopupMenu::_bind_methods() { ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &PopupMenu::get_item_text); ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &PopupMenu::get_item_icon); ClassDB::bind_method(D_METHOD("is_item_checked", "idx"), &PopupMenu::is_item_checked); - ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &PopupMenu::get_item_ID); + ClassDB::bind_method(D_METHOD("get_item_id", "idx"), &PopupMenu::get_item_id); ClassDB::bind_method(D_METHOD("get_item_index", "id"), &PopupMenu::get_item_index); ClassDB::bind_method(D_METHOD("get_item_accelerator", "idx"), &PopupMenu::get_item_accelerator); ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &PopupMenu::get_item_metadata); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 6f1a2db363..cbfe7873e6 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -118,7 +118,7 @@ public: void set_item_text(int p_idx, const String &p_text); void set_item_icon(int p_idx, const Ref<Texture> &p_icon); void set_item_checked(int p_idx, bool p_checked); - void set_item_ID(int p_idx, int p_ID); + void set_item_id(int p_idx, int p_ID); void set_item_accelerator(int p_idx, uint32_t p_accel); void set_item_metadata(int p_idx, const Variant &p_meta); void set_item_disabled(int p_idx, bool p_disabled); @@ -135,7 +135,7 @@ public: int get_item_idx_from_text(const String &text) const; Ref<Texture> get_item_icon(int p_idx) const; bool is_item_checked(int p_idx) const; - int get_item_ID(int p_idx) const; + int get_item_id(int p_idx) const; int get_item_index(int p_ID) const; uint32_t get_item_accelerator(int p_idx) const; Variant get_item_metadata(int p_idx) const; diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 9499ba9dcd..0ce29b7472 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -291,7 +291,7 @@ void TreeItem::set_custom_draw(int p_column, Object *p_object, const StringName ERR_FAIL_INDEX(p_column, cells.size()); ERR_FAIL_NULL(p_object); - cells[p_column].custom_draw_obj = p_object->get_instance_ID(); + cells[p_column].custom_draw_obj = p_object->get_instance_id(); cells[p_column].custom_draw_callback = p_callback; } |