summaryrefslogtreecommitdiff
path: root/scene/gui/spin_box.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/spin_box.h')
-rw-r--r--scene/gui/spin_box.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index d118b28334..c2f2ac3f5a 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -52,24 +52,31 @@ class SpinBox : public Range {
String prefix;
String suffix;
+ double custom_arrow_step = 0.0;
void _line_edit_input(const Ref<InputEvent> &p_event);
struct Drag {
- float base_val = 0.0;
+ double base_val = 0.0;
bool allowed = false;
bool enabled = false;
Vector2 capture_pos;
- float diff_y = 0.0;
+ double diff_y = 0.0;
} drag;
+ void _line_edit_focus_enter();
void _line_edit_focus_exit();
inline void _adjust_width_for_icon(const Ref<Texture2D> &icon);
+ struct ThemeCache {
+ Ref<Texture2D> updown_icon;
+ } theme_cache;
+
protected:
virtual void gui_input(const Ref<InputEvent> &p_event) override;
+ virtual void _update_theme_item_cache() override;
void _notification(int p_what);
static void _bind_methods();
@@ -95,6 +102,8 @@ public:
bool get_update_on_text_changed() const;
void apply();
+ void set_custom_arrow_step(const double p_custom_arrow_step);
+ double get_custom_arrow_step() const;
SpinBox();
};