Skip to content

Commit

Permalink
Fix some visual bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranmillar committed Dec 27, 2017
1 parent 6313eb0 commit daed0f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/Editor/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,13 @@ void Canvas::draw()
}
if (input_ptr->resizingLevel) // draw the one border we are currently resizing
{
if (input_ptr->resizingWhich == Editor_input::whichBorder::left || input_ptr->resizingWhich == Editor_input::whichBorder::right)
if (input_ptr->resizingWhich == Editor_input::whichBorder::left)
draw_dashed_level_border(vertical, (input_ptr->resizingNewPos - scroll_x) * zoom - scrollOffset_x - 1, scroll_y * zoom + scrollOffset_y, true);
if (input_ptr->resizingWhich == Editor_input::whichBorder::right)
draw_dashed_level_border(vertical, (input_ptr->resizingNewPos - scroll_x) * zoom - scrollOffset_x, scroll_y * zoom + scrollOffset_y, true);
if (input_ptr->resizingWhich == Editor_input::whichBorder::top || input_ptr->resizingWhich == Editor_input::whichBorder::bottom)
if (input_ptr->resizingWhich == Editor_input::whichBorder::top)
draw_dashed_level_border(horizontal, (input_ptr->resizingNewPos - scroll_y) * zoom - scrollOffset_y - 1, scroll_x * zoom + scrollOffset_x, true);
if (input_ptr->resizingWhich == Editor_input::whichBorder::bottom)
draw_dashed_level_border(horizontal, (input_ptr->resizingNewPos - scroll_y) * zoom - scrollOffset_y, scroll_x * zoom + scrollOffset_x, true);
}

Expand Down
2 changes: 1 addition & 1 deletion src/level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,5 +347,5 @@ void Level::resizeLevel(int delta_x, int delta_y, bool shiftLevel)
if (cameraX + 320 > width)
cameraX = width - 320;
if (cameraY + 160 > height)
cameraX = height - 160;
cameraY = height - 160;
}

0 comments on commit daed0f9

Please sign in to comment.