allow an extra tool button to show on the left edge when cut off

electronics, explosives, and solids all have just one extra element, now you can always see it without scrolling. The only other scrolling menu is GoL
This commit is contained in:
jacob1 2015-08-30 01:55:48 -04:00
parent 68b4f1efd6
commit 4af4ae3656

View File

@ -1045,11 +1045,10 @@ void GameView::setToolButtonOffset(int offset)
{
ToolButton * button = *iter;
button->Position.X -= offset;
if(button->Position.X <= 0 || (button->Position.X+button->Size.X) > XRES-2) {
if (button->Position.X+button->Size.X <= 0 || (button->Position.X+button->Size.X) > XRES-2)
button->Visible = false;
} else {
else
button->Visible = true;
}
}
}