diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-11-19 11:48:45 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-19 11:48:45 +0700 |
commit | b1fefe2245954cc9e76b4966d7c6eab60c5a7a43 (patch) | |
tree | 8dab80be97a46b90d78d1a4ce9ce6a08e3240ffe | |
parent | 63283eca5542314ea5b71afa1fe39bd48c202a4d (diff) | |
parent | 090a9abf841b0a1700c27d243971174aa34d3c0c (diff) |
Merge pull request #13014 from sketchyfun/animation_editor_button_fix
AnimationEditor keys button fix
-rw-r--r-- | editor/animation_editor.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index b9fd6d6fe7..1afa1e708a 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -1368,7 +1368,7 @@ void AnimationKeyEditor::_track_editor_draw() { icon_ofs.x-=hsep; */ - track_ofs[0] = size.width - icon_ofs.x; + track_ofs[0] = size.width - icon_ofs.x + ofs.x; icon_ofs.x -= down_icon->get_width(); te->draw_texture(down_icon, icon_ofs - Size2(0, 4 * EDSCALE)); @@ -1380,7 +1380,7 @@ void AnimationKeyEditor::_track_editor_draw() { icon_ofs.x -= hsep; te->draw_line(Point2(icon_ofs.x, ofs.y + y), Point2(icon_ofs.x, ofs.y + y + h), sepcolor); - track_ofs[1] = size.width - icon_ofs.x; + track_ofs[1] = size.width - icon_ofs.x + ofs.x; icon_ofs.x -= down_icon->get_width(); te->draw_texture(down_icon, icon_ofs - Size2(0, 4 * EDSCALE)); @@ -1394,7 +1394,7 @@ void AnimationKeyEditor::_track_editor_draw() { icon_ofs.x -= hsep; te->draw_line(Point2(icon_ofs.x, ofs.y + y), Point2(icon_ofs.x, ofs.y + y + h), sepcolor); - track_ofs[2] = size.width - icon_ofs.x; + track_ofs[2] = size.width - icon_ofs.x + ofs.x; if (animation->track_get_type(idx) == Animation::TYPE_VALUE) { @@ -1415,13 +1415,12 @@ void AnimationKeyEditor::_track_editor_draw() { icon_ofs.x -= hsep; te->draw_line(Point2(icon_ofs.x, ofs.y + y), Point2(icon_ofs.x, ofs.y + y + h), sepcolor); - track_ofs[3] = size.width - icon_ofs.x; + track_ofs[3] = size.width - icon_ofs.x + ofs.x; icon_ofs.x -= hsep; icon_ofs.x -= add_key_icon->get_width(); te->draw_texture((mouse_over.over == MouseOver::OVER_ADD_KEY && mouse_over.track == idx) ? add_key_icon_hl : add_key_icon, icon_ofs); - - track_ofs[4] = size.width - icon_ofs.x; + track_ofs[4] = size.width - icon_ofs.x + ofs.x; //draw the keys; int tt = animation->track_get_type(idx); |