summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-26 15:28:41 +0200
committerGitHub <noreply@github.com>2019-10-26 15:28:41 +0200
commitcbfb944a7be4cc111fe43e504428107d8342bbd6 (patch)
treec89e21e64a461f08fa931b69b51aedbae0f13d48
parentf037eb7b0b81b30769c82784f790a60ca48438a6 (diff)
parentcdce135540bddfc0738250f5f785a564066cb4a1 (diff)
Merge pull request #33081 from MCrafterzz/fix21527
Fixed #21527 (Show hint to right click when curve editor is empty)
-rw-r--r--editor/plugins/curve_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 9160920c50..727d92ba05 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/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);
}
}