Display team owner in teams widget (addresses issue 174)
authorunc0rr
Fri, 13 Dec 2013 22:38:09 +0400
changeset 9791 446e4919b738
parent 9790 0b4b9fda5bd4
child 9792 59cde1e53ca5
child 9793 c2f10934ed4d
Display team owner in teams widget (addresses issue #174)
QTfrontend/team.cpp
hedgewars/uStore.pas
hedgewars/uWorld.pas
--- 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