浏览代码

Merge pull request #33081 from MCrafterzz/fix21527

Fixed #21527 (Show hint to right click when curve editor is empty)
Rémi Verschelde 5 年之前
父节点
当前提交
cbfb944a7b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/plugins/curve_editor_plugin.cpp

+ 3 - 0
editor/plugins/curve_editor_plugin.cpp

@@ -736,6 +736,9 @@ void CurveEditor::_draw() {
 	if (_selected_point > 0 && _selected_point + 1 < curve.get_point_count()) {
 		text_color.a *= 0.4;
 		draw_string(font, Vector2(50, font_height), TTR("Hold Shift to edit tangents individually"), text_color);
+	} else if (curve.get_point_count() == 0) {
+		text_color.a *= 0.4;
+		draw_string(font, Vector2(50, font_height), TTR("Right click to add point"), text_color);
 	}
 }