Skip to content

Commit

Permalink
allow an extra tool button to show on the left edge when cut off
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jacob1 committed Aug 30, 2015
1 parent 68b4f1e commit 4af4ae3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gui/game/GameView.cpp
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 4af4ae3

Please sign in to comment.