summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-04-24 16:59:24 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-04-29 08:02:39 -0500
commitb831fb0a540bee165d46c1c229f2ec4569c88461 (patch)
tree87110f1b711f153d435e05a7658dec15d18efd90 /editor/plugins
parent81139c94a8b1fd0ea29cb64627f4b8dc0962a5b7 (diff)
Rename Transform2D "elements" to "columns"
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp6
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 8397772bf8..42f17965ce 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -521,9 +521,9 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
Ref<Texture2D> icon = icons[p_mode + (p_auto_advance ? 3 : 0)];
Transform2D xf;
- xf.elements[0] = (p_to - p_from).normalized();
- xf.elements[1] = xf.elements[0].orthogonal();
- xf.elements[2] = (p_from + p_to) * 0.5 - xf.elements[1] * icon->get_height() * 0.5 - xf.elements[0] * icon->get_height() * 0.5;
+ xf.columns[0] = (p_to - p_from).normalized();
+ xf.columns[1] = xf.columns[0].orthogonal();
+ xf.columns[2] = (p_from + p_to) * 0.5 - xf.columns[1] * icon->get_height() * 0.5 - xf.columns[0] * icon->get_height() * 0.5;
state_machine_draw->draw_set_transform_matrix(xf);
state_machine_draw->draw_texture(icon, Vector2(), icon_color);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index c840ce22ce..fd2aaec4da 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3675,7 +3675,7 @@ void CanvasItemEditor::_draw_viewport() {
// Update the transform
transform = Transform2D();
transform.scale_basis(Size2(zoom, zoom));
- transform.elements[2] = -view_offset * zoom;
+ transform.columns[2] = -view_offset * zoom;
EditorNode::get_singleton()->get_scene_root()->set_global_canvas_transform(transform);
// hide/show buttons depending on the selection
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 8566e92b22..a682bb455c 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -455,7 +455,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
Transform2D mtx;
- mtx.elements[2] = -uv_draw_ofs;
+ mtx.columns[2] = -uv_draw_ofs;
mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom));
Ref<InputEventMouseButton> mb = p_input;
@@ -970,7 +970,7 @@ void Polygon2DEditor::_uv_draw() {
String warning;
Transform2D mtx;
- mtx.elements[2] = -uv_draw_ofs;
+ mtx.columns[2] = -uv_draw_ofs;
mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom));
RS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(), mtx);
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 3fa12233a8..455592aa26 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -78,7 +78,7 @@ void TextureRegionEditor::_region_draw() {
}
Transform2D mtx;
- mtx.elements[2] = -draw_ofs * draw_zoom;
+ mtx.columns[2] = -draw_ofs * draw_zoom;
mtx.scale_basis(Vector2(draw_zoom, draw_zoom));
RS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), mtx);
@@ -267,7 +267,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
}
Transform2D mtx;
- mtx.elements[2] = -draw_ofs * draw_zoom;
+ mtx.columns[2] = -draw_ofs * draw_zoom;
mtx.scale_basis(Vector2(draw_zoom, draw_zoom));
const real_t handle_radius = 8 * EDSCALE;