diff -r 701eb3f3556a -r f0a9042e7387 hedgewars/uCaptions.pas --- a/hedgewars/uCaptions.pas Thu Nov 17 23:14:24 2011 +0300 +++ b/hedgewars/uCaptions.pas Fri Nov 18 00:32:52 2011 +0100 @@ -25,7 +25,7 @@ procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup); procedure DrawCaptions; -procedure ReloadCaptions; +procedure ReloadCaptions(unload: boolean); procedure initModule; procedure freeModule; @@ -65,15 +65,13 @@ end; // For uStore texture recreation -procedure ReloadCaptions; +procedure ReloadCaptions(unload: boolean); var Group: TCapGroup; begin for Group:= Low(TCapGroup) to High(TCapGroup) do - begin - FreeTexture(Captions[Group].Tex); - if Captions[Group].Text <> '' then + if unload then FreeTexture(Captions[Group].Tex) + else if Captions[Group].Text <> '' then Captions[Group].Tex:= RenderStringTex(Captions[Group].Text, Captions[Group].Color, fntBig) - end end; procedure DrawCaptions;