hedgewars/uCaptions.pas
changeset 12215 2cbc57db82e1
parent 11046 47a8c19ecb60
equal deleted inserted replaced
12214:facbc3c6e166 12215:2cbc57db82e1
    45 procedure AddCaption(s: ansistring; Color: Longword; Group: TCapGroup);
    45 procedure AddCaption(s: ansistring; Color: Longword; Group: TCapGroup);
    46 begin
    46 begin
    47     if cOnlyStats then exit;
    47     if cOnlyStats then exit;
    48     if Length(s) = 0 then
    48     if Length(s) = 0 then
    49         exit;
    49         exit;
    50     if Captions[Group].Text <> s then
    50     if (Captions[Group].Text <> s) or (Captions[Group].Color <> Color) then
    51         FreeAndNilTexture(Captions[Group].Tex);
    51         FreeAndNilTexture(Captions[Group].Tex);
    52 
    52 
    53     if Captions[Group].Tex = nil then
    53     if Captions[Group].Tex = nil then
    54         begin
    54         begin
    55         Captions[Group].Color:= Color;
    55         Captions[Group].Color:= Color;