fix being able to toggle disabled buttons (fixes save browser issue with this)

This commit is contained in:
jacob1 2013-03-04 15:59:45 -05:00
parent 38573cc30e
commit ad951eb9af
2 changed files with 3 additions and 1 deletions

View File

@ -1942,7 +1942,7 @@ void GameView::OnDraw()
{
string message = (*iter);
startY -= 13;
g->fillrect(startX-3, startY-3, Graphics::textwidth((char*)message.c_str())+6 , 14, 0, 0, 0, 100);
g->fillrect(startX-3, startY-3, Graphics::textwidth((char*)message.c_str())+6, 14, 0, 0, 0, 100);
g->drawtext(startX, startY, message.c_str(), 255, 255, 255, startAlpha);
startAlpha-=14;
}

View File

@ -176,6 +176,8 @@ void Button::OnMouseUnclick(int x, int y, unsigned int button)
void Button::OnMouseClick(int x, int y, unsigned int button)
{
if(!Enabled)
return;
if(button == 1)
{
if(isTogglable)