summaryrefslogtreecommitdiff
path: root/editor/plugins/abstract_polygon_2d_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-27 14:23:24 +0100
committerGitHub <noreply@github.com>2017-11-27 14:23:24 +0100
commitd992eb1b25e3612293d6c72cd462a99cd5a0e4a3 (patch)
treedb2257996346152f298e86ca58b538f93e695e11 /editor/plugins/abstract_polygon_2d_editor.cpp
parent17b4f43e0e0a16d27bd769cab854e2be5e26833f (diff)
parent91b8b9463520242183af6dd2c4f999ea714ebbd6 (diff)
Merge pull request #13173 from poke1024/fixicons
Add polygon 2d editor handle icons
Diffstat (limited to 'editor/plugins/abstract_polygon_2d_editor.cpp')
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 1c4569d117..cabdfa761d 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -497,8 +497,7 @@ void AbstractPolygon2DEditor::forward_draw_over_viewport(Control *p_overlay) {
Control *vpc = canvas_item_editor->get_viewport_control();
Transform2D xform = canvas_item_editor->get_canvas_transform() * _get_node()->get_global_transform();
- Ref<Texture> default_handle = get_icon("EditorHandle", "EditorIcons");
- Ref<Texture> selected_handle = get_icon("EditorHandleSelected", "EditorIcons");
+ const Ref<Texture> handle = get_icon("EditorHandle", "EditorIcons");
const Vertex active_point = get_active_point();
const int n_polygons = _get_polygon_count();
@@ -572,8 +571,8 @@ void AbstractPolygon2DEditor::forward_draw_over_viewport(Control *p_overlay) {
const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset);
const Vector2 point = xform.xform(p);
- Ref<Texture> handle = vertex == active_point ? selected_handle : default_handle;
- vpc->draw_texture(handle, point - handle->get_size() * 0.5);
+ const Color modulate = vertex == active_point ? Color(0.5, 1, 2) : Color(1, 1, 1);
+ vpc->draw_texture(handle, point - handle->get_size() * 0.5, modulate);
}
}