From cacca31e08c38f00c09b23ae822d08a39c34b079 Mon Sep 17 00:00:00 2001
From: FireForge <67974470+fire-forge@users.noreply.github.com>
Date: Sat, 9 Apr 2022 16:31:22 -0500
Subject: [PATCH] Expose EditorSpinSlider.hide_slider
(cherry picked from commit 8e752b06e8a0f116991a0e618cc47e4fe2f3d270)
---
doc/classes/EditorSpinSlider.xml | 3 +++
editor/editor_spin_slider.cpp | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 5adbe6123..5eaf04a18 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -14,6 +14,9 @@
+
+ If [code]true[/code], the slider is hidden.
+
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index db7aa0e47..39444f6d8 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -584,6 +584,9 @@ void EditorSpinSlider::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_flat", "flat"), &EditorSpinSlider::set_flat);
ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat);
+ ClassDB::bind_method(D_METHOD("set_hide_slider", "hide_slider"), &EditorSpinSlider::set_hide_slider);
+ ClassDB::bind_method(D_METHOD("is_hiding_slider"), &EditorSpinSlider::is_hiding_slider);
+
ClassDB::bind_method(D_METHOD("_gui_input"), &EditorSpinSlider::_gui_input);
ClassDB::bind_method(D_METHOD("_value_input_gui_input", "event"), &EditorSpinSlider::_value_input_gui_input);
ClassDB::bind_method(D_METHOD("_grabber_mouse_entered"), &EditorSpinSlider::_grabber_mouse_entered);
@@ -596,6 +599,7 @@ void EditorSpinSlider::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "label"), "set_label", "get_label");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_slider"), "set_hide_slider", "is_hiding_slider");
}
EditorSpinSlider::EditorSpinSlider() {