Skip to content

Commit 3a4feed

Browse files
committed
Merge pull request godotengine#99289 from shahriarlabib000/hideExp
Hide unused `exp_edit` from SpinBox's inspector
2 parents 32b4f40 + 177bba1 commit 3a4feed

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

scene/gui/spin_box.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,12 @@ void SpinBox::_set_step_no_signal(double p_step) {
545545
set_block_signals(false);
546546
}
547547

548+
void SpinBox::_validate_property(PropertyInfo &p_property) const {
549+
if (p_property.name == "exp_edit") {
550+
p_property.usage = PROPERTY_USAGE_NONE;
551+
}
552+
}
553+
548554
void SpinBox::_bind_methods() {
549555
ClassDB::bind_method(D_METHOD("set_horizontal_alignment", "alignment"), &SpinBox::set_horizontal_alignment);
550556
ClassDB::bind_method(D_METHOD("get_horizontal_alignment"), &SpinBox::get_horizontal_alignment);

scene/gui/spin_box.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ class SpinBox : public Range {
139139
protected:
140140
virtual void gui_input(const Ref<InputEvent> &p_event) override;
141141
void _value_changed(double p_value) override;
142+
void _validate_property(PropertyInfo &p_property) const;
142143

143144
void _notification(int p_what);
144145
static void _bind_methods();

0 commit comments

Comments
 (0)