1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Improve the appearance of 2D path editors

- Add new handle icons for path/polygon editors
- Add smooth path point icons and curve tangent icons
- Use a gray color for tangent lines in the Path2D and Path editors
- Use antialiasing for Path2D lines
This commit is contained in:
Hugo Locurcio
2019-08-18 22:18:57 +02:00
parent ef37f00525
commit 558e93f069
8 changed files with 41 additions and 21 deletions

View File

@@ -1045,8 +1045,8 @@ void Polygon2DEditor::_uv_draw() {
}
}
Ref<Texture> handle = get_icon("EditorHandle", "EditorIcons");
Ref<Texture> internal_handle = get_icon("EditorInternalHandle", "EditorIcons");
// All UV points are sharp, so use the sharp handle icon
Ref<Texture> handle = get_icon("EditorPathSharpHandle", "EditorIcons");
Color poly_line_color = Color(0.9, 0.5, 0.5);
if (polygons.size() || polygon_create.size()) {
@@ -1120,7 +1120,8 @@ void Polygon2DEditor::_uv_draw() {
if (i < uv_draw_max) {
uv_edit_draw->draw_texture(handle, mtx.xform(uvs[i]) - handle->get_size() * 0.5);
} else {
uv_edit_draw->draw_texture(internal_handle, mtx.xform(uvs[i]) - internal_handle->get_size() * 0.5);
// Internal vertex
uv_edit_draw->draw_texture(handle, mtx.xform(uvs[i]) - handle->get_size() * 0.5, Color(0.6, 0.8, 1));
}
}
}