summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/item_list.cpp6
-rw-r--r--scene/gui/range.cpp2
-rw-r--r--scene/gui/scroll_container.cpp2
-rw-r--r--scene/gui/text_edit.cpp2
-rwxr-xr-xscene/main/timer.cpp2
-rw-r--r--scene/resources/environment.cpp4
-rw-r--r--scene/resources/material.h2
7 files changed, 8 insertions, 12 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 1406586361..3884622942 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -969,16 +969,16 @@ void ItemList::_notification(int p_what) {
}
if (all_fit) {
- float page = size.height - bg->get_minimum_size().height;
+ float page = MAX(0, size.height - bg->get_minimum_size().height);
float max = MAX(page, ofs.y + max_h);
if (auto_height)
auto_height_value = ofs.y + max_h + bg->get_minimum_size().height;
- scroll_bar->set_max(max);
- scroll_bar->set_page(page);
if (max <= page) {
scroll_bar->set_value(0);
scroll_bar->hide();
} else {
+ scroll_bar->set_max(max);
+ scroll_bar->set_page(page);
scroll_bar->show();
if (do_autoscroll_to_bottom)
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 362697b4ad..5682232bc4 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -100,7 +100,6 @@ void Range::set_value(double p_val) {
shared->emit_value_changed();
}
void Range::set_min(double p_min) {
-
shared->min = p_min;
set_value(shared->val);
@@ -109,7 +108,6 @@ void Range::set_min(double p_min) {
update_configuration_warning();
}
void Range::set_max(double p_max) {
-
shared->max = p_max;
set_value(shared->val);
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index a840e3fec1..fa23bf91dd 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -388,7 +388,6 @@ void ScrollContainer::update_scrollbars() {
if (hide_scroll_v) {
v_scroll->hide();
- v_scroll->set_max(0);
scroll.y = 0;
} else {
@@ -406,7 +405,6 @@ void ScrollContainer::update_scrollbars() {
if (hide_scroll_h) {
h_scroll->hide();
- h_scroll->set_max(0);
scroll.x = 0;
} else {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index b997d7a064..2558a930b6 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -417,7 +417,6 @@ void TextEdit::_update_scrollbars() {
cursor.line_ofs = 0;
cursor.wrap_ofs = 0;
v_scroll->set_value(0);
- v_scroll->set_max(0);
v_scroll->hide();
}
@@ -436,7 +435,6 @@ void TextEdit::_update_scrollbars() {
cursor.x_ofs = 0;
h_scroll->set_value(0);
- h_scroll->set_max(0);
h_scroll->hide();
}
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 14cc705edb..da96c6e89c 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -108,7 +108,7 @@ bool Timer::has_autostart() const {
void Timer::start(float p_time) {
- ERR_FAIL_COND_MSG(!is_inside_tree(), "Timer was not added to the SceneTree!");
+ ERR_FAIL_COND_MSG(!is_inside_tree(), "Timer was not added to the SceneTree. Either add it or set autostart to true.");
if (p_time > 0) {
set_wait_time(p_time);
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index bc96b5e9f3..ddf97f48d1 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -978,7 +978,9 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "background_sky", PROPERTY_HINT_RESOURCE_TYPE, "Sky"), "set_sky", "get_sky");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_sky_custom_fov", PROPERTY_HINT_RANGE, "0,180,0.1"), "set_sky_custom_fov", "get_sky_custom_fov");
ADD_PROPERTY(PropertyInfo(Variant::BASIS, "background_sky_orientation"), "set_sky_orientation", "get_sky_orientation");
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "background_sky_rotation", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_sky_rotation", "get_sky_rotation");
+ // Only display rotation in degrees in the inspector (like in Spatial).
+ // This avoids displaying the same information twice.
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "background_sky_rotation", PROPERTY_HINT_NONE, "", 0), "set_sky_rotation", "get_sky_rotation");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "background_sky_rotation_degrees", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "set_sky_rotation_degrees", "get_sky_rotation_degrees");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "background_color"), "set_bg_color", "get_bg_color");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "background_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_bg_energy", "get_bg_energy");
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 1c69a754b6..11f8f20cf3 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -252,7 +252,7 @@ private:
uint64_t flags : 18;
uint64_t detail_blend_mode : 2;
uint64_t diffuse_mode : 3;
- uint64_t specular_mode : 2;
+ uint64_t specular_mode : 3;
uint64_t invalid_key : 1;
uint64_t deep_parallax : 1;
uint64_t billboard_mode : 2;