summaryrefslogtreecommitdiffstats
path: root/tools/editor/plugins/polygon_2d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/plugins/polygon_2d_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index deb3944ad6..4ab827017a 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -567,10 +567,10 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
} else if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
- uv_zoom->set_val( uv_zoom->get_val()/0.9 );
+ uv_zoom->set_value( uv_zoom->get_value()/0.9 );
} else if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
- uv_zoom->set_val( uv_zoom->get_val()*0.9);
+ uv_zoom->set_value( uv_zoom->get_value()*0.9);
}
} else if (p_input.type==InputEvent::MOUSE_MOTION) {
@@ -580,8 +580,8 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
if (mm.button_mask&BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
Vector2 drag(mm.relative_x,mm.relative_y);
- uv_hscroll->set_val( uv_hscroll->get_val()-drag.x );
- uv_vscroll->set_val( uv_vscroll->get_val()-drag.y );
+ uv_hscroll->set_value( uv_hscroll->get_value()-drag.x );
+ uv_vscroll->set_value( uv_vscroll->get_value()-drag.y );
} else if (uv_drag) {
@@ -668,9 +668,9 @@ void Polygon2DEditor::_uv_scroll_changed(float) {
if (updating_uv_scroll)
return;
- uv_draw_ofs.x=uv_hscroll->get_val();
- uv_draw_ofs.y=uv_vscroll->get_val();
- uv_draw_zoom=uv_zoom->get_val();
+ uv_draw_ofs.x=uv_hscroll->get_value();
+ uv_draw_ofs.y=uv_vscroll->get_value();
+ uv_draw_zoom=uv_zoom->get_value();
uv_edit_draw->update();
}
@@ -735,13 +735,13 @@ void Polygon2DEditor::_uv_draw() {
uv_hscroll->set_min(rect.pos.x);
uv_hscroll->set_max(rect.pos.x+rect.size.x);
uv_hscroll->set_page(uv_edit_draw->get_size().x);
- uv_hscroll->set_val(uv_draw_ofs.x);
+ uv_hscroll->set_value(uv_draw_ofs.x);
uv_hscroll->set_step(0.001);
uv_vscroll->set_min(rect.pos.y);
uv_vscroll->set_max(rect.pos.y+rect.size.y);
uv_vscroll->set_page(uv_edit_draw->get_size().y);
- uv_vscroll->set_val(uv_draw_ofs.y);
+ uv_vscroll->set_value(uv_draw_ofs.y);
uv_vscroll->set_step(0.001);
updating_uv_scroll=false;
@@ -914,7 +914,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_off_x->set_min(-256);
sb_off_x->set_max(256);
sb_off_x->set_step(1);
- sb_off_x->set_val(snap_offset.x);
+ sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
sb_off_x->connect("value_changed", this, "_set_snap_off_x");
uv_mode_hb->add_child(sb_off_x);
@@ -923,7 +923,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_off_y->set_min(-256);
sb_off_y->set_max(256);
sb_off_y->set_step(1);
- sb_off_y->set_val(snap_offset.y);
+ sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
sb_off_y->connect("value_changed", this, "_set_snap_off_y");
uv_mode_hb->add_child(sb_off_y);
@@ -935,7 +935,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_step_x->set_min(-256);
sb_step_x->set_max(256);
sb_step_x->set_step(1);
- sb_step_x->set_val(snap_step.x);
+ sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
sb_step_x->connect("value_changed", this, "_set_snap_step_x");
uv_mode_hb->add_child(sb_step_x);
@@ -944,7 +944,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_step_y->set_min(-256);
sb_step_y->set_max(256);
sb_step_y->set_step(1);
- sb_step_y->set_val(snap_step.y);
+ sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
sb_step_y->connect("value_changed", this, "_set_snap_step_y");
uv_mode_hb->add_child(sb_step_y);
@@ -955,7 +955,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_zoom = memnew( HSlider );
uv_zoom->set_min(0.01);
uv_zoom->set_max(4);
- uv_zoom->set_val(1);
+ uv_zoom->set_value(1);
uv_zoom->set_step(0.01);
uv_mode_hb->add_child(uv_zoom);
uv_zoom->set_custom_minimum_size(Size2(200,0));