Skip to content

Commit

Permalink
Merge pull request #99289 from shahriarlabib000/hideExp
Browse files Browse the repository at this point in the history
Hide unused `exp_edit` from SpinBox's inspector
  • Loading branch information
Repiteo committed Nov 19, 2024
2 parents 32b4f40 + 177bba1 commit 3a4feed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scene/gui/spin_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,12 @@ void SpinBox::_set_step_no_signal(double p_step) {
set_block_signals(false);
}

void SpinBox::_validate_property(PropertyInfo &p_property) const {
if (p_property.name == "exp_edit") {
p_property.usage = PROPERTY_USAGE_NONE;
}
}

void SpinBox::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_horizontal_alignment", "alignment"), &SpinBox::set_horizontal_alignment);
ClassDB::bind_method(D_METHOD("get_horizontal_alignment"), &SpinBox::get_horizontal_alignment);
Expand Down
1 change: 1 addition & 0 deletions scene/gui/spin_box.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class SpinBox : public Range {
protected:
virtual void gui_input(const Ref<InputEvent> &p_event) override;
void _value_changed(double p_value) override;
void _validate_property(PropertyInfo &p_property) const;

void _notification(int p_what);
static void _bind_methods();
Expand Down

0 comments on commit 3a4feed

Please sign in to comment.