summaryrefslogtreecommitdiff
path: root/scene/gui/range.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/range.cpp')
-rw-r--r--scene/gui/range.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index ffcdf98519..b00fcfe42c 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -67,14 +67,14 @@ void Range::Shared::emit_changed(const char *p_what) {
void Range::set_val(double p_val) {
-
+
if(_rounded_values){
p_val = Math::round(p_val);
}
-
+
if (p_val>shared->max-shared->page)
p_val=shared->max-shared->page;
-
+
if (p_val<shared->min)
p_val=shared->min;
@@ -84,58 +84,58 @@ void Range::set_val(double p_val) {
if (shared->val==p_val)
return;
-
+
shared->val=p_val;
-
+
shared->emit_value_changed();
}
void Range::set_min(double p_min) {
-
+
shared->min=p_min;
set_val(shared->val);
-
+
shared->emit_changed("range/min");
}
void Range::set_max(double p_max) {
-
+
shared->max=p_max;
set_val(shared->val);
-
+
shared->emit_changed("range/max");
}
void Range::set_step(double p_step) {
-
+
shared->step=p_step;
shared->emit_changed("range/step");
}
void Range::set_page(double p_page) {
-
+
shared->page=p_page;
set_val(shared->val);
-
+
shared->emit_changed("range/page");
}
double Range::get_val() const {
-
+
return shared->val;
}
double Range::get_min() const {
-
+
return shared->min;
}
double Range::get_max() const {
-
+
return shared->max;
}
double Range::get_step() const {
-
+
return shared->step;
}
double Range::get_page() const {
-
+
return shared->page;
}