(svn r25761) -Change: Disable story/goal buttons when there is no content to show instead of when there is zero companies

This commit is contained in:
zuu
2013-09-13 12:45:25 +00:00
parent 2b935138ae
commit 01af09b830
5 changed files with 41 additions and 14 deletions

View File

@@ -85,6 +85,7 @@ CommandCost CmdCreateGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
g->completed = false;
InvalidateWindowData(WC_GOALS_LIST, 0);
if (Goal::GetNumItems() == 1) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
_new_goal_id = g->index;
}
@@ -111,6 +112,7 @@ CommandCost CmdRemoveGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
delete g;
InvalidateWindowData(WC_GOALS_LIST, 0);
if (Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
}
return CommandCost();