Display team owner in teams widget (addresses
issue #174)
--- a/QTfrontend/team.cpp Fri Dec 13 22:14:02 2013 +0400
+++ b/QTfrontend/team.cpp Fri Dec 13 22:38:09 2013 +0400
@@ -277,7 +277,7 @@
sl.push_back(QString("eflag " + m_flag));
if(!m_owner.isEmpty())
- sl.push_back(QString("eowner " + m_owner));
+ sl.push_back(QString("eowner ") + m_owner);
for (int t = 0; t < m_numHedgehogs; t++)
{
--- a/hedgewars/uStore.pas Fri Dec 13 22:14:02 2013 +0400
+++ b/hedgewars/uStore.pas Fri Dec 13 22:38:09 2013 +0400
@@ -164,6 +164,8 @@
with TeamsArray[t]^ do
begin
NameTagTex:= RenderStringTexLim(TeamName, Clan^.Color, Font, cTeamHealthWidth);
+ if length(Owner) > 0 then
+ OwnerTex:= RenderStringTexLim(Owner, Clan^.Color, Font, cTeamHealthWidth);
r.x:= 0;
r.y:= 0;
--- a/hedgewars/uWorld.pas Fri Dec 13 22:14:02 2013 +0400
+++ b/hedgewars/uWorld.pas Fri Dec 13 22:38:09 2013 +0400
@@ -1259,7 +1259,11 @@
else
htex:= Clan^.HealthTex;
- // draw name
+ // draw owner
+ if OwnerTex <> nil then
+ DrawTexture(-OwnerTex^.w - NameTagTex^.w - 18, cScreenHeight + DrawHealthY + smallScreenOffset, OwnerTex);
+
+ // draw name
DrawTexture(-NameTagTex^.w - 16, cScreenHeight + DrawHealthY + smallScreenOffset, NameTagTex);
// draw flag