summaryrefslogtreecommitdiff
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 25ac8d5259..b4d0799945 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -185,21 +185,21 @@ void OptionButton::clear() {
current = -1;
}
-void OptionButton::_select(int p_idx, bool p_emit) {
+void OptionButton::_select(int p_which, bool p_emit) {
- if (p_idx < 0)
+ if (p_which < 0)
return;
- if (p_idx == current)
+ if (p_which == current)
return;
- ERR_FAIL_INDEX(p_idx, popup->get_item_count());
+ ERR_FAIL_INDEX(p_which, popup->get_item_count());
for (int i = 0; i < popup->get_item_count(); i++) {
- popup->set_item_checked(i, i == p_idx);
+ popup->set_item_checked(i, i == p_which);
}
- current = p_idx;
+ current = p_which;
set_text(popup->get_item_text(current));
set_icon(popup->get_item_icon(current));