hedgewars/uStore.pas
changeset 7134 beb16926ae5c
parent 7121 ce5e70fe4eb3
child 7151 ec15d9e1a7e3
equal deleted inserted replaced
7132:baf3351646f4 7134:beb16926ae5c
   823 begin
   823 begin
   824 // make sure there is a caption as well as a sub caption - description is optional
   824 // make sure there is a caption as well as a sub caption - description is optional
   825 if caption = '' then
   825 if caption = '' then
   826     caption:= '???';
   826     caption:= '???';
   827 if subcaption = '' then
   827 if subcaption = '' then
   828     subcaption:= ' ';
   828     subcaption:= _S' ';
   829 
   829 
   830 font:= CheckCJKFont(caption,fnt16);
   830 font:= CheckCJKFont(caption,fnt16);
   831 font:= CheckCJKFont(subcaption,font);
   831 font:= CheckCJKFont(subcaption,font);
   832 font:= CheckCJKFont(description,font);
   832 font:= CheckCJKFont(description,font);
   833 font:= CheckCJKFont(extra,font);
   833 font:= CheckCJKFont(extra,font);
   907     if tmpline <> '' then
   907     if tmpline <> '' then
   908         begin
   908         begin
   909         r:= WriteInRect(tmpsurf, cFontBorder + 2, r.y + r.h, $ff707070, font, tmpline);
   909         r:= WriteInRect(tmpsurf, cFontBorder + 2, r.y + r.h, $ff707070, font, tmpline);
   910 
   910 
   911         // render highlighted caption (if there is a ':')
   911         // render highlighted caption (if there is a ':')
   912         tmpline2:= '';
   912         tmpline2:= _S'';
   913         SplitByChar(tmpline, tmpline2, ':');
   913         SplitByChar(tmpline, tmpline2, ':');
   914         if tmpline2 <> '' then
   914         if tmpline2 <> _S'' then
   915             WriteInRect(tmpsurf, cFontBorder + 2, r2.y + r2.h, $ffc7c7c7, font, tmpline + ':');
   915             WriteInRect(tmpsurf, cFontBorder + 2, r2.y + r2.h, $ffc7c7c7, font, tmpline + ':');
   916         end
   916         end
   917     end;
   917     end;
   918 
   918 
   919 if extra <> '' then
   919 if extra <> '' then
   952 r.y:= (i mod 16) * 32;
   952 r.y:= (i mod 16) * 32;
   953 r.w:= 32;
   953 r.w:= 32;
   954 r.h:= 32;
   954 r.h:= 32;
   955 
   955 
   956 // default (no extra text)
   956 // default (no extra text)
   957 extra:= '';
   957 extra:= _S'';
   958 extracolor:= 0;
   958 extracolor:= 0;
   959 
   959 
   960 if (CurrentTeam <> nil) and (Ammoz[atype].SkipTurns >= CurrentTeam^.Clan^.TurnNumber) then // weapon or utility is not yet available
   960 if (CurrentTeam <> nil) and (Ammoz[atype].SkipTurns >= CurrentTeam^.Clan^.TurnNumber) then // weapon or utility is not yet available
   961     begin
   961     begin
   962     extra:= trmsg[sidNotYetAvailable];
   962     extra:= trmsg[sidNotYetAvailable];
   967     extra:= trmsg[sidNoEndTurn];
   967     extra:= trmsg[sidNoEndTurn];
   968     extracolor:= LongInt($ff70c770);
   968     extracolor:= LongInt($ff70c770);
   969     end
   969     end
   970 else
   970 else
   971     begin
   971     begin
   972     extra:= '';
   972     extra:= _S'';
   973     extracolor:= 0;
   973     extracolor:= 0;
   974     end;
   974     end;
   975 
   975 
   976 // render window and return the texture
   976 // render window and return the texture
   977 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r)
   977 WeaponTooltipTex:= RenderHelpWindow(trammo[Ammoz[atype].NameId], trammoc[Ammoz[atype].NameId], trammod[Ammoz[atype].NameId], extra, extracolor, SpritesData[sprAMAmmos].Surface, @r)