Merge pull request #9749 from kubecz3k/animtree-slider-fix
AnimationTree nodes sliders fixes
This commit is contained in:
commit
f0ab3283c0
2 changed files with 8 additions and 3 deletions
|
@ -29,8 +29,8 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "animation_tree_editor_plugin.h"
|
#include "animation_tree_editor_plugin.h"
|
||||||
|
|
||||||
#include "core/project_settings.h"
|
|
||||||
#include "core/io/resource_loader.h"
|
#include "core/io/resource_loader.h"
|
||||||
|
#include "core/project_settings.h"
|
||||||
#include "os/input.h"
|
#include "os/input.h"
|
||||||
#include "os/keyboard.h"
|
#include "os/keyboard.h"
|
||||||
#include "scene/gui/menu_button.h"
|
#include "scene/gui/menu_button.h"
|
||||||
|
@ -371,6 +371,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
||||||
edit_label[0]->show();
|
edit_label[0]->show();
|
||||||
edit_scroll[0]->set_min(0);
|
edit_scroll[0]->set_min(0);
|
||||||
edit_scroll[0]->set_max(1);
|
edit_scroll[0]->set_max(1);
|
||||||
|
edit_scroll[0]->set_step(0.01);
|
||||||
edit_scroll[0]->set_value(anim_tree->mix_node_get_amount(edited_node));
|
edit_scroll[0]->set_value(anim_tree->mix_node_get_amount(edited_node));
|
||||||
edit_scroll[0]->set_begin(Point2(15, 25));
|
edit_scroll[0]->set_begin(Point2(15, 25));
|
||||||
edit_scroll[0]->show();
|
edit_scroll[0]->show();
|
||||||
|
@ -383,6 +384,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
||||||
edit_label[0]->show();
|
edit_label[0]->show();
|
||||||
edit_scroll[0]->set_min(0);
|
edit_scroll[0]->set_min(0);
|
||||||
edit_scroll[0]->set_max(1);
|
edit_scroll[0]->set_max(1);
|
||||||
|
edit_scroll[0]->set_step(0.01);
|
||||||
edit_scroll[0]->set_value(anim_tree->blend2_node_get_amount(edited_node));
|
edit_scroll[0]->set_value(anim_tree->blend2_node_get_amount(edited_node));
|
||||||
edit_scroll[0]->set_begin(Point2(15, 25));
|
edit_scroll[0]->set_begin(Point2(15, 25));
|
||||||
edit_scroll[0]->show();
|
edit_scroll[0]->show();
|
||||||
|
@ -398,6 +400,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
||||||
edit_label[0]->show();
|
edit_label[0]->show();
|
||||||
edit_scroll[0]->set_min(-1);
|
edit_scroll[0]->set_min(-1);
|
||||||
edit_scroll[0]->set_max(1);
|
edit_scroll[0]->set_max(1);
|
||||||
|
edit_scroll[0]->set_step(0.01);
|
||||||
edit_scroll[0]->set_value(anim_tree->blend3_node_get_amount(edited_node));
|
edit_scroll[0]->set_value(anim_tree->blend3_node_get_amount(edited_node));
|
||||||
edit_scroll[0]->set_begin(Point2(15, 25));
|
edit_scroll[0]->set_begin(Point2(15, 25));
|
||||||
edit_scroll[0]->show();
|
edit_scroll[0]->show();
|
||||||
|
@ -411,6 +414,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
||||||
edit_label[0]->show();
|
edit_label[0]->show();
|
||||||
edit_scroll[0]->set_min(0);
|
edit_scroll[0]->set_min(0);
|
||||||
edit_scroll[0]->set_max(1);
|
edit_scroll[0]->set_max(1);
|
||||||
|
edit_scroll[0]->set_step(0.01);
|
||||||
edit_scroll[0]->set_value(anim_tree->blend4_node_get_amount(edited_node).x);
|
edit_scroll[0]->set_value(anim_tree->blend4_node_get_amount(edited_node).x);
|
||||||
edit_scroll[0]->set_begin(Point2(15, 25));
|
edit_scroll[0]->set_begin(Point2(15, 25));
|
||||||
edit_scroll[0]->show();
|
edit_scroll[0]->show();
|
||||||
|
@ -419,6 +423,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
|
||||||
edit_label[1]->show();
|
edit_label[1]->show();
|
||||||
edit_scroll[1]->set_min(0);
|
edit_scroll[1]->set_min(0);
|
||||||
edit_scroll[1]->set_max(1);
|
edit_scroll[1]->set_max(1);
|
||||||
|
edit_scroll[1]->set_step(0.01);
|
||||||
edit_scroll[1]->set_value(anim_tree->blend4_node_get_amount(edited_node).y);
|
edit_scroll[1]->set_value(anim_tree->blend4_node_get_amount(edited_node).y);
|
||||||
edit_scroll[1]->set_begin(Point2(15, 75));
|
edit_scroll[1]->set_begin(Point2(15, 75));
|
||||||
edit_scroll[1]->show();
|
edit_scroll[1]->show();
|
||||||
|
|
|
@ -273,8 +273,8 @@ Range::Range() {
|
||||||
shared = memnew(Shared);
|
shared = memnew(Shared);
|
||||||
shared->min = 0;
|
shared->min = 0;
|
||||||
shared->max = 100;
|
shared->max = 100;
|
||||||
shared->val =
|
shared->val = 0;
|
||||||
shared->step = 1;
|
shared->step = 1;
|
||||||
shared->page = 0;
|
shared->page = 0;
|
||||||
shared->owners.insert(this);
|
shared->owners.insert(this);
|
||||||
shared->exp_ratio = false;
|
shared->exp_ratio = false;
|
||||||
|
|
Loading…
Reference in a new issue