section.begin
   Name = ShowEditorInfo
   Code : struct.begin
      [*] = ;procedure UnitStateTagToString(goHnd : Integer; var s : String);
      [*] = ;begin
      [*] = ;   var newState : Integer = GetGameObjectStatesTagByHandle(goHnd);
      [*] = ;   var iEssential : Integer = newState and gc_statetag_essential;
      [*] = ;   var iResource : Integer = newState and gc_statetag_resource;
      [*] = ;   var iExecute : Integer = newState and gc_statetag_execute;
      [*] = ;   var iMove : Integer = newState and gc_statetag_move;
      [*] = ;   var iWeapon : Integer = newState and gc_statetag_weapon;
      [*] = ;   var iAction : Integer = newState and gc_statetag_action;
      [*] = ;   var iSync : Integer = newState and gc_statetag_sync_endpoint;
      [*] = ;   var iSTP : Integer = newState and gc_statetag_sync_stp;
      [*] = ;   var val : String;
      [*] = ;   if (iEssential<>0) then
      [*] = ;   begin
      [*] = ;      case iEssential of
      [*] = ;         gc_statetag_essential_none : val := 'none';
      [*] = ;         gc_statetag_essential_birth : val := 'birth';
      [*] = ;         gc_statetag_essential_death : val := 'death';
      [*] = ;      end;
      [*] = ;      if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;      s := s+'iEssential='; if val<>'' then s:=s+val else s:=s+IntToStr(iEssential); s := s+' '; val := '';
      [*] = ;   end;
      [*] = ;   if (iResource<>0) then
      [*] = ;   begin
      [*] = ;      case iResource of
      [*] = ;         gc_statetag_resource_none : val := 'none';
      [*] = ;         gc_statetag_resource_food : val := 'food';
      [*] = ;         gc_statetag_resource_wood : val := 'wood';
      [*] = ;         gc_statetag_resource_stone : val := 'stone';
      [*] = ;      end;
      [*] = ;      if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;      s := s+'iResource='; if val<>'' then s:=s+val else s:=s+IntToStr(iResource); s := s+' '; val := '';
      [*] = ;   end;
      [*] = ;   if (iExecute<>0) then
      [*] = ;   begin
      [*] = ;      case iExecute of
      [*] = ;         gc_statetag_execute_none : val := 'none';
      [*] = ;         gc_statetag_execute_move : val := 'move';
      [*] = ;      end;
      [*] = ;      if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;      s := s+'iExecute='; if val<>'' then s:=s+val else s:=s+IntToStr(iExecute); s := s+' '; val := '';
      [*] = ;   end;
      [*] = ;   if (iMove<>0) then
      [*] = ;   begin
      [*] = ;      case iMove of
      [*] = ;         gc_statetag_move_idle : val := 'idle';
      [*] = ;         gc_statetag_move_walk : val := 'walk';
      [*] = ;         gc_statetag_move_turn : val := 'turn';
      [*] = ;      end;
      [*] = ;      if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;      s := s+'iMove='; if val<>'' then s:=s+val else s:=s+IntToStr(iMove); s := s+' '; val := '';
      [*] = ;   end;
      [*] = ;   if (iWeapon<>0) then
      [*] = ;   begin
      [*] = ;      case iWeapon of
      [*] = ;         gc_statetag_weapon_none : val := 'none';
      [*] = ;         gc_statetag_weapon_0 : val := 'weap0';
      [*] = ;         gc_statetag_weapon_1 : val := 'weap1';
      [*] = ;         gc_statetag_weapon_2 : val := 'weap2';
      [*] = ;      end;
      [*] = ;      if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;      s := s+'iWeapon='; if val<>'' then s:=s+val else s:=s+IntToStr(iWeapon); s := s+' '; val := '';
      [*] = ;   end;
      [*] = ;   if (iAction<>0) then
      [*] = ;   begin
      [*] = ;      case iAction of
      [*] = ;         gc_statetag_action_none : val := 'none';
      [*] = ;         gc_statetag_action_attack : val := 'attack';
      [*] = ;         gc_statetag_action_build : val := 'build';
      [*] = ;         gc_statetag_action_extract : val := 'extract';
      [*] = ;      end;
      [*] = ;      if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;      s := s+'iAction='; if val<>'' then s:=s+val else s:=s+IntToStr(iAction); s := s+' '; val := '';
      [*] = ;   end;
      [*] = ;   if (s<>'') then s := s+gc_gui_breakline;
      [*] = ;   s := s+'iSyncEnd='; if val<>'' then s:=s+val else s:=s+IntToStr(iSync); s := s+' '; val := '';
      [*] = ;   s := s+gc_gui_breakline+'iSyncSTP='; if val<>'' then s:=s+val else s:=s+IntToStr(iSTP); s := s+' '; val := '';
      [*] = ;end;
      [*] = ;
      [*] = ;if (GetPlayerHandleInterfaceIO=0) then
      [*] = ;exit;
      [*] = ;
      [*] = ;const cElmName = 'editorinfo';
      [*] = ;const cElmUnitName = 'editorunitinfo';
      [*] = ;
      [*] = ;var cTextPeaceMode : String; _misc_ConstStringToText('gui|minimap.info.peacemode', cTextPeaceMode);
      [*] = ;var cTextScores : String; _misc_ConstStringToText('gui|minimap.info.scores', cTextScores);
      [*] = ;var cTextObjName : String; _misc_ConstStringToText('gui|minimap.info.debug.name', cTextObjName);
      [*] = ;var cTextObjOrder : String; _misc_ConstStringToText('gui|minimap.info.debug.order', cTextObjOrder);
      [*] = ;var cTextObjOrderX : String; _misc_ConstStringToText('gui|minimap.info.debug.orderx', cTextObjOrderX);
      [*] = ;var cTextObjOrderY : String; _misc_ConstStringToText('gui|minimap.info.debug.ordery', cTextObjOrderY);
      [*] = ;var cTextObjOrderList : String; _misc_ConstStringToText('gui|minimap.info.debug.orderlist', cTextObjOrderList);
      [*] = ;var cTextObjOrderTrg : String; _misc_ConstStringToText('gui|minimap.info.debug.ordertrg', cTextObjOrderTrg);
      [*] = ;var cTextHandle : String; _misc_ConstStringToText('gui|minimap.info.debug.hnd', cTextHandle);
      [*] = ;var cTextSTO : String; _misc_ConstStringToText('gui|minimap.info.debug.sto', cTextSTO);
      [*] = ;var cTextSTP : String; _misc_ConstStringToText('gui|minimap.info.debug.stp', cTextSTP);
      [*] = ;var cTextSTA : String = 'STA=';
      [*] = ;var cTextSTOListCount : String; _misc_ConstStringToText('gui|minimap.info.debug.stolist', cTextSTOListCount);
      [*] = ;var cTextORDListCount : String; _misc_ConstStringToText('gui|minimap.info.debug.ordlist', cTextORDListCount);
      [*] = ;var cTextPathRequested : String; _misc_ConstStringToText('gui|minimap.info.debug.bpathrequested', cTextPathRequested);
      [*] = ;var cTextStandTime : String; _misc_ConstStringToText('gui|minimap.info.debug.standtime', cTextStandTime);
      [*] = ;var cTextNone : String; _misc_ConstStringToText('gui|minimap.info.debug.none', cTextNone);
      [*] = ;var cTextScenarioGroup : String; _misc_ConstStringToText('gui|minimap.info.debug.scenariogroup', cTextScenarioGroup);
      [*] = ;var cTextTime : String; _misc_ConstStringToText('gui|minimap.info.time', cTextTime);
      [*] = ;var cTextPeaceTimeLeft : String; _misc_ConstStringToText('gui|minimap.info.peacetime', cTextPeaceTimeLeft);
      [*] = ;var cTextFPS : String; _misc_ConstStringToText('gui|minimap.info.fps', cTextFPS);
      [*] = ;var cTextUID : String = 'UID=';
      [*] = ;var cTextPlayer : String = 'pl=';
      [*] = ;var cTextSquad : String = 'squad=';
      [*] = ;var cTextSquadUID : String = 'squid=';
      [*] = ;var cTextMiscCount : String = 'miscobj=';
      [*] = ;var cTextMaxProgress : String = 'maxprogress=';
      [*] = ;var plInd : Integer = GetPlayerIndexByHandle(GetPlayerHandleInterfaceIO);
      [*] = ;
      [*] = ;var cTextTeamNumber : String = GetLocaleTableListItemByID('new', 'minimap.info.teamnumber')+': ';
      [*] = ;var cTextTeamFFA : String= GetLocaleTableListItemByID('new', 'minimap.info.teamffa');
      [*] = ;
      [*] = ;var color : TColor;
      [*] = ;color.r := 1;
      [*] = ;color.g := 1;
      [*] = ;color.b := 1;
      [*] = ;color.a := 1;
      [*] = ;
      [*] = ;var i : Integer;
      [*] = ;var nul : String;
      [*] = ;var text : String;
      [*] = ;
      [*] = ;var minimap : Integer;
      [*] = ;if (GetGUIMiniMapVisible) then
      [*] = ;minimap := round(GetGUIMiniMapHeight)
      [*] = ;else
      [*] = ;minimap := 0;
      [*] = ;var dpiscale : Float = _gui_GetAbsScaleByDPI(0, 0);
      [*] = ;var elmParent : Integer;
      [*] = ;
      [*] = ;if (gProfile.bDbgUnitDebugInfo) then
      [*] = ;begin
      [*] = ;   var goHnd : Integer = _misc_GetPickedUnitHandle;
      [*] = ;   if (goHnd<>0) then
      [*] = ;   begin
      [*] = ;      var stag : String;
      [*] = ;      var pobj : Pointer = _unit_GetTObj(goHnd);
      [*] = ;      if (pobj<>nil) then
      [*] = ;      begin
      [*] = ;         UnitStateTagToString(goHnd, stag);
      [*] = ;         var pstolist : Pointer = _misc_GetObjectArgData(goHnd, gc_argunit_stolist);
      [*] = ;         var pordlist : Pointer = _misc_GetObjectArgData(goHnd, gc_argunit_ordlist);
      [*] = ;         if (pstolist<>nil) and (pordlist<>nil) then
      [*] = ;         begin
      [*] = ;            text := cTextObjName+' '+GetGameObjectBaseNameByHandle(goHnd);
      [*] = ;            //text := text+gc_gui_breakline+cTextObjOrder+' '+IntToStr(TObj(pobj).orders[0].itype);
      [*] = ;            //text := text+gc_gui_breakline+cTextObjOrderX+' '+FloatToStr(round(TObj(pobj).orders[0].info.x*16)/16);
      [*] = ;            //text := text+gc_gui_breakline+cTextObjOrderY+' '+FloatToStr(round(TObj(pobj).orders[0].info.y*16)/16);
      [*] = ;            //text := text+gc_gui_breakline+cTextObjOrderTrgUID+' '+IntToStr(TObj(pobj).orders[0].info.trg);
      [*] = ;            text := text+gc_gui_breakline+cTextObjOrderList;
      [*] = ;            var i : Integer;
      [*] = ;            for i:=0 to gc_obj_MaxOrderCount-1 do
      [*] = ;            begin
      [*] = ;               if (TObj(pobj).orders[i].itype<>gc_obj_order_type_none) then
      [*] = ;               text := text+' '+IntToStr(TObj(pobj).orders[i].itype);
      [*] = ;            end;
      [*] = ;            text := text+gc_gui_breakline+cTextHandle+IntToStr(goHnd);
      [*] = ;            text := text+gc_gui_breakline+cTextUID+IntToStr(GetGameObjectUniqueIdByHandle(goHnd));
      [*] = ;            text := text+gc_gui_breakline+cTextPlayer+IntToStr(TObj(pobj).pl)+'; cid='+IntToStr(TObj(pobj).cid)+'; id='+IntToStr(TObj(pobj).id);
      [*] = ;            var psquad : Pointer;
      [*] = ;            if (TObj(pobj).squad>=0) then
      [*] = ;            psquad := gPlayer[TObj(pobj).pl].squads.Get(TObj(pobj).squad);
      [*] = ;            var squid : Integer = -1;
      [*] = ;            if (psquad<>nil) then
      [*] = ;            squid := TSquad(psquad).fUID;
      [*] = ;            text := text+gc_gui_breakline+'sqind='+IntToStr(TObj(pobj).squad)+'; '+cTextSquadUID+IntToStr(squid);
      [*] = ;            text := text+gc_gui_breakline+cTextSTO;
      [*] = ;            if (GetGameObjectSTOHandleByHandle(goHnd)<>0) then
      [*] = ;            text := text+IntToStr(GetGameObjectSTOHandleByHandle(goHnd))
      [*] = ;            else
      [*] = ;            text := text+cTextNone;
      [*] = ;            text := text+gc_gui_breakline+cTextPathRequested+BoolToStr(TObj(pobj).bpathrequested);
      [*] = ;            text := text+gc_gui_breakline+cTextSTP;
      [*] = ;            text := text+IntToStr(round(GetGameObjectStateTargetPositionXByHandle(goHnd)))+';'+IntToStr(round(GetGameObjectStateTargetPositionYByHandle(goHnd)))+';'+IntToStr(round(GetGameObjectStateTargetPositionZByHandle(goHnd)));
      [*] = ;            text := text+gc_gui_breakline+cTextSTA+IntToStr(trunc(GetGameObjectSTArrowAngleByHandle(goHnd)));
      [*] = ;            text := text+gc_gui_breakline+cTextSTOListCount+IntToStr(TIntegerList(pstolist).GetCount);
      [*] = ;            text := text+gc_gui_breakline+cTextORDListCount+IntToStr(TIntegerList(pordlist).GetCount);
      [*] = ;            text := text+gc_gui_breakline+cTextStandTime+IntToStr(floor(TObj(pobj).standtime));
      [*] = ;            text := text+gc_gui_breakline+stag;
      [*] = ;            if (TObj(pobj).scenariogroupid=-1) then
      [*] = ;            text := text+gc_gui_breakline+cTextScenarioGroup+'-1'
      [*] = ;            else
      [*] = ;            text := text+gc_gui_breakline+cTextScenarioGroup+IntToStr(TObj(pobj).scenariogroupid);
      [*] = ;            text := text+gc_gui_breakline+cTextMiscCount+IntToStr(GetPlayerGameObjectsCountByHandle(GetPlayerHandleByIndex(gc_playerind_misc)));
      [*] = ;         end;
      [*] = ;      end
      [*] = ;      else
      [*] = ;      ErrorLog('ShowEditorInfo : just interesting : show to me pls. gec');
      [*] = ;      //text := text+gc_gui_breakline+'soundpersec='+IntToStr(gint_dbg_logsoundcount);
      [*] = ;      //text := text+gc_gui_breakline+'soundrequested='+IntToStr(gint_dbg_logrequestsoundcount)+gc_gui_breakline;
      [*] = ;   end;
      [*] = ;end;
      [*] = ;if (gProfile.bDbgUnitDebugInfo) then
      [*] = ;begin
      [*] = ;   text := text+gc_gui_breakline+cTextMaxProgress;
      [*] = ;   for i:=0 to gc_MaxPlayerCount-2 do
      [*] = ;   begin
      [*] = ;      var plhnd : Integer = GetPlayerHandleByIndex(i);
      [*] = ;      var count : Integer = GetPlayerGameObjectsCountByHandle(plhnd);
      [*] = ;      var cur : Integer = GetPlayerProgressSectionMaxByHandle(plhnd);
      [*] = ;      if (count>200) then
      [*] = ;      text := text+' '+IntToStr(GetPlayerProgressSectionMaxByHandle(GetPlayerHandleByIndex(i)));
      [*] = ;   end;
      [*] = ;
      [*] = ;   var semid : Float = gfloat_searchenemy_mid;
      [*] = ;   text := text+gc_gui_breakline+'battleactivity='+FloatToStr(floor(semid));
      [*] = ;   text := text+gc_gui_breakline+'battleactskip='+FloatToStr(floor(gint_searchenemy_skiptickcount));
      [*] = ;
      [*] = ;   var poolplhnd : Integer = GetPlayerHandleByName('@pool');
      [*] = ;   if (poolplhnd<>0) then
      [*] = ;   begin
      [*] = ;      var poolplcount : Integer = GetPlayerGameObjectsCountByHandle(poolplhnd);
      [*] = ;      {var passivecount : Integer;
      [*] = ;      var lastbadpassive, passivewitheff, passivewithbeh : Integer;
      [*] = ;      var slog : String;
      [*] = ;      var i, j : Integer;
      [*] = ;      for i:=GetPlayerCountOfGroupsByHandle(poolplhnd)-1 downto 0 do
      [*] = ;      begin
      [*] = ;         var grhnd : Integer = GetGRHandleByPlayerHandleByIndex(poolplhnd, i);
      [*] = ;         if (grhnd<>0) then
      [*] = ;         begin
      [*] = ;            for j:=GetGroupCountGameObjectsByHandle(grhnd)-1 downto 0 do
      [*] = ;            begin
      [*] = ;               var hnd : Integer = GetGroupGOHandleByGOIndexByHandle(grhnd, j);
      [*] = ;               if (hnd<>0) then
      [*] = ;               begin
      [*] = ;                  passivecount := passivecount+1;
      [*] = ;                  var effcount : Integer = GetEffectCount(hnd);
      [*] = ;                  var behcount : Integer = GetBehaviourCount(hnd);
      [*] = ;                  if (effcount>0) then
      [*] = ;                  begin
      [*] = ;                     passivewitheff := passivewitheff+1;
      [*] = ;                     lastbadpassive := hnd;
      [*] = ;                  end;
      [*] = ;                  if (behcount>0) and (not StrExists(GetGameObjectBaseNameByHandle(hnd), 'soundemitter')) then
      [*] = ;                  begin
      [*] = ;                     passivewithbeh := passivewithbeh+1;
      [*] = ;                     lastbadpassive := hnd;
      [*] = ;                  end;
      [*] = ;               end;
      [*] = ;            end;
      [*] = ;         end;
      [*] = ;      end;
      [*] = ;      if (lastbadpassive<>0) then
      [*] = ;      begin
      [*] = ;         if passivewitheff>0 then
      [*] = ;         slog := slog+'passiveeff = '+IntToStr(passivewitheff)+' ';
      [*] = ;         if (passivewithbeh>0) then
      [*] = ;         slog := slog+'passivebeh = '+IntToStr(passivewithbeh)+' ';
      [*] = ;      end;
      [*] = ;      var activecount : Integer = poolplcount-passivecount;
      [*] = ;      var mainlog : String = 'poolcount = '+IntToStr(poolplcount)+gc_gui_breakline+'passivecount = '+IntToStr(passivecount)+gc_gui_breakline+'activecount = '+IntToStr(activecount);
      [*] = ;      if (slog<>'') then
      [*] = ;      mainlog := mainlog+gc_gui_breakline+slog;
      [*] = ;      text := text+gc_gui_breakline+mainlog;}
      [*] = ;      text := text+gc_gui_breakline+'poolcount = '+IntToStr(poolplcount);
      [*] = ;   end;
      [*] = ;
      [*] = ;   if (_net_IsOnline) then
      [*] = ;   text := text+gc_gui_breakline+'senddatathreadcount='+IntToStr(LanGetSendDataThreadCount);
      [*] = ;
      [*] = ;   if (_net_IsOffline) or (_net_IsServer) then
      [*] = ;   text := text+gc_gui_breakline+'writenewrequest='+IntToStr(gWriteNewRequestList.GetCount);
      [*] = ;
      [*] = ;   text := text+gc_gui_breakline+gc_gui_breakline;
      [*] = ;end;
      [*] = ;{else
      [*] = ;begin
      [*] = ;   text := text+gc_gui_breakline+'soundpersec='+IntToStr(gint_dbg_logsoundcount);
      [*] = ;   text := text+gc_gui_breakline+'soundrequested='+IntToStr(gint_dbg_logrequestsoundcount)+gc_gui_breakline+gc_gui_breakline+gc_gui_breakline;
      [*] = ;end;
      [*] = ;
      [*] = ;if (GetCurrentTime-gfloat_dbg_logsoundtime)>1 then
      [*] = ;begin
      [*] = ;   gfloat_dbg_logsoundtime := GetCurrentTime;
      [*] = ;   gint_dbg_logsoundcount := 0;
      [*] = ;   gint_dbg_logrequestsoundcount := 0;
      [*] = ;end;}
      [*] = ;
      [*] = ;if (gbool_editor_peacemode) then
      [*] = ;text := text+cTextPeaceMode+gc_gui_breakline;
      [*] = ;
      [*] = ;var arrKeyColorPos : array [0..gc_MaxPlayerCount-1] of Integer;
      [*] = ;{for i:=0 to gc_MaxPlayerCount-1 do
      [*] = ;begin
      [*] = ;   var bshow : Boolean = (gPlayer[i].bexists) or (gPlayer[i].victorystate<>gc_player_victorystate_none) or (gMap.players[i].bleave);
      [*] = ;   if (bshow) or ((gScenario.bexists) and (i=0)) then
      [*] = ;   begin
      [*] = ;      arrKeyColorPos[i] := StrLength(text);
      [*] = ;
      [*] = ;      var scores : Integer = gPlayer[i].counter.scores;
      [*] = ;      var stmp, stmp2 : String;
      [*] = ;      var fscores : Float = (scores/100);
      [*] = ;      var dotpos : Integer = StrPos('.', FloatToStr(fscores));
      [*] = ;      if (dotpos<>0) then
      [*] = ;      begin
      [*] = ;         if (SubStr(FloatToStr(fscores), dotpos+3, 1)<>'0') then
      [*] = ;         fscores := fscores+0.001;
      [*] = ;         stmp := SubStr(FloatToStr(fscores), 1, dotpos+2);
      [*] = ;      end
      [*] = ;      else
      [*] = ;      stmp := floatToStr(fscores)+'.00';
      [*] = ;
      [*] = ;      var name : String;
      [*] = ;      if (gMap.players[i].name<>'') then
      [*] = ;      begin
      [*] = ;         if (gScenario.bexists) then
      [*] = ;         begin
      [*] = ;            var text : String = GetLocaleTableListItemByID('missionplayers', gScenario.missname+'.player'+IntToStr(i));
      [*] = ;            if text<>'' then
      [*] = ;            name := text
      [*] = ;            else
      [*] = ;            name := gMap.players[i].name;
      [*] = ;         end
      [*] = ;         else
      [*] = ;         name := gMap.players[i].name;
      [*] = ;      end
      [*] = ;      else
      [*] = ;      if (gMap.players[i].bai) then
      [*] = ;      name := GetLocaleTableListItemByID('gui', 'difficulty.'+IntToStr(gMap.players[i].aidifficulty+1))
      [*] = ;      else
      [*] = ;      name := GetLocaleTableListItemByID('new', 'mods.unknown');
      [*] = ;      //if {(gPlayer[i].victorystate=gc_player_victorystate_lose) or (gMap.players[i].bleave) then
      [*] = ;      //text := text+'%color(A0A0A0)%'+'    '+name+' : '+stmp+gc_font_color_white+gc_gui_breakline
      [*] = ;      //else
      [*] = ;      //text := text+'    '+name+' : '+stmp+gc_gui_breakline;
      [*] = ;   {end;
      [*] = ;end;
      [*] = ;}
      [*] = ;var teamsActive : array [0..gc_MaxPlayerCount] of Integer;
      [*] = ;
      [*] = ;var pl, team : Integer;
      [*] = ;for team:=0 to gc_MaxPlayerCount-2 do
      [*] = ;for pl:=0 to gc_MaxPlayerCount-2 do
      [*] = ;if (gMap.players[pl].team=team) or ((team=0) and (gMap.players[pl].team>=gc_MaxPlayerCount)) then
      [*] = ;begin
      [*] = ;   if (gMap.players[pl].bexists) or (gMap.players[pl].bai) or (gMap.players[pl].bhuman) then
      [*] = ;   begin
      [*] = ;      var t : Integer;
      [*] = ;      if gMap.players[pl].team>=gc_MaxPlayerCount then
      [*] = ;      t := 0
      [*] = ;      else
      [*] = ;      t := team;
      [*] = ;      teamsActive[t]:=teamsActive[t]+1;
      [*] = ;   end;
      [*] = ;end;
      [*] = ;
      [*] = ;var isFFA : Boolean = True;
      [*] = ;for i:=1 to gc_MaxPlayerCount-2 do
      [*] = ;if (teamsActive[i]>1) then isFFA := False;
      [*] = ;
      [*] = ;var isNoTeam : Boolean;
      [*] = ;if (not isFFA) then
      [*] = ;for i:=1 to gc_MaxPlayerCount-2 do
      [*] = ;if (teamsActive[i]=1) then isNoTeam:=True;
      [*] = ;if (teamsActive[0]>0) then isNoTeam:=True;
      [*] = ;
      [*] = ;var randkey : Integer = GetRandomKey;
      [*] = ;var randomnicks : TIntegerList;
      [*] = ;if (gbool_gui_hidenicks) then
      [*] = ;begin
      [*] = ;   SetRandomKey(gMap.settings.gen.randkey1);
      [*] = ;   for i:=0 to gc_MaxPlayerCount-1 do
      [*] = ;   begin
      [*] = ;      var rndind : Integer = floor(RandomExt*72);
      [*] = ;      if (randomnicks.IndexOf(rndind)<0) then
      [*] = ;      randomnicks.Add(floor(RandomExt*72))
      [*] = ;      else
      [*] = ;      i := i-1;
      [*] = ;   end;
      [*] = ;end;
      [*] = ;
      [*] = ;var teamNo : Integer;
      [*] = ;for teamNo:=1 to gc_MaxPlayerCount-2 do
      [*] = ;begin
      [*] = ;   if (teamsActive[teamNo]>1) then
      [*] = ;   begin
      [*] = ;      text := text+gc_gui_breakspace10;
      [*] = ;      for i:=0 to gc_MaxPlayerCount-2 do
      [*] = ;      begin
      [*] = ;         var bshow : Boolean = (gMap.players[i].cid<>gc_spectator_countryid) and (((gMap.bbattle) and (gMap.players[i].bexists)) or ((not gMap.bbattle) and (gPlayer[i].bexists)) or (gPlayer[i].victorystate<>gc_player_victorystate_none) or (gMap.players[i].bleave));
      [*] = ;         var bShowInGroup : Boolean = (gMap.players[i].cid<>gc_spectator_countryid) and (((gMap.players[i].team=teamNo) and (teamsActive[gMap.players[i].team]>1)));
      [*] = ;         if ((bshow) or ((gScenario.bexists) and (gPlayer[i].counter.scores>0))) and bShowInGroup then
      [*] = ;         begin
      [*] = ;            arrKeyColorPos[i] := StrLength(text);
      [*] = ;
      [*] = ;            var scores : Integer = gPlayer[i].counter.scores;
      [*] = ;            var stmp, stmp2 : String;
      [*] = ;            var fscores : Float = (scores/100);
      [*] = ;            var dotpos : Integer = StrPos('.', FloatToStr(fscores));
      [*] = ;            if (dotpos<>0) then
      [*] = ;            begin
      [*] = ;               if (SubStr(FloatToStr(fscores), dotpos+3, 1)<>'0') then
      [*] = ;               fscores := fscores+0.001;
      [*] = ;               stmp := SubStr(FloatToStr(fscores), 1, dotpos+2);
      [*] = ;            end
      [*] = ;            else
      [*] = ;            stmp := floatToStr(fscores)+'.00';
      [*] = ;
      [*] = ;            var name : String;
      [*] = ;            if (gMap.players[i].name<>'') then
      [*] = ;            begin
      [*] = ;               if (gScenario.bexists) and (not gMap.bbattle) then
      [*] = ;               begin
      [*] = ;                  var text : String = GetLocaleTableListItemByID('missionplayers', gScenario.missname+'.player'+IntToStr(i));
      [*] = ;                  if text<>'' then
      [*] = ;                  name := text
      [*] = ;                  else
      [*] = ;                  if i=0 then
      [*] = ;                  name := gMap.players[i].name
      [*] = ;                  else
      [*] = ;                  name := '';//gMap.players[i].name;
      [*] = ;               end
      [*] = ;               else
      [*] = ;               name := gMap.players[i].name;
      [*] = ;            end
      [*] = ;            else
      [*] = ;            if (gMap.players[i].bai) then
      [*] = ;            name := GetLocaleTableListItemByID('gui', 'difficulty.'+IntToStr(gMap.players[i].aidifficulty+1))
      [*] = ;            else
      [*] = ;            name := GetLocaleTableListItemByID('new', 'mods.unknown');
      [*] = ;            if (not gScenario.bactive) or (name<>'') then
      [*] = ;            begin
      [*] = ;               if (gbool_gui_hidenicks) and (not gbool_gui_bspectator) and (not _net_IsReplay) and (gPlayer[plInd].victorystate=gc_player_victorystate_none) then
      [*] = ;               begin
      [*] = ;                  name := '('+IntToStr(i+1)+')';
      [*] = ;                  var rndind : Integer;
      [*] = ;                  if (randomnicks.GetCount>i) then
      [*] = ;                  rndind := randomnicks.Get(i);
      [*] = ;                  name := name+' '+GetLocaleTableListItemByID('new', 'internet.random.animal.'+IntToStr(rndind));
      [*] = ;               end;
      [*] = ;
      [*] = ;               if (gPlayer[i].victorystate=gc_player_victorystate_lose) or (gMap.players[i].bleave) then
      [*] = ;               text := text+'%color(A0A0A0)%'+'    '+name+' : '+stmp+gc_font_color_white+gc_gui_breakline
      [*] = ;               else
      [*] = ;               text := text+'    '+name+' : '+stmp+gc_gui_breakline;
      [*] = ;            end;
      [*] = ;         end;
      [*] = ;      end;
      [*] = ;   end;
      [*] = ;end;
      [*] = ;var bnoteam : Boolean = isFFA;
      [*] = ;for pl:=0 to gc_MaxPlayerCount-2 do
      [*] = ;begin
      [*] = ;   if (gMap.players[pl].team=0) or (gMap.players[pl].team>4) or (teamsActive[gMap.players[pl].team]=1) then
      [*] = ;   begin
      [*] = ;      var bshow : Boolean = (gMap.players[pl].cid<>gc_spectator_countryid) and ((gPlayer[pl].bexists) or (gPlayer[pl].victorystate<>gc_player_victorystate_none) or (gMap.players[pl].bleave));
      [*] = ;      if ((bshow) or ((gScenario.bexists) and (gPlayer[pl].counter.scores>0))) then
      [*] = ;      begin
      [*] = ;         if not bnoteam then
      [*] = ;         begin
      [*] = ;            bnoteam := True;
      [*] = ;            text := text+gc_gui_breakspace6+cTextTeamFFA+gc_gui_breakline;
      [*] = ;         end;
      [*] = ;
      [*] = ;         arrKeyColorPos[pl] := StrLength(text);
      [*] = ;
      [*] = ;         var scores : Integer = gPlayer[pl].counter.scores;
      [*] = ;         var stmp, stmp2 : String;
      [*] = ;         var fscores : Float = (scores/100);
      [*] = ;         var dotpos : Integer = StrPos('.', FloatToStr(fscores));
      [*] = ;         if (dotpos<>0) then
      [*] = ;         begin
      [*] = ;            if (SubStr(FloatToStr(fscores), dotpos+3, 1)<>'0') then
      [*] = ;            fscores := fscores+0.001;
      [*] = ;            stmp := SubStr(FloatToStr(fscores), 1, dotpos+2);
      [*] = ;         end
      [*] = ;         else
      [*] = ;         stmp := floatToStr(fscores)+'.00';
      [*] = ;
      [*] = ;         var name : String;
      [*] = ;         if (gMap.players[pl].name<>'') then
      [*] = ;         begin
      [*] = ;            if (gScenario.bexists) and (not gMap.bbattle) then
      [*] = ;            begin
      [*] = ;               var text : String = GetLocaleTableListItemByID('missionplayers', gScenario.missname+'.player'+IntToStr(pl));
      [*] = ;               if text<>'' then
      [*] = ;               name := text
      [*] = ;               else
      [*] = ;               if pl=0 then
      [*] = ;               name := gMap.players[pl].name
      [*] = ;               else
      [*] = ;               name := '';//gMap.players[pl].name;
      [*] = ;            end
      [*] = ;            else
      [*] = ;            name := gMap.players[pl].name;
      [*] = ;         end
      [*] = ;         else
      [*] = ;         if (gMap.players[pl].bai) then
      [*] = ;         name := GetLocaleTableListItemByID('gui', 'difficulty.'+IntToStr(gMap.players[pl].aidifficulty+1))
      [*] = ;         else
      [*] = ;         name := GetLocaleTableListItemByID('new', 'mods.unknown');
      [*] = ;         if ((not gScenario.bactive) or (name<>''))
      [*] = ;         and ((not gMap.bbattle) or (gMap.players[pl].lanid<>0)) then
      [*] = ;         begin
      [*] = ;            if (gbool_gui_hidenicks) and (not gbool_gui_bspectator) and (not _net_IsReplay) and (gPlayer[plInd].victorystate=gc_player_victorystate_none) then
      [*] = ;            begin
      [*] = ;               name := '('+IntToStr(pl+1)+')';
      [*] = ;               var rndind : Integer;
      [*] = ;               if (randomnicks.GetCount>pl) then
      [*] = ;               rndind := randomnicks.Get(pl);
      [*] = ;               name := name+' '+GetLocaleTableListItemByID('new', 'internet.random.animal.'+IntToStr(rndind));
      [*] = ;            end;
      [*] = ;            if (gPlayer[pl].victorystate=gc_player_victorystate_lose) or (gMap.players[pl].bleave) then
      [*] = ;            text := text+'%color(A0A0A0)%'+'    '+name+' : '+stmp+gc_font_color_white+gc_gui_breakline
      [*] = ;            else
      [*] = ;            text := text+'    '+name+' : '+stmp+gc_gui_breakline;
      [*] = ;         end;
      [*] = ;      end;
      [*] = ;   end;
      [*] = ;end;
      [*] = ;if not isffa then
      [*] = ;text := text+gc_gui_breakspace4;
      [*] = ;
      [*] = ;var stime : String;
      [*] = ;_misc_TimeToStr(GetGameTime, stime, True);
      [*] = ;text := text+cTextTime+' '+stime;
      [*] = ;
      [*] = ;if (gbool_peacemode) then
      [*] = ;begin
      [*] = ;   var ptleft : Float = gfloat_peacetime-GetGameTime;
      [*] = ;   //if (ptleft>0) then
      [*] = ;   //begin
      [*] = ;      _misc_TimeToStr(ptleft, stime, True);
      [*] = ;      text := text+gc_gui_breakline+cTextPeaceTimeLeft+' '+stime;
      [*] = ;   //end;
      [*] = ;end;
      [*] = ;
      [*] = ;if ((gProfile.bShowFPS) {and (gProfile.bDevMode)}) or (gProfile.bDbgUnitDebugInfo) then
      [*] = ;text := text+gc_gui_breakline+cTextFPS+FramesPerSecondText(1);
      [*] = ;
      [*] = ;if (GetSeasonType=2) then // winter
      [*] = ;begin
      [*] = ;   var shcolor : TColor;
      [*] = ;   _gui_ConvertHexToTColor('000000', shcolor);
      [*] = ;   elmParent := _gui_CreateTextShadowed(cElmUnitName+'s', 0, text, gc_halRightWidth, gc_valBottomHeight, -10, -minimap-Round(33*dpiscale), 0, 0, gc_halLeft, gc_valTop, gc_font_default, color, -1, 1, shcolor, True);
      [*] = ;   _gui_AbsScaleByDPI(_gui_GetTextShadowElement(elmParent));
      [*] = ;   SetGUIElementVisible(_gui_GetTextShadowElement(elmParent), (gInterface.gamemode<>gc_gamemode_mainmenu) and (GetGUIMiniMapVisible));
      [*] = ;   //var tmpcolor : TColor;
      [*] = ;   //_gui_ConvertHexToTColor(gc_font_hex_color_winterblue, tmpcolor);
      [*] = ;   //elmParent := _gui_CreateText(cElmUnitName, 0, text, gc_halRightWidth, gc_valBottomHeight, -10, -minimap-Round(33*dpiscale), 0, 0, gc_halLeft, gc_valTop, gc_font_default, tmpcolor, True);
      [*] = ;   //{
      [*] = ;   //_gui_ConvertHexToTColor('000000', shcolor);
      [*] = ;   //elmParent := _gui_CreateTextShadowed(cElmUnitName+'s', 0, text, gc_halRightWidth, gc_valBottomHeight, -10, -minimap-Round(33*dpiscale), 0, 0, gc_halLeft, gc_valTop, gc_font_default, color, -1, 1, shcolor, True);
      [*] = ;   //_gui_AbsScaleByDPI(_gui_GetTextShadowElement(elmParent));
      [*] = ;   //SetGUIElementVisible(_gui_GetTextShadowElement(elmParent), (gInterface.gamemode<>gc_gamemode_mainmenu) and (GetGUIMiniMapVisible));}
      [*] = ;end
      [*] = ;else
      [*] = ;elmParent := _gui_CreateText(cElmUnitName, 0, text, gc_halRightWidth, gc_valBottomHeight, -10, -minimap-Round(33*dpiscale), 0, 0, gc_halLeft, gc_valTop, gc_font_default, color, True);
      [*] = ;_gui_AbsScaleByDPI(elmParent);
      [*] = ;SetGUIElementVisible(elmParent, (gInterface.gamemode<>gc_gamemode_mainmenu) and (GetGUIMiniMapVisible));
      [*] = ;
      [*] = ;var x, y, w, h : Integer;
      [*] = ;var style : String;
      [*] = ;var r, g, b, a : Float;
      [*] = ;var pos : Integer = 10;
      [*] = ;
      [*] = ;for i:=0 to gc_MaxPlayerCount-2 do
      [*] = ;begin
      [*] = ;   var bshow : Boolean = (gMap.players[i].cid<>gc_spectator_countryid) and (((gMap.bbattle) and (gMap.players[i].bexists)) or ((not gMap.bbattle) and (gPlayer[i].bexists)) or (gPlayer[i].victorystate<>gc_player_victorystate_none) and ((not gMap.bbattle) or (gMap.players[i].lanid<>0)));
      [*] = ;   if (bshow) or ((gScenario.bexists) and (i=0)) then
      [*] = ;   begin
      [*] = ;      FormatGetGUIElementTextPosData(elmParent, arrKeyColorPos[i], x, y, style, r, g, b, a);
      [*] = ;      y := -y;
      [*] = ;      x := x;
      [*] = ;      y := y+7;
      [*] = ;      w := 8;
      [*] = ;      h := 8;
      [*] = ;      var elm : Integer;
      [*] = ;      if (_net_IsOnline and (gLanHostID=gMap.players[i].lanid) and (gLanHostID<>0)) then
      [*] = ;      elm := _gui_CreateImageActive('bg_keycolor'+IntToStr(i), elmParent, 'icons.keycolor.'+IntToStr(16), gc_halParentLeft, gc_valParentTop, x-3, y-3, w+6, h+6, 0, nul, nul, True)
      [*] = ;      else
      [*] = ;      elm := _gui_CreateImageActive('bg_keycolor'+IntToStr(i), elmParent, 'icons.keycolor.'+IntToStr(16), gc_halParentLeft, gc_valParentTop, x-1, y-1, w+2, h+2, 0, nul, nul, True);
      [*] = ;      if (gPlayer[i].victorystate=gc_player_victorystate_lose) then
      [*] = ;      SetGUIElementUserBlend(elm, 0.5)
      [*] = ;      else
      [*] = ;      SetGUIElementUserBlend(elm, 1);
      [*] = ;      elm := _gui_CreateImageActive('keycolor'+IntToStr(i), elmParent, 'icons.keycolor.'+IntToStr(gMap.players[i].color+1), gc_halParentLeft, gc_valParentTop, x, y, w, h, 0, nul, nul, True);
      [*] = ;      if (gPlayer[i].victorystate=gc_player_victorystate_lose) then
      [*] = ;      SetGUIElementUserBlend(elm, 0.5)
      [*] = ;      else
      [*] = ;      SetGUIElementUserBlend(elm, 1);
      [*] = ;   end
      [*] = ;   else
      [*] = ;   begin
      [*] = ;      var elm : Integer = GetGUIElementIndexByNameParent('bg_keycolor'+IntToStr(i), elmParent);
      [*] = ;      if (elm<>0) then
      [*] = ;      RemoveGUIElement(elm);
      [*] = ;      elm := GetGUIElementIndexByNameParent('keycolor'+IntToStr(i), elmParent);
      [*] = ;      if (elm<>0) then
      [*] = ;      RemoveGUIElement(elm);
      [*] = ;   end;
      [*] = ;end;
      [*] = ;
      [*] = ;SetRandomKey(floor(Abs(randkey)));
   struct.end
section.end

