summaryrefslogtreecommitdiffstats
path: root/scene/gui/spin_box.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-10-09 01:15:06 +0200
committerGitHub <noreply@github.com>2021-10-09 01:15:06 +0200
commit6f72d9d19fe11ccc38a69e0460813646ad28d0e5 (patch)
tree7dcebf722eac9bc4d0b88a421ae3dd5abf246124 /scene/gui/spin_box.cpp
parent16b27304d90880b0a3a6bfefbb19f2718d5919af (diff)
parent5ae569560d16260aabca4e4a34fdb83376f6d669 (diff)
downloadredot-engine-6f72d9d19fe11ccc38a69e0460813646ad28d0e5.tar.gz
Merge pull request #53584 from akien-mga/fix-bindings-arg-names
Diffstat (limited to 'scene/gui/spin_box.cpp')
-rw-r--r--scene/gui/spin_box.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 0aec017649..0446e1b402 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -253,14 +253,14 @@ String SpinBox::get_prefix() const {
return prefix;
}
-void SpinBox::set_update_on_text_changed(bool p_update) {
- if (update_on_text_changed == p_update) {
+void SpinBox::set_update_on_text_changed(bool p_enabled) {
+ if (update_on_text_changed == p_enabled) {
return;
}
- update_on_text_changed = p_update;
+ update_on_text_changed = p_enabled;
- if (p_update) {
+ if (p_enabled) {
line_edit->connect("text_changed", callable_mp(this, &SpinBox::_text_changed), Vector<Variant>(), CONNECT_DEFERRED);
} else {
line_edit->disconnect("text_changed", callable_mp(this, &SpinBox::_text_changed));
@@ -271,8 +271,8 @@ bool SpinBox::get_update_on_text_changed() const {
return update_on_text_changed;
}
-void SpinBox::set_editable(bool p_editable) {
- line_edit->set_editable(p_editable);
+void SpinBox::set_editable(bool p_enabled) {
+ line_edit->set_editable(p_enabled);
}
bool SpinBox::is_editable() const {
@@ -284,17 +284,15 @@ void SpinBox::apply() {
}
void SpinBox::_bind_methods() {
- //ClassDB::bind_method(D_METHOD("_value_changed"),&SpinBox::_value_changed);
-
ClassDB::bind_method(D_METHOD("set_align", "align"), &SpinBox::set_align);
ClassDB::bind_method(D_METHOD("get_align"), &SpinBox::get_align);
ClassDB::bind_method(D_METHOD("set_suffix", "suffix"), &SpinBox::set_suffix);
ClassDB::bind_method(D_METHOD("get_suffix"), &SpinBox::get_suffix);
ClassDB::bind_method(D_METHOD("set_prefix", "prefix"), &SpinBox::set_prefix);
ClassDB::bind_method(D_METHOD("get_prefix"), &SpinBox::get_prefix);
- ClassDB::bind_method(D_METHOD("set_editable", "editable"), &SpinBox::set_editable);
+ ClassDB::bind_method(D_METHOD("set_editable", "enabled"), &SpinBox::set_editable);
ClassDB::bind_method(D_METHOD("is_editable"), &SpinBox::is_editable);
- ClassDB::bind_method(D_METHOD("set_update_on_text_changed"), &SpinBox::set_update_on_text_changed);
+ ClassDB::bind_method(D_METHOD("set_update_on_text_changed", "enabled"), &SpinBox::set_update_on_text_changed);
ClassDB::bind_method(D_METHOD("get_update_on_text_changed"), &SpinBox::get_update_on_text_changed);
ClassDB::bind_method(D_METHOD("apply"), &SpinBox::apply);
ClassDB::bind_method(D_METHOD("get_line_edit"), &SpinBox::get_line_edit);