mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Clip animation track keyframe rects
(cherry picked from commit c7e06e2202)
This commit is contained in:
committed by
Rémi Verschelde
parent
3850d6db76
commit
4640071104
@@ -326,11 +326,11 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
|
|||||||
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
|
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
|
||||||
|
|
||||||
Color color = get_color("font_color", "Label");
|
Color color = get_color("font_color", "Label");
|
||||||
draw_rect(rect, color);
|
draw_rect_clipped(rect, color);
|
||||||
|
|
||||||
if (p_selected) {
|
if (p_selected) {
|
||||||
Color accent = get_color("accent_color", "Editor");
|
Color accent = get_color("accent_color", "Editor");
|
||||||
draw_rect(rect, accent, false);
|
draw_rect_clipped(rect, accent, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -689,11 +689,11 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
|
|||||||
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
|
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
|
||||||
|
|
||||||
Color color = get_color("font_color", "Label");
|
Color color = get_color("font_color", "Label");
|
||||||
draw_rect(rect, color);
|
draw_rect_clipped(rect, color);
|
||||||
|
|
||||||
if (p_selected) {
|
if (p_selected) {
|
||||||
Color accent = get_color("accent_color", "Editor");
|
Color accent = get_color("accent_color", "Editor");
|
||||||
draw_rect(rect, accent, false);
|
draw_rect_clipped(rect, accent, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1250,11 +1250,11 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
|
|||||||
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
|
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
|
||||||
|
|
||||||
Color color = get_color("font_color", "Label");
|
Color color = get_color("font_color", "Label");
|
||||||
draw_rect(rect, color);
|
draw_rect_clipped(rect, color);
|
||||||
|
|
||||||
if (p_selected) {
|
if (p_selected) {
|
||||||
Color accent = get_color("accent_color", "Editor");
|
Color accent = get_color("accent_color", "Editor");
|
||||||
draw_rect(rect, accent, false);
|
draw_rect_clipped(rect, accent, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user