Zargarov M.A. Lab work 1 #1

Merged
eegov merged 3 commits from LabWork01 into master 2022-09-30 09:24:36 +04:00
Showing only changes of commit 12c4d1cbf8 - Show all commits

View File

@ -59,7 +59,7 @@ namespace DoubleDeckerBus
/// <param name="height">Высота картинки</param>
public void SetPosition(int x, int y, int width, int height)
{
if (x > 0 && y > 0 && width > 0 && height > 0 && x < width && y < height)
if (x > 0 && y > 0 && width > 0 && height > 0 && x + _busWidth < width && y + _busHeight < height)
{
_startPosX = x;
_startPosY = y;