summaryrefslogtreecommitdiffstats
path: root/editor/gui/editor_zoom_widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/gui/editor_zoom_widget.h')
-rw-r--r--editor/gui/editor_zoom_widget.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/gui/editor_zoom_widget.h b/editor/gui/editor_zoom_widget.h
index be54043d93..6b2fe4d3e9 100644
--- a/editor/gui/editor_zoom_widget.h
+++ b/editor/gui/editor_zoom_widget.h
@@ -42,6 +42,8 @@ class EditorZoomWidget : public HBoxContainer {
Button *zoom_plus = nullptr;
float zoom = 1.0;
+ float min_zoom = 1.0 / 128;
+ float max_zoom = 128.0;
void _update_zoom_label();
void _button_zoom_minus();
void _button_zoom_reset();
@@ -57,6 +59,11 @@ public:
float get_zoom();
void set_zoom(float p_zoom);
void set_zoom_by_increments(int p_increment_count, bool p_integer_only = false);
+
+ float get_min_zoom();
+ float get_max_zoom();
+ // It's best to setup simultaneously, so min < max can be checked easily.
+ void setup_zoom_limits(float p_min, float p_max);
// Sets the shortcut context for the zoom buttons. By default their context is this EditorZoomWidget control.
void set_shortcut_context(Node *p_node) const;
};