Skip to content

Commit

Permalink
Add tooltips for locked AIs in game setup screen
Browse files Browse the repository at this point in the history
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281

Co-authored-by: KJeff01 <kjeff01@users.noreply.github.com>
  • Loading branch information
Forgon2100 and KJeff01 committed Jun 26, 2019
1 parent 5e5dd2f commit 5cbc2b4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/multiint.cpp
Expand Up @@ -2695,9 +2695,17 @@ void addPlayerBox(bool players)
{
sButInit.pTip = _("Click to change player position");
}
else if (!NetPlay.players[i].allocated && NetPlay.isHost && !locked.ai)
else if (!NetPlay.players[i].allocated)
{
sButInit.pTip = _("Click to change AI");
if (NetPlay.isHost && !locked.ai)
{
sButInit.pTip = _("Click to change AI");
}
else if (NetPlay.players[i].ai >= 0)
{
// show AI description. Useful for challenges.
sButInit.pTip = aidata[NetPlay.players[i].ai].tip;
}
}
if (NetPlay.players[i].allocated && !getMultiStats(i).identity.empty())
{
Expand Down

0 comments on commit 5cbc2b4

Please sign in to comment.