summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-03-19 15:08:22 +0100
committerGitHub <noreply@github.com>2022-03-19 15:08:22 +0100
commitdb5271dd34ea2b1894e1e2cf9ee9519c84142608 (patch)
tree41741f7227b28cf5d7739df46a3bb84b62ae1e20 /scene/gui/option_button.cpp
parent288cdca71d838806469dd4f277beb3f2c45e49d3 (diff)
parent342dac77d495966bb2090e68ff7b88f3ce162236 (diff)
downloadredot-engine-db5271dd34ea2b1894e1e2cf9ee9519c84142608.tar.gz
Merge pull request #59315 from KoBeWi/less_options_in_OptionButton_or_something
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 37d75cea6a..1e8a149e11 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -385,6 +385,12 @@ void OptionButton::get_translatable_strings(List<String> *p_strings) const {
popup->get_translatable_strings(p_strings);
}
+void OptionButton::_validate_property(PropertyInfo &property) const {
+ if (property.name == "text" || property.name == "icon") {
+ property.usage = PROPERTY_USAGE_NONE;
+ }
+}
+
void OptionButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_item", "label", "id"), &OptionButton::add_item, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("add_icon_item", "texture", "label", "id"), &OptionButton::add_icon_item, DEFVAL(-1));