Only show informations about own units or some neutral.
This commit is contained in:
parent
a5f1a0e51a
commit
dfd2d7a7f8
1 changed files with 22 additions and 7 deletions
|
@ -167,6 +167,27 @@ global void DrawUnitInfo(Unit* unit)
|
|||
DrawTextCentered(x+114,y+8+17,GameFont,type->Name);
|
||||
}
|
||||
|
||||
//
|
||||
// Show for all players.
|
||||
//
|
||||
if( type->GoldMine ) {
|
||||
DrawText(x+37,y+8+78,GameFont,"Gold Left:");
|
||||
DrawNumber(x+108,y+8+78,GameFont,unit->Value);
|
||||
return;
|
||||
}
|
||||
if( type->GivesOil || type->OilPatch ) {
|
||||
DrawText(x+47,y+8+78,GameFont,"Oil Left:");
|
||||
DrawNumber(x+108,y+8+78,GameFont,unit->Value);
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Only for owning player.
|
||||
//
|
||||
if( unit->Player!=ThisPlayer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Show progress for buildings only if they are selected.
|
||||
//
|
||||
|
@ -230,13 +251,7 @@ global void DrawUnitInfo(Unit* unit)
|
|||
}
|
||||
}
|
||||
|
||||
if( type->GoldMine ) {
|
||||
DrawText(x+37,y+8+78,GameFont,"Gold Left:");
|
||||
DrawNumber(x+108,y+8+78,GameFont,unit->Value);
|
||||
} else if( type->GivesOil || type->OilPatch ) {
|
||||
DrawText(x+47,y+8+78,GameFont,"Oil Left:");
|
||||
DrawNumber(x+108,y+8+78,GameFont,unit->Value);
|
||||
} else if( type->StoresWood ) {
|
||||
if( type->StoresWood ) {
|
||||
DrawText(x+20,y+8+78,GameFont,"Production");
|
||||
DrawText(x+52,y+8+93,GameFont,"Lumber:");
|
||||
// FIXME: if production plus isn't 25!
|
||||
|
|
Loading…
Add table
Reference in a new issue