1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

-Conversion of most properties to a simpler syntax, easier to use by script

-Modified help to display properties

GDScript can still not make use of them, though.
This commit is contained in:
Juan Linietsky
2017-01-04 01:16:14 -03:00
parent 3fae505128
commit b085c40edf
105 changed files with 1858 additions and 1024 deletions

View File

@@ -183,20 +183,20 @@ void AnimationTreeEditor::_edit_dialog_changed() {
case AnimationTreePlayer::NODE_MIX:
anim_tree->mix_node_set_amount(edited_node,edit_scroll[0]->get_val());
anim_tree->mix_node_set_amount(edited_node,edit_scroll[0]->get_value());
break;
case AnimationTreePlayer::NODE_BLEND2:
anim_tree->blend2_node_set_amount(edited_node,edit_scroll[0]->get_val());
anim_tree->blend2_node_set_amount(edited_node,edit_scroll[0]->get_value());
break;
case AnimationTreePlayer::NODE_BLEND3:
anim_tree->blend3_node_set_amount(edited_node,edit_scroll[0]->get_val());
anim_tree->blend3_node_set_amount(edited_node,edit_scroll[0]->get_value());
break;
case AnimationTreePlayer::NODE_BLEND4:
anim_tree->blend4_node_set_amount(edited_node,Point2(edit_scroll[0]->get_val(),edit_scroll[1]->get_val()));
anim_tree->blend4_node_set_amount(edited_node,Point2(edit_scroll[0]->get_value(),edit_scroll[1]->get_value()));
break;
@@ -265,7 +265,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
filter_button->hide();
edit_check->hide();;
Point2 pos = anim_tree->node_get_pos(edited_node)-Point2(h_scroll->get_val(),v_scroll->get_val());
Point2 pos = anim_tree->node_get_pos(edited_node)-Point2(h_scroll->get_value(),v_scroll->get_value());
Ref<StyleBox> style = get_stylebox("panel","PopupMenu");
Size2 size = get_node_size(edited_node);
Point2 popup_pos( pos.x+style->get_margin(MARGIN_LEFT), pos.y+size.y-style->get_margin(MARGIN_BOTTOM));
@@ -380,7 +380,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_val(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]->show();
edit_dialog->set_size(Size2(150,50));
@@ -392,7 +392,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_val(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]->show();
filter_button->set_begin(Point2(10,47));
@@ -407,7 +407,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_val(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]->show();
edit_dialog->set_size(Size2(150,50));
@@ -420,7 +420,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_val(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]->show();
edit_label[1]->set_text(TTR("Blend 1:"));
@@ -428,7 +428,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_val(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]->show();
edit_dialog->set_size(Size2(150,100));
@@ -500,7 +500,7 @@ void AnimationTreeEditor::_draw_node(const StringName& p_node) {
}
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
style->draw(ci,Rect2(pos,size));
@@ -644,7 +644,7 @@ AnimationTreeEditor::ClickType AnimationTreeEditor::_locate_click(const Point2&
Point2 pos = anim_tree->node_get_pos(node);
Size2 size = get_node_size(node);
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
if (!Rect2(pos,size).has_point(p_click))
continue;
@@ -709,7 +709,7 @@ Point2 AnimationTreeEditor::_get_slot_pos(const StringName& p_node,bool p_input,
}
pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
float w = size.width-style->get_minimum_size().width;
@@ -892,8 +892,8 @@ void AnimationTreeEditor::_input_event(InputEvent p_event) {
}
if ((p_event.mouse_motion.button_mask&4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
h_scroll->set_val( h_scroll->get_val() - p_event.mouse_motion.relative_x );
v_scroll->set_val( v_scroll->get_val() - p_event.mouse_motion.relative_y );
h_scroll->set_value( h_scroll->get_value() - p_event.mouse_motion.relative_x );
v_scroll->set_value( v_scroll->get_value() - p_event.mouse_motion.relative_y );
update();
}
@@ -1026,7 +1026,7 @@ void AnimationTreeEditor::_update_scrollbars() {
v_scroll->show();
v_scroll->set_max(min.height);
v_scroll->set_page(size.height - hmin.height);
offset.y=v_scroll->get_val();
offset.y=v_scroll->get_value();
}
if (min.width < size.width - vmin.width) {
@@ -1038,14 +1038,14 @@ void AnimationTreeEditor::_update_scrollbars() {
h_scroll->show();
h_scroll->set_max(min.width);
h_scroll->set_page(size.width - vmin.width);
offset.x=h_scroll->get_val();
offset.x=h_scroll->get_value();
}
}
void AnimationTreeEditor::_scroll_moved(float) {
offset.x=h_scroll->get_val();
offset.y=v_scroll->get_val();
offset.x=h_scroll->get_value();
offset.y=v_scroll->get_value();
update();
}