hedgewars/uChat.pas
changeset 2161 0c8634241fa4
parent 2131 8b9f7a407408
child 2290 bf87ca44782e
equal deleted inserted replaced
2160:c83e8608dfd7 2161:0c8634241fa4
    91 begin
    91 begin
    92 cnt:= 0;
    92 cnt:= 0;
    93 t:= 0;
    93 t:= 0;
    94 i:= lastStr;
    94 i:= lastStr;
    95 
    95 
    96 r.x:= 6;
    96 r.x:= 6 - cScreenWidth div 2;
    97 r.y:= (visibleCount - t) * 16 + 10;
    97 r.y:= (visibleCount - t) * 16 + 10;
    98 r.h:= 16;
    98 r.h:= 16;
    99 
    99 
   100 if (GameState = gsChat)
   100 if (GameState = gsChat)
   101 	and (InputStr.Tex <> nil) then
   101 	and (InputStr.Tex <> nil) then
   102 	begin
   102 	begin
   103 	r.w:= InputStr.Width;
   103 	r.w:= InputStr.Width;
   104 	DrawFillRect(r);
   104 	DrawFillRect(r);
   105 	DrawTexture(8, visibleCount * 16 + 10, InputStr.Tex);
   105 	DrawTexture(8 - cScreenWidth div 2, visibleCount * 16 + 10, InputStr.Tex);
   106 	end;
   106 	end;
   107 
   107 
   108 dec(r.y, 16);
   108 dec(r.y, 16);
   109 
   109 
   110 while
   110 while
   116 	and
   116 	and
   117 		(Strs[i].Tex <> nil) do
   117 		(Strs[i].Tex <> nil) do
   118 	begin
   118 	begin
   119 	r.w:= Strs[i].Width;
   119 	r.w:= Strs[i].Width;
   120 	DrawFillRect(r);
   120 	DrawFillRect(r);
   121 	DrawTexture(8, (visibleCount - t) * 16 - 6, Strs[i].Tex);
   121 	DrawTexture(8 - cScreenWidth div 2, (visibleCount - t) * 16 - 6, Strs[i].Tex);
   122 	dec(r.y, 16);
   122 	dec(r.y, 16);
   123 	
   123 	
   124 	if i = 0 then i:= MaxStrIndex else dec(i);
   124 	if i = 0 then i:= MaxStrIndex else dec(i);
   125 	inc(cnt);
   125 	inc(cnt);
   126 	inc(t)
   126 	inc(t)