diff options
author | Hop311 <Hop3114@gmail.com> | 2024-03-04 23:49:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 23:49:37 +0100 |
commit | 521f7d3d156f42535fb7574fb36f2726e9d13885 (patch) | |
tree | 8c319b540020aaf382592c9b513a27e9fcaaa603 /extension/src/openvic-extension/classes/GUIScrollbar.hpp | |
parent | 9e305db5e5090a1a24979c480d64eebfe2de65da (diff) | |
parent | 9ee1940ac3d15aa4c0a87b84d1c4ab8958184f63 (diff) |
Merge pull request #210 from OpenVicProject/gui-listbox
Add GUIListBox + UI improvements
Diffstat (limited to 'extension/src/openvic-extension/classes/GUIScrollbar.hpp')
-rw-r--r-- | extension/src/openvic-extension/classes/GUIScrollbar.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extension/src/openvic-extension/classes/GUIScrollbar.hpp b/extension/src/openvic-extension/classes/GUIScrollbar.hpp index 7af7b57..c5b476a 100644 --- a/extension/src/openvic-extension/classes/GUIScrollbar.hpp +++ b/extension/src/openvic-extension/classes/GUIScrollbar.hpp @@ -11,8 +11,6 @@ namespace OpenVic { class GUIScrollbar : public godot::Control { GDCLASS(GUIScrollbar, godot::Control) - static godot::StringName const& _signal_value_changed(); - GUI::Scrollbar const* PROPERTY(gui_scrollbar); godot::Ref<GFXSpriteTexture> slider_texture; @@ -33,6 +31,7 @@ namespace OpenVic { godot::Rect2 range_limit_max_rect; godot::Orientation PROPERTY(orientation); + real_t PROPERTY(length_override); int32_t PROPERTY(value); int32_t PROPERTY(min_value); @@ -78,6 +77,8 @@ namespace OpenVic { void _notification(int what); public: + static godot::StringName const& signal_value_changed(); + GUIScrollbar(); godot::Vector2 _get_minimum_size() const override; @@ -98,5 +99,8 @@ namespace OpenVic { godot::Error set_range_limits(int32_t new_range_limit_min, int32_t new_range_limit_max, bool signal = true); godot::Error set_limits(int32_t new_min_value, int32_t new_max_value, bool signal = true); + + /* Override the main dimension of gui_scollbar's size with the specified length. */ + void set_length_override(real_t new_length_override); }; } |