Browse Source

AnimationTree nodes sliders fixes

(cherry picked from commit 0fc4b04f51184075aab7f91fb20ce69657b4bcd1)
Jakub Grzesik 8 năm trước cách đây
mục cha
commit
17850b7b26
2 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 5 0
      editor/plugins/animation_tree_editor_plugin.cpp
  2. 2 2
      scene/gui/range.cpp

+ 5 - 0
editor/plugins/animation_tree_editor_plugin.cpp

@@ -371,6 +371,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
 				edit_label[0]->show();
 				edit_scroll[0]->set_min(0);
 				edit_scroll[0]->set_max(1);
+				edit_scroll[0]->set_step(0.01);
 				edit_scroll[0]->set_val(anim_tree->mix_node_get_amount(edited_node));
 				edit_scroll[0]->set_begin(Point2(15, 25));
 				edit_scroll[0]->show();
@@ -383,6 +384,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
 				edit_label[0]->show();
 				edit_scroll[0]->set_min(0);
 				edit_scroll[0]->set_max(1);
+				edit_scroll[0]->set_step(0.01);
 				edit_scroll[0]->set_val(anim_tree->blend2_node_get_amount(edited_node));
 				edit_scroll[0]->set_begin(Point2(15, 25));
 				edit_scroll[0]->show();
@@ -398,6 +400,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
 				edit_label[0]->show();
 				edit_scroll[0]->set_min(-1);
 				edit_scroll[0]->set_max(1);
+				edit_scroll[0]->set_step(0.01);
 				edit_scroll[0]->set_val(anim_tree->blend3_node_get_amount(edited_node));
 				edit_scroll[0]->set_begin(Point2(15, 25));
 				edit_scroll[0]->show();
@@ -411,6 +414,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
 				edit_label[0]->show();
 				edit_scroll[0]->set_min(0);
 				edit_scroll[0]->set_max(1);
+				edit_scroll[0]->set_step(0.01);
 				edit_scroll[0]->set_val(anim_tree->blend4_node_get_amount(edited_node).x);
 				edit_scroll[0]->set_begin(Point2(15, 25));
 				edit_scroll[0]->show();
@@ -419,6 +423,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
 				edit_label[1]->show();
 				edit_scroll[1]->set_min(0);
 				edit_scroll[1]->set_max(1);
+				edit_scroll[1]->set_step(0.01);
 				edit_scroll[1]->set_val(anim_tree->blend4_node_get_amount(edited_node).y);
 				edit_scroll[1]->set_begin(Point2(15, 75));
 				edit_scroll[1]->show();

+ 2 - 2
scene/gui/range.cpp

@@ -275,8 +275,8 @@ Range::Range() {
 	shared = memnew(Shared);
 	shared->min = 0;
 	shared->max = 100;
-	shared->val =
-			shared->step = 1;
+	shared->val = 0;
+	shared->step = 1;
 	shared->page = 0;
 	shared->owners.insert(this);
 	shared->exp_unit_value = false;