Add an outline to box selection rectangles for better visibility

This also refactors selection box color definitions
to avoid repetition.
This commit is contained in:
Hugo Locurcio 2019-08-15 22:17:08 +02:00
parent de8ce3e625
commit 108f9646f5
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
5 changed files with 33 additions and 15 deletions

View file

@ -5050,10 +5050,9 @@ float AnimationTrackEditor::get_moving_selection_offset() const {
void AnimationTrackEditor::_box_selection_draw() {
Color color = get_color("accent_color", "Editor");
color.a = 0.2;
Rect2 rect = Rect2(Point2(), box_selection->get_size());
box_selection->draw_rect(rect, color);
const Rect2 selection_rect = Rect2(Point2(), box_selection->get_size());
box_selection->draw_rect(selection_rect, get_color("box_selection_fill_color", "Editor"));
box_selection->draw_rect(selection_rect, get_color("box_selection_stroke_color", "Editor"), false, Math::round(EDSCALE));
}
void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {