Пример #1
0
/**
**  Draw icon for unit.
**
**  @param unit         unit with icon to show.
**  @param defaultfont  unused.
*/
void CContentTypeIcon::Draw(const CUnit *unit, CFont *defaultfont) const
{
	Assert(unit);
	unit = GetUnitRef(unit, this->UnitRef);
	if (unit && unit->Type->Icon.Icon) {
		unit->Type->Icon.Icon->DrawIcon(unit->Player, this->PosX, this->PosY);
	}
}
Пример #2
0
/**
**  Draw icon for unit.
**
**  @param unit         unit with icon to show.
**  @param defaultfont  unused.
*/
/* virtual */ void CContentTypeIcon::Draw(const CUnit &unit, CFont *) const
{
	const CUnit *unitToDraw = GetUnitRef(unit, this->UnitRef);

	//Wyrmgus start
//	if (unitToDraw && unitToDraw->Type->Icon.Icon) {
	if (unitToDraw && unitToDraw->GetIcon().Icon) {
	//Wyrmgus end
		//Wyrmgus start
//		unitToDraw->Type->Icon.Icon->DrawUnitIcon(*UI.SingleSelectedButton->Style, 0, this->Pos, "",
		unitToDraw->GetIcon().Icon->DrawUnitIcon(*UI.SingleSelectedButton->Style, 0, this->Pos, "",
		//Wyrmgus end
			//Wyrmgus start
//			unitToDraw->RescuedFrom ? unitToDraw->RescuedFrom->Index : unitToDraw->Player->Index);
			unitToDraw->GetDisplayPlayer(), unitToDraw->GetSkinColor(), unitToDraw->GetHairColor());
			//Wyrmgus end
	}
}
Пример #3
0
SDst
AMUnitList::GetItemHeightCore() const
{
	return GetSizeOf(GetUnitRef()).Height;
}